Manager Learning
Review the learnings Tolky extracts from conversations handled by your team, and approve, reject or add them to the knowledge base.
When an operator takes over a conversation and answers something the avatar could not, that answer is valuable. Manager Learning analyzes these conversations and proposes learnings: new content the knowledge base is missing, or corrections where the base says something different from what your team said.
Each learning waits for a decision in Learning › Triage. With the API you can run the same review from your own tools.
Lifecycle of a learning
| Status | Meaning |
|---|---|
pending | Waiting for review. The AI does not use it yet. |
approved | You accepted the content. |
rejected | You rejected it. It stays in the history. |
promoted | Added to the knowledge base as content. The AI uses it in answers. |
superseded | A newer learning about the same subject replaced it. |
archived | Removed from the queue automatically. You can restore it. |
A learning is either new_content (the base did not cover the subject) or correction (the base diverges from what the manager said).
ReferenceTechnical details
All endpoints are POST and require a host token in the header (Authorization: Bearer $TOLKY_TOKEN). The account always comes from the token.
| Purpose | Path |
|---|---|
| List learnings | /api/externalAPIs/public/contentaware/learningsget |
| Count pending learnings | /api/externalAPIs/public/contentaware/learningscount |
| Get one learning | /api/externalAPIs/public/contentaware/learningget |
| Approve | /api/externalAPIs/public/contentaware/learningapprove |
| Reject | /api/externalAPIs/public/contentaware/learningreject |
| Restore an archived learning | /api/externalAPIs/public/contentaware/learningrestore |
| Promote to the knowledge base | /api/externalAPIs/public/contentaware/learningpromote |
| List datasets for promotion | /api/externalAPIs/public/contentaware/datasetsget |
List learnings
| Name | Type | Required | Description |
|---|---|---|---|
statuses | string[] | No | Statuses to include. Default ["pending"]. |
learningKind | string | No | new_content or correction. |
severity | string | No | high, medium or low. |
sensitivity | string | No | low, medium or high. Overrides your account's filter. high shows everything. |
topicId | string | No | Only learnings of this topic. |
search | string | No | Text search. |
limit | integer | No | Default 50, maximum 500. |
offset | integer | No | Default 0. |
curl -X POST "https://api.tolky.to/api/externalAPIs/public/contentaware/learningsget" \
-H "Authorization: Bearer $TOLKY_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "statuses": ["pending"], "limit": 20 }'The response has learnings, topics, total, limit, offset, sensitivity and quota. Each learning has id, title, content, learningKind, severity, relevance, status, occurrences, topicId, topicLabel, conversationId, lastSeenAt and createdAt.
The pending queue is released in small batches: at most quota.perKind items of each kind (10 by default). total is the real size of the queue, quota.offered is what was released. History and search have no quota.
learningscount takes an optional sensitivity and returns count (released now), total (all pending), quota and sensitivity.
Get, approve, reject, restore
| Endpoint | Body | Effect |
|---|---|---|
learningget | learningId | Returns learning and originInsight (the analysis that produced it, with the related messages). |
learningapprove | learningId | pending to approved. |
learningreject | learningId, reviewNote (optional, up to 2000 characters) | pending to rejected. |
learningrestore | learningId | archived to pending. |
Approve, reject and restore return the updated learning.
Promote to the knowledge base
Creates a knowledge base entry with the learning's content. Promoting a pending learning also approves it.
| Name | Type | Required | Description |
|---|---|---|---|
learningId | string | Yes | Learning to promote. Must be pending or approved. |
datasetId | string | No | Destination dataset from datasetsget. When omitted, a dataset for manager learnings is created on first use. |
replaceChunkId | string | No | Existing knowledge base entry the learning corrects. It is removed in the same operation and the new entry goes to the same dataset. |
curl -X POST "https://api.tolky.to/api/externalAPIs/public/contentaware/learningpromote" \
-H "Authorization: Bearer $TOLKY_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "learningId": "3f0c2a8e-..." }'The response has learningId, chunkId, replacedChunkId, datasetId, datasetName, datasetProvisioned, status and learning. Promoting again does not create a duplicate: a learning already promoted answers 409.
datasetsget takes no body and returns datasets: [{ id, datasetName, datasetType }].
Errors
| Code | When |
|---|---|
400 | Invalid input, for example a datasetId different from the dataset of replaceChunkId, or a token that is not a host token. |
401 | Invalid token. |
403 | No token sent, or the dataset belongs to another account. |
404 | Learning, dataset or entry to replace not found in your account. |
409 | The learning is not in the status the action needs. Also TARGET_NOT_PROMOTABLE (the learning targets the avatar identity, not the knowledge base) and REPLACE_TARGET_NOT_CULPRIT, REPLACE_TARGET_DRIFTED or REPLACE_TARGET_ALREADY_DELETED for an invalid replaceChunkId. |
503 | Manager Learning is not enabled for your account. |