Docs · Start Overview Choose the right entry point and understand the pre-alpha boundary. Docs · Start Getting started Install the pinned toolchain and validate the repository locally. Docs · Start Core contract examples Compile the first Agent, typed Tool, Model stream, and explicit protocol mapping without runtime dependencies. Docs · Start Typed Agent Generate and pin typed schemas, then bind the first-party OpenAI and Anthropic adapters. Docs · Start In-process Agent Run a typed Agent without HTTP while preserving PostgreSQL durability, authorization, recovery, and owned roles. Docs · Start Durable admission Atomically commit authenticated intent, database time, the first event, and the initial checkpoint. Docs · Start Durable runs and results Submit with a durable ingress key, recover the original run, and read a verified public result. Docs · Understand Compile a graph Build a schema-pinned graph, validate its topology, and freeze its canonical digest. Docs · Understand Subgraphs and loops Compose shared-state subgraphs, finite loops, and explicit recovery-safe return paths. Docs · Understand Skill composition Choose capability bundles, shared-state subgraphs, durable child runs, and guarded MCP Skills without creating a second runtime. Docs · Understand Durability model Learn how journal, checkpoint, lease, fence, and recovery evidence fit together. Docs · Understand Durable Graph runtime Register exact executable code, replay noninitial state, and drive deterministic bounded sibling batches under one fence. Docs · Understand Durable Agent Loop Commit lifecycle handoffs and execute one tenant-scoped durable scheduling quantum. Docs · Understand Durable invocations Execute exact model and tool attempts with durable starts, staged ordered Tool coordination, streaming validation, and no-dispatch terminal recovery. Docs · Understand Provider-native Agent Compile and operate the durable multi-turn graph with bounded output repair, ordered parallel read-only Tools, write barriers, policy, accounting, and cancellation evidence. Docs · Integrate Local Rust Tools Generate digest-pinned schemas, register typed local code, and preserve the durable invocation boundary. Docs · Integrate AgentService v1 Authorize and expose exact durable Agent revisions through the versioned embedding boundary. Docs · Integrate Agent HTTP v1 Submit, recover, read and cancel through authenticated bounded JSON HTTP. Docs · Integrate General MCP Tool client Discover and call bounded stateless MCP 2026-07-28 Tools with JSON/SSE, OAuth, custom headers, and mediated MRTR. Docs · Integrate MCP OAuth client Bind one MCP resource to challenge-driven discovery, PKCE, issuer validation, durable credentials, and bounded replay. Docs · Integrate MCP Remote Tool Bind one strict stateless MCP 2026-07-28 Tool with pinned identity, schemas, durable dispatch, and reconciliation. Docs · Integrate MCP Server profile Expose bounded Tools, Resources, Prompts, Completion, and MRTR behind the strict stateless production boundary. Docs · Integrate MCP Skills Publish and activate Final SEP-2640 static Skills with immutable manifests, origin-scoped approval, and verified lazy reads. Docs · Integrate MCP conformance status See the frozen official runner inventory, implemented evidence, and exact boundary of current MCP claims. Docs · Integrate A2A 1.0 Client Discover and pin one agent, call all eleven operations, and reconcile durable unknown sends only through attested remote guarantees. Docs · Integrate Durable artifact storage Materialize terminal A2A parts into immutable PostgreSQL metadata and private integrity-checked object bytes. Docs · Integrate A2A 1.0 Server Expose bounded HTTP+JSON and JSON-RPC/SSE through identity-first policy and a durable service contract. Docs · Integrate A2A conformance status Inspect the frozen official TCK, audited harness patch, exact result, and server-only claim boundary. Docs · Operate Fair scheduling Configure replica-safe weighted tenant selection, exact starvation bounds, rollout, and retention. Docs · Operate PostgreSQL provider Configure, migrate, verify, and test the implemented durability provider. Docs · Operate Host qualification Record bounded capacity, recovery and fault evidence without turning CI into a production SLO claim. Docs · Project Versioning and releases Pin the public alpha exactly and understand compatibility, MSRV, durable-data, and release gates. Docs · Project Implementation status See what is implemented, in progress, and deliberately not claimed. Home Architecture map What exists, what is active, and what remains planned. Home Current cut Implemented slices and explicit gaps. Home Roadmap The path from contracts to a qualified v1. Repository Source code StateKnot/StateKnot on GitHub. Repository RFCs Draft architecture and durable execution contracts. Repository Security policy Private vulnerability reporting and support policy.
↑↓ navigate ↵ open 39 results

Pre-alpha documentation

Dispatch each model and tool attempt at most once.

Freeze exact providers, admit trusted budgets, commit starts before external I/O, validate streams, preserve tool ambiguity, and recover terminal writes without redispatch.

Freeze exact providers before work is claimed

Registries are immutable startup snapshots keyed by exact owner/name/version capability identity. Resolution compares the full durable descriptor with both the startup snapshot and the live provider. Aliases, family names, endpoint fallback, and mutable routing never enter recovery authority.

Rust · startup registration
let mut models = ModelProviderRegistryBuilder::new();
models.register(model_adapter)?;

let mut tools = ToolProviderRegistryBuilder::new();
tools.register(tool_adapter)?;

let mut schemas = JsonSchemaRegistryBuilder::with_default_limits();
register_standard_invocation_execution_event_schema(&mut schemas)?;
register_application_schemas(&mut schemas)?;

let executor = DurableInvocationExecutor::new(
    store,
    schemas.build()?,
    models.build(),
    tools.build(),
    budget_provider,
    DurableInvocationExecutorOptions::default(),
)?;

The budget provider reloads immutable run provenance and cumulative durable usage. The executor never accepts remaining capacity authored by an untrusted caller.

A fresh durable start is dispatch authority

  1. Validate

    Check fence scope, ledger state, exact provider, budget, deadline, and input contract.

  2. Commit

    Append the stable start event and move the exact invocation to executing in one fenced transaction.

  3. Dispatch

    Call external code only after a fresh Committed result. An idempotent start returns Recovered without I/O.

  4. Validate and finish

    Validate complete provider evidence, then commit the stable terminal event against the exact invocation head.

No database transaction remains open during model or tool execution. Reusing the handoff after a lost acknowledgement cannot dispatch the same physical attempt twice.

Stage Tool I/O when order must outlive timing

Ordinary callers use execute_tool. A trusted bounded coordinator can call start_tool_attempt, consume only a fresh ToolDispatchHandoff through dispatch_started_tool, and later pass the retained ToolTerminalCommitHandoff to commit_tool_terminal. Duplicate starts return Recovered and forbid provider I/O.

This three-stage path lets read-only provider calls overlap while starts and terminal facts remain serial and semantic. It does not authorize parallel writes. The coordinator must bound retained payloads, settle every started call, and abort child tasks with its owner; dropping a dispatch handoff leaves visible Executing evidence, never implicit redispatch authority.

Streaming requires a durable sink

A streaming model handoff must contain a ModelEventSink. The runtime validates and accumulates every semantic event, waits for ordered sink acceptance, and requires a valid terminal stream event. The sink must durably deduplicate by (attempt_id, sequence) before exposing data externally.

The accumulated response is authoritative only after its separate terminal ledger commit. Invalid sequence, incomplete EOF, sink failure, cancellation, or deadline becomes public-safe error evidence.

A stopped write is an unknown outcome

Read-only cancellation and timeout have a known no-write boundary. A write may already have changed an external system when its local future stops, so the executor records AmbiguousExternalOutcome, ToolExternalEffect::Unknown, and RetryAdvice::ReconcileFirst. It never converts uncertainty into a blind tool retry.

Resolve unknown attempts from authoritative evidence

ToolReconciliationHandoff::result and ::error accept evidence only for the exact Unknown invocation and physical attempt. Result evidence must pass the frozen local output schema before any database mutation. The commit appends a distinct audit event and advances the ledger atomically under the live fence without provider lookup or Tool I/O.

Rust · no-dispatch Tool reconciliation
let reconciliation = ToolReconciliationHandoff::result(
    live_fence,
    unknown_invocation,
    reconciliation_event_id,
    authoritative_result,
)?;

match executor.commit_tool_reconciliation(reconciliation).await? {
    ToolReconciliationOutcome::Committed { .. } => acknowledge(),
    ToolReconciliationOutcome::Idempotent { .. } => acknowledge(),
}

Exact event retries converge idempotently. Persistence failures retain the evidence handoff; ownership changes allow only a same-run live-fence rebind. A network-facing service must add authorization and evidence-source policy before exposing this trusted worker/operations boundary.

A provider can instead implement the reconciliation SPI and advertise the matching status-query capability. reconcile_tool performs one deadline- and cancellation-bounded probe for the original attempt. A result or authoritative error uses the same atomic commit path; Pending performs no mutation and must become a durable delayed retry.

Rust · provider-backed reconciliation
let probe = ToolReconciliationAttemptHandoff::new(
    live_fence,
    unknown_invocation,
    stable_reconciliation_event_id,
    cancellation,
)?;

match executor.reconcile_tool(probe).await? {
    ToolReconciliationAttemptOutcome::Resolved { invocation, .. } => {
        continue_from(invocation)
    }
    ToolReconciliationAttemptOutcome::Pending { retry_after, .. } => {
        persist_delayed_retry(retry_after)
    }
}

The default provider implementation fails closed. Startup rejects a provider that claims reconciliation while its frozen descriptor omits a status query. The inverse remains valid for an explicitly manual reconciler.

Retain terminal evidence, not another call

If external I/O completes but terminal persistence cannot be confirmed, the error owns a payload-redacted recovery handoff. Retry it only through commit_model_terminal or commit_tool_terminal; those methods perform no provider I/O. If ownership changed, rebind the same-run handoff to the current live fence and let PostgreSQL perform the authoritative check.

Rust · no-dispatch terminal recovery
match executor.execute_model(handoff).await {
    Ok(outcome) => consume(outcome),
    Err(ModelAttemptExecutionError::Terminal(error)) => {
        let recovery = error.into_recovery();
        retry_without_provider_io(recovery).await?;
    }
    Err(error) => handle_pre_dispatch_failure(error),
}

Publish only correlation evidence

Install the standard schema through its registration function. Its stable identity is https://stknot.com/schemas/runtime/invocation-execution-event/1.0.0. The eight closed operations expose only binding kind, invocation ID, attempt ID, and intent digest—never prompts, arguments, outputs, errors, endpoints, or credentials.

Qualification evidence

PostgreSQL 16/17 tests cover terminal commit after lease takeover without redispatch or budget re-evaluation, an ordered seven-event durable model stream with duplicate suppression, and timed-out idempotent writes that reconcile to either a validated result or authoritative error. A combined real PostgreSQL and loopback MCP test proves durable state before network completion, a lost response, Unknown, no redispatch, exact reconciliation replay, and one physical call. A separate PostgreSQL plus loopback A2A test proves durable state before send, lost-response Unknown, and duplicate no-redispatch. Read the complete integration and operations contract before adopting this pre-alpha surface.