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

Operate the PostgreSQL durability provider.

The implemented provider targets PostgreSQL 16 and 17 with checksum-pinned migrations, secure transport defaults, bounded pools, and fail-closed recovery.

Migrate explicitly, then connect

Use separate migration and runtime credentials. Migration is a deployment action, not an implicit side effect of every application startup.

Rust · current pre-alpha API
use stateknot_store_postgres::{PostgresStore, PostgresStoreOptions};

let options = PostgresStoreOptions::default();
PostgresStore::migrate_database(&migration_url, options.clone()).await?;
let store = PostgresStore::connect(&runtime_url, options).await?;
store.health_check().await?;

Startup refuses missing, newer, older, incomplete, or checksum-mismatched schemas. Do not catch that refusal and continue with a partially compatible database.

Use one validated startup configuration

PostgresStoreConfig provides a closed environment contract and a production-safe builder. Production keeps verified TLS and disables implicit migration by default. Enabling production auto-migration requires a distinct STATEKNOT_MIGRATION_DATABASE_URL; connection URLs are redacted from errors and Debug output.

Rust · environment configuration
use stateknot_store_postgres::{PostgresStore, PostgresStoreConfig};

let config = PostgresStoreConfig::from_env()?;
let store = PostgresStore::connect_config(config).await?;

Required: DATABASE_URL. Optional closed booleans: STATEKNOT_AUTO_MIGRATE and STATEKNOT_DEV_MODE. Production migration uses a separately privileged URL. For a trusted local database only, STATEKNOT_DEV_MODE=true enables migrations, disables TLS, and caps the pool at four connections; the equivalent explicit helper is PostgresStore::connect_development(...).

Secure and bounded defaults

Transport
TLS certificate and hostname verification is the default. URL query parameters cannot silently weaken it.
Pool
1–16 connections, five-second acquire timeout, ten-minute idle retirement, and thirty-minute maximum connection lifetime.
Transactions
Five-second lock timeout and fifteen-second statement timeout; invalid or unbounded timing relationships fail during connection setup.
Ownership
Thirty-second run leases with a five-minute renewal horizon. Outbox network attempts use a fixed, non-renewable one-minute lease.

Treat graph versions as immutable releases

Migration 13 adds a tenant-scoped compiled graph registry. The key is the exact graph owner, name, and version; canonical bytes and the definition digest may never change beneath that key. Register the graph before a run can depend on its reference.

Rust · idempotent graph registration
let outcome = store
    .register_graph_definition(tenant_id, compiled_graph)
    .await?;

Identical retries converge on the original registration. Different bytes under the same version return a conflict. Every load recompiles and checks canonical bytes, redundant key columns, digest, and tenant binding; claimed recovery quarantines missing or corrupt pinned evidence under its exact live fence.

Never expose a half-initialized Agent run

Migration 15 adds immutable agent_admissions. DurableAgentAdmission commits authenticated intent, database time, Active lifecycle, the sequence-one event, superstep-zero checkpoint, graph anchors, and scheduler projections as one transaction. Exact retries recover and revalidate the original commit; changed intent conflicts.

The scheduler-ready index now requires a checkpoint, so low-level uninitialized rows cannot be claimed. Use the durable admission guide for trusted ingress, idempotency, rollout, and sensitive-data requirements.

Migration 16 adds tenant-scoped durable submission keys. A key mapping commits with admission, stores no raw key, accepts fresh candidate IDs for the same logical retry, and rejects changed content or a second key for one run. See the run/result guide.

Do not weaken TLS casually

VerifyFull is appropriate for production. RequireEncryption encrypts without authenticating the server and is therefore a deliberate downgrade. Disabled is only for a trusted local socket or an isolated test network.

Register artifacts as immutable evidence

Migration 18 adds tenant-qualified artifacts and artifact_parents. Each row binds canonical reference bytes and digest, content length and digest, the origin run/event, same-tenant lineage, idempotency key, and a private provider-neutral locator. Exact retries converge; changed metadata conflicts, and every load revalidates the complete projection.

Object I/O stays outside the registry transaction. The durable artifact guide defines private conditional publication, authorization-before-lookup, complete integrity verification, egress policy, and cleanup obligations.

Bind known model failures without weakening the barrier

Migration 19 lets a pending node result bind an exact terminal Model revision whose status is committed or failed. The composite foreign key still pins tenant, run, invocation, revision, digest, status, and Journal anchor. Prepared and executing revisions remain ineligible and continue to block Checkpoint advancement.

The Provider-native Graph uses this only for deterministic bounded output repair: a response-phase response.malformed failure must include exact Usage before it may become consumed evidence. The PostgreSQL 16/17 matrix covers a populated v18→v19 upgrade, legacy-constraint refusal, failed-binding reload, and successor-barrier commit.

Separate database roles

The migration role needs the ability to create the owned schema and migration table. The runtime role needs only the documented table and projection operations; it should not receive DDL or update/delete access to immutable journal, checkpoint, invocation revision, attempt, result, graph definition, or consumption history.

The exact current grant surface is maintained in the repository's provider operations document. Review it against the release you deploy rather than copying grants from an older article.

Qualification and current limits

CI runs the mandatory provider, Runtime and artifact-store integration suites independently against PostgreSQL 16 and 17. The suites cover migrations, lost acknowledgements, fencing, corruption rejection, concurrency, rollback injection, outbox recovery, durable waits, quarantine, immutable graph registration/recovery, ready-node planning, delayed-retry scheduling, lifecycle commits, durable model/tool execution, fairness reservations and retention, canonical parallel sibling commits, ordered read-only Tool waves with write barriers, atomic Agent admission, durable ingress-key/run-result verification, and weighted cross-tenant Agent Loop execution. Model binding evidence adds populated migration 18→19, committed-only constraint refusal, exact failed-revision recovery, and successor-barrier release. Artifact evidence adds populated migration 17→18, schema refusal, immutable registration, private object publication, authorization-first lookup, multipart ingestion, and complete digest verification.

A separate isolated pg_dump/pg_restore drill verifies a consumed child-Join snapshot and resumed graph execution. A physical pg_basebackup plus archived-WAL drill restores the same path at a named restore point and excludes a later write. Neither qualifies full disaster recovery or standby failover.

Production release still requires role isolation, general retention and garbage collection, reference-scale failover and recovery exercises, stale-race qualification, role-separated service deployment, and live workload qualification.