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

Run one durable Agent scheduling quantum.

Bind the Graph Driver, atomic lifecycle coordination, trusted evidence, and tenant-scoped scheduling without weakening fencing or lost-ack recovery.

Assemble one immutable worker deployment

Install all three standard Driver, lifecycle, and cancellation audit schemas plus every application binding before work can be claimed. DurableTenantScheduler constructs its DurableAgentLoop internally, so Driver and lifecycle coordination share one store and one frozen executable registry.

Rust · startup binding
let mut schemas = JsonSchemaRegistryBuilder::with_default_limits();
register_standard_graph_driver_event_schema(&mut schemas)?;
register_standard_graph_lifecycle_event_schema(&mut schemas)?;
register_standard_agent_cancellation_event_schema(&mut schemas)?;
register_application_schemas(&mut schemas)?;

let mut executables = ExecutableGraphRegistryBuilder::new(schemas.build()?);
register_release_graphs_reducers_and_nodes(&mut executables)?;

let scheduler = DurableTenantScheduler::new(
    store,
    executables.build()?,
    Arc::new(application_lifecycle_evidence),
    DurableGraphDriverOptions::default(),
    DurableGraphLifecycleOptions::default(),
    DurableTenantSchedulerOptions::default(),
)?;

The lifecycle audit schema is published at https://stknot.com/schemas/runtime/graph-lifecycle-event/1.0.0. Register it through the runtime helper; do not hard-code its digest.

Cancellation confirmation also requires the public-safe schema at https://stknot.com/schemas/runtime/agent-cancellation-event/1.0.0. Missing it makes lifecycle startup fail closed.

Recover trusted evidence; never invent it

A successful terminal barrier does not own the admitted Agent descriptor, request, resolved budget, final artifacts, or cumulative usage. GraphLifecycleEvidenceProvider must recover those existing durable facts through bounded, deterministic, read-only calls. It must never repeat model/tool work, infer a request, or replace missing usage with zero.

The lifecycle coordinator validates input and output schemas offline, constructs the final Agent result, and rechecks provenance, request, descriptor, budget, artifacts, and usage before the transaction. An evidence error releases or makes the exact fence reclaimable instead of partially finalizing the run.

Commit each lifecycle edge as one unit

  1. Wait

    Node code returns complete registration-time-free NodeWaits. One transaction commits the journal event, result consumption, successor checkpoint, database-time interrupt/timer registrations, Waiting transition, and lease release.

  2. Successful Terminal

    Trusted evidence and schema validation precede one transaction that stores the terminal checkpoint and Agent result, transitions the run, and clears ownership.

  3. Blocked failure

    Same-fence in-flight work releases ownership for higher-fence crash recovery. Only a plan without in-flight work can enter terminal failure supervision.

  4. Confirmed cancellation

    The Driver stops new dispatch and returns an exact cancellation handoff. Lifecycle reconstructs cumulative usage and atomically confirms cancellation with database time; unavailable evidence keeps the run cancellation-requested.

The Driver allocates one stable lifecycle event identity per handoff. A lost-ack retry for success, failure, or cancellation accepts only the matching revision-plus-one, terminal status, journal event, and cleared lease. It recovers the committed result, failure, or cancellation usage without rereading external evidence; every other changed terminal snapshot fails as stale.

Wait replay is event-first: the provider verifies the original event, projection, checkpoint, result consumptions, and immutable registrations. It can therefore return that exact idempotent commit after a resolver, timer, or cancellation advances the run, without reverting later state.

Keep tenant scheduling bounded

One tick scans fixed-cutoff keyset pages in durable queue order, allocates one stable claim Attempt ID per candidate, treats ordinary contention as a skip, and executes at most one run. Page count, decoded candidates, contention, and retries are all bounded and reported.

Executed
One run was claimed and reached Waiting, Succeeded, Failed, RecoveryReleased, Deferred, Yielded, or Cancelled through the bounded Agent Loop.
ExecutionFailed
A run-local Driver or lifecycle error occurred. Exact-fence cleanup was attempted and the worker remains available for later ticks.
Idle
The complete fixed-cutoff tenant snapshot contained no claimable run.
ScanLimitReached
The configured page ceiling stopped the tick before the stable snapshot ended. Schedule another bounded tick; do not silently widen memory.
Cancelled
The process-owned monotonic shutdown signal won before a claim.

Keep isolation beneath global fairness

This worker remains intentionally tenant-scoped. Wrap it through DurableFairScheduler for replica-global smooth weighted selection and an exact reservation-count starvation bound. Keep storage credentials tenant-scoped; do not widen a worker’s queue visibility to simulate fairness.

Operate the Worker independently of HTTP ingress

AgentWorkerBinding::tenant and AgentWorkerBinding::fair exclusively own a concrete scheduler. AgentWorker::start checks its actual database schema, frozen registry and persisted fair policy, plus mandatory AgentWorkerReadiness for real host dependencies. Fixed slots bound concurrency; stale or failed readiness pauses new ticks. Periodic checks never overlap. No Worker is started by HTTP admission.

Defaults are 4 slots, a 5-minute tick deadline and a 30-second drain. worker.begin_shutdown() closes admission; worker.shutdown().await joins ticks and nested Graph node futures, forcing task cancellation after the graceful deadline. Cancelling worker.wait() does not lose task ownership. Drop only requests cleanup; non-yielding callbacks still require an OS supervisor deadline. Shutdown is not durable Run cancellation and never proves rollback.

worker.health() exposes payload-free local state and counts, not a public endpoint or durable billing. Hosts must separately operate timer, deadline, child and failure-close maintenance. PostgreSQL 16/17 tests exercise failure recovery, bounded concurrency, joined shutdown, fresh-process terminal replay without repeating a node, and continuous fair-slot sequencing. Follow the assembly and operations guide and Draft RFC-0013. This is not complete multi-role production qualification or a stable release.

Own maintenance separately from execution

AgentMaintenanceBinding::new binds 1–128 explicitly authorized, distinct tenants, the actual store and four frozen audit schemas. AgentMaintenance::start requires AgentMaintenanceReadiness. One bounded loop rotates through deadline cancellation, child cancellation and settlement, Join publication, and failure closure. No model or tool executes inside this role.

Each tenant/job retains its cursor past individual errors, so a failed page cannot starve its tail. Exhausted sweeps and fresh processes revisit failed work. Two replicas rely on durable serialization and idempotency. Defaults are 250 ms normal pacing, 1 s after item errors, a 30 s tick deadline and a 10 s drain deadline. Stale readiness pauses new work; discovery errors, panic and tick deadline fail-stop.

role.health() exposes payload-free counters: Ready does not mean zero item failures. Protect diagnostics and alert on failures even when dependencies are ready. role.shutdown().await joins owned work; forced cancellation never proves transaction rollback. Drop only initiates cleanup. No pool closure, automatic retention or timer business policy is added.

Read the maintenance operations guide and Draft RFC-0014. PostgreSQL 16/17 qualification includes actual effects, failed-page progress and SIGKILL recovery. Full measured multi-role deployment remains separate; the API remains pre-alpha.

Qualification evidence

CI runs runtime and provider qualification on both PostgreSQL 16 and 17. The runtime cases cover lifecycle atomicity and exact lost-ack replay, database-time Wait materialization, Agent Loop success and evidence failure, tenant and weighted cross-tenant scheduling, durable model/tool attempts and streaming, noninitial replay, lease renewal, duplicate suppression, quarantine, higher-fence takeover, provider-native multi-turn recovery, exact cancellation, and durable run/result reads. Read the complete integration and operations contract before deploying this pre-alpha surface.

Atomic admission, public run/result reads, and provider-native lifecycle evidence are implemented. The embedding application still owns real price tables and trusted artifact evidence; the runtime revalidates committed facts but does not invent missing evidence.