Get an outcome
Returns the current state of one outcome by its key: status, the goal it is working toward, deterministic progress, the success condition annotated with live state, every signal it has observed, and the model scores. Built for an agent reading its own progress mid-task.
GET /v1/outcomes/{key} is scoped to your account. An unknown key returns 404 OUTCOME_NOT_FOUND.
Example
curl https://api.thewitn.com/v1/outcomes/support:ticket:1001 \
-H "Authorization: Bearer $WITN_API_KEY"{
"key": "support:ticket:1001",
"status": "OPEN",
"goal": "Resolve the customer's billing ticket and confirm satisfaction",
"progress": 0.6,
"settles_at": "2024-01-18T14:00:00Z",
"condition": "✓ticket_open AND ✓COUNT(agent_response)>=2[3] AND ~NOT escalated AND ((✗customer_csat_set AND ✗customer_csat>4[unset]) OR ✗IDLE(1d)[23h])",
"observations": {
"ticket_open": { "count": 1, "last_value": null, "last_at": "2024-01-17T13:41:02Z" },
"agent_response": { "count": 3, "last_value": null, "last_at": "2024-01-17T14:05:11Z" },
"kb_article_sent":{ "count": 2, "last_value": "A-233", "last_at": "2024-01-17T13:58:30Z" }
},
"scores": {
"trajectory": 0.72,
"anomaly": 0.08,
"novelty": 0.31
}
}Fields
| Field | Meaning |
|---|---|
status | OPEN, CONFIRMED, or FAILED. |
goal | The task goal snapshotted when the outcome was created. Nullable. |
progress | Deterministic condition completion, 0 to 1. |
settles_at | When the monitor next forces a verdict. Nullable. |
condition | The success condition rendered as a compact annotated expression. |
observations | Every distinct action seen, whether or not it appears in the condition. |
scores | Model outputs. Each is nullable when the outcome has not been scored. |
Reading the condition
condition is the outcome's own condition language on one line, with each term carrying a state glyph and its current value in brackets. It keeps the AND/OR/NOT structure and the temporal operators (IDLE, G, F) so you can reason about what is left to do.
| Glyph | State |
|---|---|
✓ | Locked true. This term is done and cannot change. |
~ | True now, but not locked. Keep it that way, for example ~NOT escalated. |
✗ | Not met yet, still reachable. Act on this. |
⊘ | Unsatisfiable. This term can no longer become true. |
Brackets show the live value: COUNT(agent_response)>=2[3] has counted three, customer_csat>4[unset] has no value yet, and IDLE(1d)[23h] has 23 hours left on its window.
Observations
Each entry rolls up one action across every event submitted for the outcome:
| Field | Meaning |
|---|---|
count | Number of events with that action. |
last_value | The most recent properties.value, or null if none carried one. |
last_at | Timestamp of the most recent event with that action. |
Actions that are not part of the condition appear here too, so this is the full picture of what the agent has done.
Errors
| Code | Status | When |
|---|---|---|
TOKEN_INVALID | 401 | The token is missing or not recognised. |
OUTCOME_NOT_FOUND | 404 | No outcome with that key exists for your account. |