Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Read a session

/api/v1/observability/agent-sessions/{session}GET
Read retained events ordered by timestamp, then ID. Use agent for one agent’s trace and at for a historical cutoff. The response includes all matching events without pagination. Read scope grants workspace-wide access, including other sharers. The response version is always 1, including sessions with swarm events. Missing, removed, expired and unshared sessions return 404.
Requires traces:read. The credential selects the workspace. Errors use a JSON error string; see Errors and limits.
The full response also includes businessTasks (an array, empty for non-business sessions), findings (derived evidence-backed findings), and signals (aggregated task, attempt, usage, outcome, and signal coverage metrics). events, businessTasks, findings, and signals reflect the selected agent and time. title is always a string on this endpoint, including an empty string when unset.
Keys with traces:read can read sessions across their workspace, including sessions created by another sharer. Missing, removed, unshared, and expired sessions return 404 with {"error":"Session unavailable"}.
Authorization
ApiKey *Bearer <token>
Workspace API key. Create a key with the scope named by the operation. API keys use separate sharer identities; replacement keys do not inherit sharing ownership.
Query Parameters
agent?string
Show events attributed to this agent. Include session-only entries when the session has a single known agent at the selected time.
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
at?string (date-time)
Include events through this timestamp. For timed operations, use the recorded end time.
Response
200 · Success
version *1
session *string (uuid)
segment *"coding" | "managed" | "business"
title *string
events *object[]
Show item properties
id *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
task *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
attempt *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
at *string (date-time)
observation *object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object
A validated observation. Closed field sets vary by kind. Segment-specific outcomes and cross-field rules are enforced by the server. Code attribution is documented at /api/code-attribution/.
Show options
One of:
Option 1
kind *"otel_span"
span *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
parent?"root" | "unknown" | object
Show options
One of:
Option 1
Type: "root" | "unknown"
Option 2
span *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
end_at?string (date-time) | null
links *string[]
Max items: 32
mapping *"halfspan.otlp.v1"
Option 2
kind *"query"
query_id *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
parent_query_id?string | null
Option 3
kind *"response"
response_id *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
query_id *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
Option 4
kind *"prompt_exposure"
query_id *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
prompt_id *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
prompt_version *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
Option 5
kind *"user_feedback"
target_event_id *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
dimension *"helpfulness" | "correctness" | "intent_match"
value *"positive" | "negative" | "neutral"
reason_code *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
source *"customer_runtime"
Option 6
kind *"behavior_signal"
target_event_id *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
definition_id *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
definition_version *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
assessment *"positive" | "negative" | "neutral" | "unknown"
source *"customer_runtime" | "halfspan"
evidence_event_id *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
evaluator_version?string | null
evaluation_status?"assessed" | "unavailable" | "not_applicable" | null
reason_code?string | null
evidence_event_ids?string[] | null
Option 7
kind *"signal_review"
target_event_id *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
state *"confirmed" | "dismissed" | "corrected"
assessment *"positive" | "negative" | "neutral" | "unknown"
reason_code *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
reviewer_user_id?string | null
Option 8
kind *"code_attribution"
record *object
Agent Trace attribution format, CC BY 4.0. https://agent-trace.dev/. Extension fields inside the record are preserved. See /api/code-attribution/.
Show properties
version *"0.1" | "0.1.0"
id *string (uuid)
Min length: 36Max length: 36
timestamp *string (date-time)
files *object[]
vcs?object
tool?object
metadata?object
Option 9
kind *"attempt_started"
Option 10
kind *"retry"
previous_attempt *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
Option 11
kind *"span"
span *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
parent?"root" | "unknown" | object
Show options
One of:
Option 1
Type: "root" | "unknown"
Option 2
span *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
tool *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
Option 12
kind *"checkpoint"
artifact *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
Option 13
kind *"resume"
checkpoint *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
failed *boolean
Option 14
kind *"approval_waiting"
Option 15
kind *"artifact_accepted"
artifact *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
version *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
owner *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
receipt *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
Option 16
kind *"usage"
input_tokens *integer
Min: 0Max: 18446744073709552000
output_tokens *integer
Min: 0Max: 18446744073709552000
usd_micros?integer | null
purpose?"work" | "coordination" | "compaction"
Option 17
kind *"outcome"
result *"required_checks_passed" | "customer_resolved" | "deliverable_accepted" | "failed"
receipt *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
Option 18
kind *"release"
revision *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
Option 19
kind *"context"
key *"repository" | "worktree" | "model" | "harness" | "instructions" | "ci" | "owner"
value *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
Option 20
kind *"tool_receipt"
operation *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
reference *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
state *"pending" | "settled" | "failed"
Option 21
kind *"proxy_evidence"
stage *"received" | "proposed" | "reviewed" | "permitted" | "dispatched" | "denied" | "response_observed"
request?string (uuid) | null
linked_session?boolean | null
turn?string (uuid) | null
permit?string (uuid) | null
dispatch?string (uuid) | null
decision?"ALLOW" | "PAUSE" | "TERMINATE" | null
status?integer | null
Option 22
kind *"user_prompt"
text *string
Nonblank; at most 32,768 UTF-8 bytes without NUL.
Min length: 1
Option 23
kind *"compaction"
Option 24
kind *"agent_response"
text *string
Nonblank; at most 32,768 UTF-8 bytes without NUL.
Min length: 1
Option 25
kind *"reasoning_summary"
text *string
Nonblank; at most 4,096 UTF-8 bytes without NUL.
Min length: 1
Option 26
kind *"application_log"
code *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
severity *"info" | "warning" | "error"
capture?"references" | "redacted" | "omitted"
body?string
At most 4,096 UTF-8 bytes without NUL. Requires capture=redacted; redact before export.
severity_number?integer
Min: 0Max: 24
severity_text?string
Pattern: ^[a-zA-Z0-9_.: -]{1,64}$
route?string
Instrumented route template; must not contain //.
Max length: 256
Option 27
kind *"destination_write"
artifact *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
version *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
destination *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
receipt *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
Option 28
kind *"coverage_loss"
reason *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
count *integer
Min: 0Max: 18446744073709552000
Option 29
kind *"mission_started"
Option 30
kind *"mission_outcome"
result *"succeeded" | "failed" | "cancelled"
receipt *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
Option 31
kind *"agent_started"
role *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
harness *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
harness_version?string | null
model?string | null
config_version?string | null
Option 32
kind *"agent_observed"
harness *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
parent_session *string (uuid)
name?string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
role?string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
path?string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
Option 33
kind *"agent_finished"
receipt *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
Option 34
kind *"task_delegated"
assignee *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
Option 35
kind *"artifact_produced"
artifact *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
version *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
digest *string
Pattern: ^[a-f0-9]{64}$
capture?"references" | "redacted" | "omitted" | null
preview?string | null
object_ref?string | null
Option 36
kind *"artifact_consumed"
artifact *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
version *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
expected_version?string | null
Option 37
kind *"context_manifest"
manifest *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
capture *"references" | "redacted" | "omitted"
artifacts?object[] | null
Option 38
kind *"handoff_sent"
correlation *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
sender *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
recipient *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
context?string | null
capture?"references" | "redacted" | "omitted"
body?string
At most 4,096 UTF-8 bytes without NUL. Requires capture=redacted; redact before export.
Option 39
kind *"handoff_received"
correlation *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
sender *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
recipient *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
context?string | null
capture?"references" | "redacted" | "omitted"
body?string
At most 4,096 UTF-8 bytes without NUL. Requires capture=redacted; redact before export.
Option 40
kind *"handoff_consumed"
correlation *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
sender *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
recipient *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
context?string | null
capture?"references" | "redacted" | "omitted"
body?string
At most 4,096 UTF-8 bytes without NUL. Requires capture=redacted; redact before export.
Option 41
kind *"execution"
operation *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
activity?"model" | "tool" | "coordination" | "compaction" | "idle"
Option 42
kind *"wait"
reason *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
activity?"model" | "tool" | "coordination" | "compaction" | "idle"
Option 43
kind *"swarm_started"
Option 44
kind *"swarm_outcome"
result *"succeeded" | "failed" | "cancelled"
receipt *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
Option 45
kind *"evaluation"
suite *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
suite_version *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
evaluator *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
evaluator_version *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
evaluator_kind *"agent" | "external" | "human"
revision *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
baseline_revision?string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
result *"passed" | "failed" | "improved" | "regressed" | "unchanged"
receipt *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
Option 46
kind *"delivery"
change *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
revision *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
stage *"opened" | "review_requested" | "approved" | "changes_requested" | "merge_attempted" | "merged" | "conflicted" | "reverted"
receipt *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
coordination?object
Show properties
agent *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
producer *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
sequence *integer
Min: 0Max: 9007199254740991
links?object[]
Max items: 32
Show item properties
kind *"spawned" | "delegated" | "sent" | "received" | "consumed" | "produced" | "retried" | "joined" | "cancelled" | "corrected"
session *string (uuid)
event *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
wait_for_end?boolean
trace_id?string
Nonzero trace ID. Supply together with span_id.
Pattern: ^[a-fA-F0-9]{32}$
span_id?string
Nonzero span ID. Supply together with trace_id.
Pattern: ^[a-fA-F0-9]{16}$
end_at?string (date-time)
Must be at or after the event timestamp.
source_id?string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
businessTasks *object[]
Show item properties
task *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
state *string
owner *string | null
artifact *string | null
acceptedVersion *string | null
destination *string | null
destinationReceipt *string | null
evidence *string[]
findings *object[]
Show item properties
rule *string
version *1
assessment *string
suggestion *string
evidence *string[]
signals *object
Show properties
terminalTasksWithOutcomes *integer
Min: 0
everObservedSuccesses *integer
Min: 0
signalCoverage *object
Show properties
assessedEvents *integer
Min: 0
unavailableEvents *integer
Min: 0
notApplicableEvents *integer
Min: 0
queries *integer
Min: 0
responses *integer
Min: 0
feedbackEvents *integer
Min: 0
feedbackTargets *integer
Min: 0
behaviorEvents *integer
Min: 0
assessedTargets *integer
Min: 0
feedback *object
Show properties
positive *integer
Min: 0
negative *integer
Min: 0
neutral *integer
Min: 0
unknown *integer
Min: 0
behavior *object
Show properties
positive *integer
Min: 0
negative *integer
Min: 0
neutral *integer
Min: 0
unknown *integer
Min: 0
reviews *integer
Min: 0
tasks *integer
Min: 0
verifiedSuccesses *integer
Min: 0
tasksWithOutcomes *integer
Min: 0
retries *integer
Min: 0
failedResumes *integer
Min: 0
approvalWaits *integer
Min: 0
knownMaxToolDepth *integer | null
unknownToolDepths *integer
Min: 0
maxObservedChildren *integer
Min: 0
usageRecords *integer
Min: 0
pricedUsage *integer
Min: 0
attempts *integer
Min: 0
attemptsWithUsage *integer
Min: 0
observedUsdMicros *integer | null
usdMicrosPerSuccess *number | null
400 · Invalid request
error *string
401 · Missing or invalid credential
error *string
403 · Required scope or sharer permission denied
error *string
404 · Requested evidence unavailable
error *string
503 · Storage or credential verification temporarily unavailable
error *string
Request example
curl -X GET "https://app.halfspan.com/api/v1/observability/agent-sessions/<session>" \ -H "Authorization: Bearer <token>"
Response example
{ "version": 1, "session": "adbf491d-15fe-4bc7-b23b-cea21fdd8751", "segment": "coding", "title": "Fix checkout validation", "events": [ { "id": "usage-1", "task": "checkout", "attempt": "attempt-1", "at": "2026-11-25T15:00:00Z", "observation": { "kind": "usage", "input_tokens": 1200, "output_tokens": 300, "usd_micros": 4500 } } ], "businessTasks": [], "findings": [], "signals": { "terminalTasksWithOutcomes": 0, "everObservedSuccesses": 0, "signalCoverage": { "assessedEvents": 0, "unavailableEvents": 0, "notApplicableEvents": 0, "queries": 0, "responses": 0, "feedbackEvents": 0, "feedbackTargets": 0, "behaviorEvents": 0, "assessedTargets": 0, "feedback": { "positive": 0, "negative": 0, "neutral": 0, "unknown": 0 }, "behavior": { "positive": 0, "negative": 0, "neutral": 0, "unknown": 0 }, "reviews": 0 }, "tasks": 1, "verifiedSuccesses": 0, "tasksWithOutcomes": 0, "retries": 0, "failedResumes": 0, "approvalWaits": 0, "knownMaxToolDepth": null, "unknownToolDepths": 0, "maxObservedChildren": 0, "usageRecords": 1, "pricedUsage": 1, "attempts": 1, "attemptsWithUsage": 1, "observedUsdMicros": 4500, "usdMicrosPerSuccess": null } }