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

Durable agents and executions

A durable actor has an identity and recorded state that survive individual invocations. An execution is one invocation or runtime run; it can belong to an actor or stand alone. Duration does not determine durability. Existing sessions without explicit lifecycle attribution remain unclassified.
Open Durable agents in the dashboard to inspect an actor's current recorded state, active executions, open waits, and transition evidence. Executions also includes ephemeral invocations. Domain state, execution status, telemetry freshness, and collection coverage are separate fields: a sleeping actor can be waiting while its collection is stale.

Publish lifecycle evidence

Send version 1 lifecycle batches to POST /v1/agent-lifecycle-events with a workspace key carrying traces:write. The same contract is available at POST /api/v1/observability/agent-lifecycle-events. This is independent of version 1/2 session ingestion and does not require an open session or a swarm.
{ "version": 1, "project": "support", "environment": "production", "runtime": "state-machine", "source": "account-monitor", "events": [ { "id": "registration-1", "at": "2026-11-26T12:00:00Z", "producer": "monitor", "epoch": "1", "sequence": "0", "kind": "actor_registered", "actor": {"key": "account-monitor", "incarnation": "lifetime-1"}, "data": {"definition": "account-monitor", "definition_version": "v1"} } ] }
The server assigns an actor UUID within the credential's tenant and the declared project/environment/runtime/source scope. Keep the external key and incarnation stable through restarts. Use a fresh incarnation for a new lifetime. Never put account secrets or personal details in identifiers.
Each event has its original source ID, producer, epoch, decimal-string sequence, occurrence time, kind, and typed data. Actor and execution references depend on the event kind. Identifiers use the existing 1–128 character ASCII identifier vocabulary. Sequence counters are strings to preserve unsigned 64-bit precision. A request contains at most 256 events and 256 KiB; unknown or repeated fields are rejected.
An identical source event returns its original receipt. Reusing its scoped ID with changed content returns 409. Exporter restarts and alternate delivery paths preserve the original event content, epoch, sequence, and timestamp. A transport acknowledgement proves Halfspan stored the event; it is separate from the source's state-commit receipt.

Record transitions and waits

Use execution_started, execution_waiting, execution_resumed, and execution_finished for runtime lifecycle. An execution can have multiple waits; each resume references one wait ID. A completed invocation does not retire its actor. continued closes a run and identifies its successor without finishing the actor lifetime.
transition_attempted and transition_failed preserve function attempts. Only transition_committed advances domain state, carrying the function/version, branch, prior/next source state versions, state name/schema version, and source commit receipt. Publish committed transitions from a transactionally written outbox or retained runtime evidence after the source commits. A span ending or a function returning successfully does not establish durable commit.
state_snapshot provides explicit baseline/reconciliation evidence. branch_selected identifies the source-selected branch after a reset. Missing predecessors and competing successors remain incomplete or conflicting; timestamps do not choose the current state. State names and versions are retained as metadata. Full state payloads are not accepted by this contract.
Attach existing session/task/attempt evidence with execution_linked. Model/tool usage stays in the original traces and is not published a second time as lifecycle events. An unavailable, expired, or unshared trace remains unavailable when reached from an actor.

Export and recover

The SDK exports typed lifecycle builders, createLifecycleExporter, and a PostgreSQL outbox adapter. Best-effort mode has a bounded in-memory queue and reports backpressure without silently dropping observations. Recoverable mode drains a caller-owned durable outbox and acknowledges entries only after validating the API receipts. Insert the outbox entry in the same transaction as customer state. The generic exporter cannot make an independently written state change atomic.
The separate @halfspan/temporal integration maps retained Workflow history to executions and links continued runs. Its Workflow module contains deterministic helpers; credentials and network export remain outside the Workflow sandbox. Business transitions require an explicit recorder. A sink alone is best-effort telemetry because Temporal does not persist or retry sink calls. See the Temporal sink contract.
The Temporal recorder is an opt-in state declaration journal: its accepted Activity result is the source commit. Reconstruct Workflow state deterministically from those declarations. It does not prove an external database write or a later Workflow variable assignment. External state transactions use their own transactional outbox. The adapter reports reset branch selection as unknown when retained runtime evidence cannot prove which branch is authoritative.
Read actor and execution collections with traces:read at /v1/actors and /v1/executions, or under /api/v1/observability/. Actor detail and event history use /actors/{actor} and /actors/{actor}/events; execution detail uses /executions/{execution}. Execution route IDs are server UUIDs; the original runtime execution ID is returned separately. Pages return nextCursor; preserve the same filters when continuing.
Pages contain at most 100 records. Cursors hold a stable ingestion snapshot for 15 minutes and return 410 after expiry. Actor detail includes up to 100 executions and reports execution_history_partial; use /executions?actor_id={actor} for the complete catalog. Continue execution event history on the same detail endpoint with cursor. A tenant can retain 1,024 cursor snapshots within a 128 MiB aggregate budget, with 16 MiB maximum per snapshot. Identical unchanged snapshots are reused.

Retention and deletion

Actor lifecycle metadata is independently published evidence. Trace expiry and unsharing remove access to the linked trace; actor state can outlive it. Actor forgetting is a separate owner/admin action at POST /api/v1/observability/actors/{actor}/forget. It hides the lifetime immediately and prevents old registration/history exports from recreating it. Only explicit creation with a fresh incarnation can establish another lifetime.
Self-hosted operators must apply the telemetry migration with just db-migrate and grant the API database role access to the lifecycle tables and cursor sequence. Local setup includes these grants in infra/observability/local-role.sql. Collection quotas return backpressure rather than silently replacing incomplete evidence. The actor's response exposes the retained history start and collection coverage.
Journal detail expires after 30 days. Lossless metadata checkpoints and source identity receipts remain for the retained lifetime, so late evidence can still reveal gaps or conflicts. This initial implementation bounds each subject to 10,000 evidence records and 256 producer/epoch streams. A tenant can retain 10,000 actors, 10,000 executions, and 1,000,000 source receipts; forgotten lifetime fences count toward the identity limits. Exceeding a limit returns an atomic 429 response. Capacity planning must account for these lifetime limits; this release does not compact an arbitrarily long actor history into constant storage.