Pre-alpha · no stable public API
Durable agent orchestration, written for Rust.
StateKnot runs typed root Graphs with PostgreSQL recovery, atomic admission, durable model/tool attempts, lifecycle commits, fair scheduling, ingress, and verified results. Implemented: OpenAI/Anthropic adapters, a provider-native graph, AgentService v1, MCP profiles, Final SEP-2640 static Skills with guarded Tool binding, and A2A 1.0 HTTP+JSON/JSON-RPC Client/Server with durable artifacts. Dynamic Skills, stable Agent APIs, A2A gRPC, MCP Tasks, advanced graphs, live-peer and production qualification remain open.
$
$ cargo test -p stateknot-runtime \
--test postgres --locked
CI matrix PostgreSQL 16 / 17
License Apache-2.0
Status pre-alpha The architecture is a set of evidence boundaries.
Wire protocols stay outside the stable domain. External work stays outside database transactions. Recovery decisions are derived from bounded, integrity-checked facts.
Core contracts
Graph execution
PostgreSQL durability
Protocols
Operations
Current cut, without roadmap theatre.
“Implemented” means code exists in the pre-alpha repository. It does not mean the API is stable or the framework is ready for production.
- Core domain contracts Implemented slice Canonical, typed, security-bounded values Inspect
- PostgreSQL store Implemented slice Mandatory PostgreSQL 16 and 17 CI matrix Inspect
- Atomic Agent admission Implemented slice Authenticated intent, DB clock, event, checkpoint, exact retry Inspect
- Durable Agent runs and results Implemented slice Durable ingress keys, lost-ACK convergence, verified terminal reads Inspect
- Graph compiler and recovery Implemented slice Canonical graphs, deterministic barriers, pinned replay Inspect
- Durable Graph Driver Implemented slice Exact executables, noninitial replay, lease renewal, takeover Inspect
- Durable Agent Loop Implemented slice Atomic success, failure, Wait, and cancellation commits Inspect
- Durable model/tool attempts Implemented slice Exact providers, durable starts, bounded probes, atomic evidence Inspect
- Cross-tenant fair scheduler Implemented slice Global weighted order and explicit starvation bounds Inspect
- Typed Agent and model adapters Implemented slice Pinned schemas plus OpenAI/Anthropic unary and SSE transport Inspect
- Provider-native Agent graph Implemented slice Unknown-to-Pending recovery, pinned policy, exact cancellation Inspect
- AgentService v1 Implemented slice Authorization-first submit/read/cancel with exact recovery IDs Inspect
- General MCP Tool client Implemented slice All 32 scored client scenarios and 371 scored assertions Inspect
- MCP OAuth client Implemented slice All 25 scored OAuth scenarios with bounded challenge replay Inspect
- MCP Remote Tool Implemented slice Durable dispatch, one lost write call, exact reconciliation Inspect
- MCP Server profile Implemented slice All 37 scored Server scenarios; 114 success, zero failure Inspect
- MCP Skills profiles Implemented slice Static Server plus origin-scoped, verification-first Client/Host Inspect
- A2A 1.0 Client and remote agent Implemented slice Eleven operations plus two attested durable recovery strategies Inspect
- Durable A2A artifact storage Implemented slice Direct task polling, migration 18, private verified object bytes Inspect
- A2A 1.0 Server profile Implemented slice 177 official TCK passes; HTTP+JSON and JSON-RPC/SSE Inspect
Validate the repository before trusting the claims.
The facade is available as the exact 0.1.0-alpha.1
public preview. This contributor quickstart still validates the repository
first, then runs a real typed contract example without pretending the
preview is production-ready.
git clone https://github.com/StateKnot/StateKnot.git
cd StateKnot
cargo fmt --all --check
cargo test --workspace --all-targets --all-features --locked The road ahead is ordered by proof.
The strict MCP binding retains PostgreSQL-backed recovery evidence, while the separate general Tool client plus OAuth provider now pass all 32 scored Client scenarios and the MCP Server profile passes all 37 scored Server scenarios. The A2A 1.0 Server gate has 177 official TCK passes with zero failures; the Client now adds an eleven-operation dual-binding matrix, real PostgreSQL Unknown/no-redispatch proof, and bounded operator-attested recovery. Live-peer and recovery-attestation qualification, dynamic/persisted MCP Skills, MCP Tasks, and other client extensions remain independent gates.
- Implemented
Close the durable Graph loop
Lifecycle handoffs, lost acknowledgements, exact-fence cleanup, and one tenant-scoped scheduler quantum now have implementation and PostgreSQL evidence.
- Implemented
Freeze typed provider boundaries
Typed input/output schemas, offline profile binding, compiled examples, and OpenAI Responses plus Anthropic Messages unary/SSE adapters now have executable evidence.
- Implemented
Open durable Agent ingress and reads
Tenant-scoped idempotency, fresh-ID lost-ACK convergence, and fully revalidated public run/result snapshots now have PostgreSQL evidence.
- Implemented
Assemble the provider-native Agent graph
One recovered multi-turn tool path now composes transcript reconstruction, durable invocations, pinned policy and accounting, Driver, lifecycle, and exact cancellation.
- Implemented
Freeze the first strict MCP Tool binding
Modern stateless discovery, exact local schema/server pins, attempt credentials, and reconciliation-first lost writes now have executable contract evidence.
- Implemented
Compose and qualify the protocol boundary
Real PostgreSQL plus loopback MCP evidence now proves durable-before-dispatch state, unknown lost writes, no redispatch, and exact result reconciliation; runtime PostgreSQL evidence separately proves the error branch, while the pinned official inventory records the claim boundary.
- Implemented
Separate the general MCP Tool client
Bounded discovery, JSON/request-scoped SSE, custom headers, MRTR, and every frozen scored non-OAuth client scenario now pass without weakening the strict durable binding.
- Implemented
Close the MCP OAuth boundary
Challenge-driven metadata, registration priority, PKCE, issuer and callback validation, bounded scope/replay, durable stores, and all 25 scored OAuth scenarios now have executable evidence.
- Implemented
Build the MCP Server profile
Bounded stateless Tools, Resources, Prompts, Completion, MRTR, authorization-first policy, and all 37 scored official Server scenarios now have executable evidence.
- Implemented
Publish static Skills over MCP
Final SEP-2640 discovery and reads now share one immutable, size-bounded registry with exact raw-byte digests, canonical paths, private cursors, scoped cache rules, and authorization before disclosure. Client and host execution gates remain separate.
- Implemented
Build the A2A 1.0 Server profile
Bounded Agent Cards, messages, tasks, artifacts, streaming, cancellation, subscriptions, and push configuration now serve HTTP+JSON and JSON-RPC/SSE behind strict policy; 177 official TCK cases pass.
- Implemented
Build the durable A2A Client boundary
All eleven operations now run across HTTP+JSON and JSON-RPC/SSE with exact discovery/interface pins and bounded security; the Remote Agent adds PostgreSQL Unknown evidence plus operator-attested context/history lookup and message-ID replay.
- Implemented
Make terminal A2A artifacts durable
Accepted tasks now recover through direct no-resend polling, while bounded terminal parts converge on immutable PostgreSQL metadata and private, conditionally published, fully verified object bytes.
- Next
Publish qualification evidence
Run the frozen scenarios under load and failure, then publish compatibility, performance, and recovery evidence before support claims.