Skip to content
Select themeSelect language

`GET /api/intelligence/outcomes` — task outcome telemetry for the workspace.

GET
/api/intelligence/outcomes
curl --request GET \
--url https://example.com/api/intelligence/outcomes
Media typeapplication/json
Array<object>
object
agent_profile_id
string | null format: uuid
agent_profile_version
integer | null format: int32
agent_type
required
string
closeout_signals

#712 — deterministic “docs touched” signals for the closeout doc steps (mig 283, nullable JSONB). None = not computed (a pre-283 row, a non-coding run, or until the runner reports changed paths). Once a run’s diff is matched against the resolved globs: {"project_docs_touched": bool, "user_docs_touched": bool} — a key is present only when its step was enabled for the run. #[serde(default)] keeps any non-SELECT * path readable.

completion_signal

How the run terminated (the L1 reward-verification signal). None until the outcome arm records it.

string | null
cost_usd
number | null format: double
created_at
required
string format: date-time
derived_from_backfill
required
boolean
effort_level

ADR 0045 Stage 2b — L0 attribution axes (mig 212). effort_level/harness segment the reward distribution; harness is set = agent_type at identity time but kept distinct so ‘debate’/‘app_builder’ don’t contaminate the coding reward dist. runner_id attributes the run to its fleet runner. All nullable → #[serde(default)] keeps pre-Stage-2 rows (+ any non-SELECT * path) readable.

string | null
harness
string | null
input_tokens

Token usage for the task (mig 207), persisted from the agent_completed payload. Surfaced on the wire so /reports/usage (#519 #9) can total input→output tokens per profile/provider, mirroring the runs/tasks board cost column. #[serde(default)] keeps any non-SELECT * path readable; a non-metered / pre-mig-207 run stays None.

integer | null format: int64
intervention_count
required
integer format: int32
lines_added

Lines added/removed by the task’s git diff (mig 252), persisted from the agent_completed payload (git diff --numstat). NULL for a pre-mig-252 row, a non-coding run, or until the runner image ships the diff stat. #[serde(default)] keeps any non-SELECT * path readable.

integer | null format: int32
lines_removed
integer | null format: int32
model
string | null
output_tokens
integer | null format: int64
pr_closed_unmerged_at
string | null format: date-time
pr_created_at
string | null format: date-time
pr_merged_at
string | null format: date-time
pr_provider
string | null
pr_url
string | null
project_id
string | null format: uuid
runner_id
string | null format: uuid
summary

The task’s final result text — the last agent_message event’s text, captured on agent_completed. ADR 0019 step I/O contract: the most-used output as a first-class field, referenceable as ${{ steps.<key>.summary }}.

string | null
task_id
required
string format: uuid
task_type
required

Segmentation enum, NOT NULL DEFAULT 'coding' (mig 212 CHECK: coding|review|research|ops|docs|debate). The English wire form; the UI renders via Paraglide.

string
updated_at
required
string format: date-time
workspace_id
required
string format: uuid
Examplegenerated
[
{
"agent_profile_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"agent_profile_version": 1,
"agent_type": "example",
"closeout_signals": "example",
"completion_signal": "example",
"cost_usd": 1,
"created_at": "2026-04-15T12:00:00Z",
"derived_from_backfill": true,
"effort_level": "example",
"harness": "example",
"input_tokens": 1,
"intervention_count": 1,
"lines_added": 1,
"lines_removed": 1,
"model": "example",
"output_tokens": 1,
"pr_closed_unmerged_at": "2026-04-15T12:00:00Z",
"pr_created_at": "2026-04-15T12:00:00Z",
"pr_merged_at": "2026-04-15T12:00:00Z",
"pr_provider": "example",
"pr_url": "example",
"project_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"runner_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"summary": "example",
"task_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"task_type": "example",
"updated_at": "2026-04-15T12:00:00Z",
"workspace_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}
]