Pre-alpha documentation
Documentation that follows the code.
StateKnot documentation distinguishes implemented evidence from active design work and planned v1 capabilities.
Choose a path
Install the public alpha
Pin 0.1.0-alpha.1 exactly, then review the compatibility, MSRV, durable-data, and release contract before adopting it.
Read the release policyValidate the repository
Install the pinned Rust toolchain and run the same formatting, lint, test, and documentation gates used by CI.
Start locallyBuild a typed Agent contract
Generate and pin typed schemas, bind provider profiles offline, and construct the first-party OpenAI Responses and Anthropic Messages adapters.
Build the contractAdmit an Agent atomically
Bind authenticated intent, finite budgets, database time, the first event, and the initial graph checkpoint as one retryable durable fact.
Integrate admissionSubmit and read a durable run
Persist one tenant-scoped idempotency decision, recover the original run after a lost response, and read a verified terminal result.
Integrate runs and resultsExpose AgentService v1
Authorize exact Agent revisions before existence disclosure, recover durable submissions, read verified Runs, and request two-phase cancellation.
Integrate the serviceCompile a deterministic graph
Run the maintained Rust example, understand the compiler's fail-closed checks, and register one exact immutable definition.
Build the graphUnderstand durability
Follow one run through journal facts, immutable checkpoints, lease fencing, pending results, barriers, and recovery.
Read the modelDrive a durable Graph
Freeze executable schemas, reducers, and nodes; replay noninitial checkpoints; then run canonical bounded sibling batches under one fence.
Integrate the DriverRun the durable Agent Loop
Bind lifecycle evidence, atomic Wait/Terminal/failure/cancellation commits, and one tenant-scoped scheduler tick to the proven Driver.
Integrate the loopExecute durable invocations
Freeze exact model/tool providers, commit physical starts before external I/O, validate streams, and retry terminal persistence without redispatch.
Integrate invocationsCall a general MCP Tool
Discover a bounded stateless MCP 2026-07-28 Tool catalog, consume JSON/request-scoped SSE, and mediate multi-round input safely.
Use the Tool clientAuthorize an MCP resource
Integrate challenge-driven OAuth discovery, PKCE, exact issuer/callback validation, bounded replay, and durable credential stores.
Configure OAuthBind one MCP Remote Tool
Discover a strict stateless MCP 2026-07-28 Tool once, pin its identity and schemas, and preserve ambiguous write outcomes.
Integrate MCPExpose an MCP Server
Freeze bounded Tool, Resource, and Prompt catalogs, authorize decoded operations, mediate MRTR, and mount one strict stateless HTTP service.
Build the Server profileCall a durable A2A agent
Freeze one Agent Card and local contract; then preserve unknown sends or reconcile them through an explicitly attested remote guarantee.
Integrate the A2A ClientPersist durable artifacts
Poll accepted A2A tasks without resending, then bind terminal parts to immutable PostgreSQL metadata and private verified object bytes.
Configure artifact storageRun the provider-native Agent
Compile one pinned multi-turn model/tool graph, overlap bounded read-only Tools behind write barriers, and recover transcripts without redispatch.
Integrate the Agent graphSchedule tenants fairly
Compile immutable weights, reserve one replica-global order, inspect exact starvation bounds, and retain lost-ack evidence.
Configure fairnessOperate PostgreSQL
Review the implemented provider boundary, secure defaults, migration sequence, and mandatory integration test path.
Open the guideCheck the claims
Separate implemented code from active work and v1 scope before depending on an API or protocol surface.
View statusWhat these docs cover now
- Core contracts
- Typed, bounded domain values for agents, models, tools, runs, compiled graphs, deterministic barriers, checkpoints, invocations, waits, results, and recovery evidence.
- PostgreSQL durability
- Exact migrations, journal and checkpoint integrity, leases and fencing, invocation ledgers, pending results, barriers, durable waits, outbox delivery, quarantine, ready-node recovery planning, indexed delayed-retry wakeups, and the tenant-scoped immutable graph registry.
- Durable Graph runtime
- Offline executable registration, independent bounded replay, durable-before-dispatch node execution, lease renewal, automatic Continue barriers, and typed lifecycle handoffs.
- Lifecycle and Agent Loop
- Trusted terminal evidence, database-time Wait registration, atomic success/failure transitions, exact lost-ack convergence, bounded cleanup, and one tenant-scoped scheduler quantum.
- Atomic Agent admission
- Authenticated immutable intent, deterministic finite budgets, database-clock commit, sequence-one audit event, superstep-zero checkpoint, exact lost-ack retry, and fully verified durable loads.
- Durable Agent runs and results
- Tenant-scoped ingress idempotency, fresh-ID retry convergence, verified public lifecycle snapshots, terminal results, and fail-closed run/key lookups.
- AgentService v1
- Exact-version deployment binding, authorization before existence disclosure, durable submission recovery, verified reads, and caller-retained two-phase cancellation identities.
- Typed Agent and provider adapters
- Generated, canonical digest-pinned input/output schemas; offline provider-profile binding; bounded typed request/result validation; and first-party OpenAI Responses and Anthropic Messages unary and SSE transports.
- General MCP Tool client
- Bounded stateless discovery and pagination, JSON/request-scoped SSE, standard and nested custom headers, invalid-Tool isolation, request-scoped authorization, no network schema dereference, and exact multi-round request state.
- Strict MCP Remote Tool
- MCP 2026-07-28 modern discovery, stateless complete-JSON transport, exact local schema and server-identity pins, attempt-scoped authorization, and reconciliation-first lost-write behavior.
- A2A Client and durable remote agent
- Strict Agent Card and interface discovery, all eleven HTTP+JSON and JSON-RPC operations, both bounded SSE surfaces, attempt-scoped bearer authorization, local schema authority, explicit delivery semantics, and Unknown/no-redispatch recovery through PostgreSQL.
- Durable A2A artifact storage
- Direct no-resend task recovery, bounded terminal-part ingestion, immutable PostgreSQL metadata, private conditional object publication, authorization-before-lookup, and complete length and SHA-256 verification.
- Architecture decisions
- Draft RFCs and qualification scenarios that constrain implementation; drafts are not stable compatibility promises.
Public Alpha API reference
docs.rs publishes the exact stateknot 0.1.0-alpha.1 reference. When reviewing a change that has not been released, generate
documentation from that exact checkout:
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --all-features --no-deps --locked --open