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

Share session events

/api/v1/observability/agent-sessionsPOST
Requires traces:write. The credential selects the workspace. Errors use a JSON error string; see Errors and limits.
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.
Request Bodyapplication/jsonrequired
version *1 | 2
session *string (uuid)
segment *"coding" | "managed" | "business"
title?string
At most 4,096 UTF-8 bytes; no NUL. Trimmed; a nonempty value updates the session title.
events *object[]
Min items: 1Max items: 256
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
swarm?object
Show properties
id *string (uuid)
project *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
environment *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
title?string
At most 512 UTF-8 bytes; no NUL.
budget_usd_micros?integer
Min: 0Max: 9007199254740991
mission?object
Legacy alias for swarm. Supply only one envelope field.
Show properties
id *string (uuid)
project *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
environment *string
Pattern: ^[a-zA-Z0-9._:@/-]{1,128}$Max length: 128
title?string
At most 512 UTF-8 bytes; no NUL.
budget_usd_micros?integer
Min: 0Max: 9007199254740991
Response
200 · Success
inserted *integer
Min: 0
total *integer
Min: 0
400 · Invalid request
error *string
401 · Missing or invalid credential
error *string
403 · Required scope or sharer permission denied
error *string
409 · Existing session or event conflicts with this batch
error *string
410 · Session removed, unshared or expired
error *string
413 · Request body exceeds the size limit
error *string
429 · Swarm ingestion rate limit exceeded
error *string
503 · Storage or credential verification temporarily unavailable
error *string
Request example
curl -X POST "https://app.halfspan.com/api/v1/observability/agent-sessions" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{ "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 } } ] }'
Response example
{ "inserted": 1, "total": 1 }