Workflows
Workflows sort your organization’s chats by the job they do, so you can filter evaluations, traces and analytics to one kind of work.
An Evals workflow is a kind of work your people do with agents, such as refund requests or quarterly reporting. Context files each chat into the Evals workflows it matches, up to five per chat, and you can then narrow evaluations, monitors, datasets, traces and analytics to one of them.
Evals workflows are off until your administrator turns them on for your organization. Only organization owners and admins can open the Workflows pages in the app or list Evals workflows from the CLI. Other people still see their names on their tasks, evaluations and datasets.
Set up Evals workflows in the app
Open Evals > Workflows. The curation pages have four tabs:
| Tab | What you do there |
|---|---|
| Suggestions | Approve or reject workflows that Context proposes as it reads your chats. |
| Workflow Taxonomy | Track a workflow by hand, or rename, merge or archive one. |
| Unclassified | Chats that matched no workflow. Move them into a workflow, or make a new workflow from them. |
| Review | Check a sample of matches and say whether each chat belongs to its workflow. |
Open one Evals workflow to see its usage, evaluations, datasets, targets and traces. On the Targets tab, add an agent, skill or applet, and every chat that uses it is filed into the Evals workflow. Its cost and usage are on its Usage tab.
Find an Evals workflow’s ID
Code
This command needs monitoring turned on as well as Evals workflows, an organization owner or admin, and a key with evals:write (a read-only key is refused). evals monitors list --workflow needs the same. Without monitoring, take the ID from the Evals workflow’s address in the app instead: it is the last part of /client/evals/workflows/t/<workflow-id>.
Filter by Evals workflow in the CLI
--workflow <id> narrows these commands to one Evals workflow:
Code
traces list returns the sessions whose chat is in the Evals workflow now. While Evals workflows are off, it lists nothing and exits 0, so an empty list there doesn’t mean there were no sessions. datasets list and benchmark list are refused instead.
Filter by Evals workflow over HTTP
GET /analytics/records, GET /analytics/overview and GET /analytics/records/export take workflowIds: a record matches when its chat is in any of the Evals workflows you name, up to 50. Send the IDs as a JSON list in one value, or repeat the key once per ID. A single plain value is refused with 400.
If the Evals workflow filter can’t be applied, the server answers 503 rather than return records from outside the Evals workflow. Try again, or drop the filter.
Responses name Evals workflows too:
| Field | Where | What it holds |
|---|---|---|
workflows | Each analytics record | [{id, label}]. [] means the chat is in no Evals workflow; null means its Evals workflows couldn’t be read. |
workflows | Each trace session | state is loaded (with workflows: [{topicId, name}], most confident first), unavailable, or withheld when Evals workflows are off or your key can’t see them. |
topicId | Each run | The Evals workflow the run was started from, or null. |