Concepts
How nvoken works
Admission freezes behavior, memory, continuity, actor, limits, and authorization before durable execution begins.
One successful Turn start means nvoken has durably accepted the work. The runtime resolves every execution coordinate once, in one admission transaction:
- the exact Agent revision or inline behavior;
- the tenant and optional actor user;
- an optional MemorySpace;
- an optional Conversation;
- narrowed limits, provider credentials, authorization, and idempotency;
- one immutable effective-behavior snapshot owned by the Turn.
Only then is work queued. Execution never follows an Agent's mutable current
pointer, so publishing a new revision cannot alter a queued or running Turn.
Admission is recoverable
The HTTP API accepts work with POST /v1/turns and returns 202. The
TypeScript facade exposes the same boundary through agent.start() or
client.inline(...).start().
Give every logical start a stable idempotency key. If a response is lost, retry the exact request or recover by the returned Turn ID. A client timeout proves only that the caller stopped waiting; it does not prove admission failed and it does not cancel the Turn.
Stored and inline behavior share one execution path
Use an Agent when behavior should be stored, named, versioned, and reused. Use
client.inline(...) when behavior belongs to one call site. Both become the
same immutable effective behavior before execution begins.
const runner = client.inline({
instructions: "Classify the request.",
model: "anthropic/claude-sonnet-5",
});
const result = await runner.run("I was charged twice.", { tenant: "acme" });Postgres is the execution authority
Turn status, claims, leases, checkpoints, tool waits, transcript watermarks,
and settlement are durable. Streaming is a view of that state, not the owner of
it. Reconnect a stream or read /v1/turns/{turn_id}/result to reconcile.