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

Build a typed Agent contract.

Generate, pin, register, and bind typed Agent schemas; construct the first-party OpenAI Responses and Anthropic Messages adapters; then cross the durable execution boundary deliberately.

Start with the compiled examples

Both examples construct real descriptors and schema registries. They do no network I/O and require no API key, so the workspace gate can compile and run them deterministically.

Shell · no credentials required
cargo run -p stateknot-runtime --example typed_agent
cargo run -p stateknot-integrations --example provider_adapters

Inspect the exact typed Agent source and provider adapter source before adapting them.

Freeze the contract before admission

The builder derives JSON Schema 2020-12 from the serialization contract of the input and the deserialization contract of the output. It canonicalizes both documents with RFC 8785, pins their SHA-256 digests, and registers the pair without exposing a half-installed registry.

Rust · typed boundary
let definition = AgentBuilder::<IncidentRequest, IncidentReport>::new(
    agent_metadata,
    input_schema_id,
    output_schema_id,
    model_descriptor,
    trusted_instructions,
    execution_limits,
)
.build()?;

let mut schemas = JsonSchemaRegistryBuilder::default();
schemas.register(provider_profile, provider_profile_document)?;
let schemas = definition.register_schemas(schemas)?.build()?;
let agent = definition.bind(Arc::new(schemas))?;

let request = agent.prepare_request(&input, request_budget_limits)?;

Binding is offline and fail-closed. Every Agent, Tool, and provider profile schema must already exist in the immutable registry. The selected provider profile must accept every model-visible schema before a request can reach durable admission.

Know the first adapter boundary

OpenAI Responses
Complete responses and true incremental SSE, text, JSON Schema output, generic JSON mode, function proposals, local schema validation, usage normalization, request-ID preservation, and lossless unary tool continuation with complete response.output replay.
DeepSeek Responses · checkout only
Complete text and JSON Schema responses with local output validation, cache-aware usage, and DeepSeek's final-answer phase. Streaming, tool replay, and reasoning summaries are not advertised. This binding is not in the previously published 0.1.0-alpha.1 crate; see the runnable Agent guide.
Anthropic Messages
Complete responses and true incremental SSE, text, JSON Schema-constrained output, tool proposals, local schema validation, cumulative usage normalization, request-ID preservation, and lossless unary assistant-content/tool-result continuation.
Shared transport controls
Attempt-scoped credentials, HTTPS outside literal-loopback tests, no redirects or hidden retries, bounded requests/responses/SSE, bounded backpressure, cooperative cancellation, monotonic deadlines, and public-safe diagnostics.

Current fail-closed restrictions

  • Use ModelTranscript for tool continuation. It binds complete provider replay evidence to ordered, committed tool outcomes and is revalidated before I/O. Legacy role=tool messages remain rejected because they cannot prove either provider-native ordering contract.
  • Artifact, multimodal, and extension-bearing requests are rejected before I/O by these text-only adapter versions.
  • Anthropic generic JSON mode is rejected; the binding requires a stable schema-constrained output contract.
  • Streaming is genuinely incremental. Bounded SSE events pass through ModelEventAccumulator, and truncated, duplicated, reordered, or substituted terminal data cannot become Completed. Tool-producing streams do not yet emit replay evidence, so the durable tool loop uses complete responses.

Cross the durable boundary explicitly

  1. Authenticate and freeze

    Select immutable Agent, Model, Tool, and schema snapshots.

  2. Admit

    Validate the typed request, resolve finite trusted budgets, assign tenant/run/thread/invocation identity, and atomically commit admission, the first event, and the initial checkpoint through DurableAgentAdmission.

  3. Execute and recover

    Claim with a lease/fence, run external attempts through DurableInvocationExecutor, and drive checkpoints through DurableAgentLoop.

  4. Decode

    Revalidate trusted provenance, request binding, accounting evidence, and the output schema before deserializing the terminal result.

Atomic admission is implemented; read the durable admission contract next, then use the implemented durable run/result boundary. The implemented provider-native Agent graph now assembles transcript, policy evidence, accounting, and cancellation lifecycle over durable invocations and the durable Agent Loop.

Run the focused evidence

Shell · typed and transport contracts
cargo test -p stateknot-runtime --test typed_agent --locked
cargo test -p stateknot-integrations --all-targets --locked

The adapter suite uses a real local TCP HTTP server. It exercises request shape, fragmented SSE, terminal cross-checks, 429 retry evidence, 5xx no-hidden-retry behavior, transcript replay order, tamper and cross-provider rejection, resource ceilings, deadline/cancellation precedence, and secret/debug redaction. The provider-native runtime suite separately verifies multi-turn recovery and exact cancellation on real PostgreSQL 16/17. Live-provider qualification and provider-drift cassettes have not shipped.