Chio/Docs

SDK Overview

chio ships SDKs in four languages for embedding protocol verification, receipt validation, DPoP signing, and transport management directly in your application. All four pass the same cross-language conformance suite.

SDK vs. CLI

The SDKs are for programmatic integration: embedding chio into your application code. For standalone governance of MCP servers, use the CLI instead.

Package naming

The TypeScript package is @chio-protocol/sdk, published under the chio-protocol npm organization. The other SDKs use their own package names: chio-sdk on PyPI (imported as chio), github.com/backbay-labs/chio/packages/sdk/chio-go (Go), and the chio-binding-helpers crate (Rust).

Choose an SDK

Every SDK covers the same invariants surface. Differences live in the higher-level extras: framework adapters, orchestrator operators, agent framework integrations, and native server middleware.

LanguagePackageBest forReference
TypeScript@chio-protocol/sdkNode.js 22+ servers, edge workers, agents. Express/Fastify/Elysia adapters.TypeScript SDK
Pythonchio-sdkFastAPI, Django, Airflow, Temporal, Prefect, Dagster, LangChain, LlamaIndex, CrewAI, AutoGen. Each ships as a separate companion package.Python SDK
Gogithub.com/backbay-labs/chio/packages/sdk/chio-goCloud infra, context-aware client and session, CGO-free binaries.Go SDK
Rustchio-binding-helpersThe reference invariants crate. Kernel types, the CLI, and every other SDK conform against it.Rust SDK

Per-Language References

  • TypeScript. @chio-protocol/sdk, Node 22+, ESM-only. Invariants, transport, session, DPoP, receipt query, and adapters for Express, Fastify, and Elysia.
  • Python. chio-sdk, pure Python, no native deps, imported as chio. ChioClient, ChioSession, OAuth/PKCE helpers, plus separate companion packages (chio-fastapi, chio-langchain, and more) for framework and orchestrator integrations.
  • Go. Module path github.com/backbay-labs/chio/packages/sdk/chio-go, pure Go, CGO_ENABLED=0. Context-aware client, session, transport, invariants, and a nested callback router.
  • Rust. The chio-binding-helpers crate is the pure invariants layer that every other SDK conforms against. chio is the CLI binary name, not a Rust library crate.
  • Bindings API. The shared low-level contract that every binding must implement: canonical JSON, hashing, signing, receipt/capability/manifest verification, delegation chains, Merkle proofs, and the stable error taxonomy.

Shared Surface

Regardless of language, every SDK exposes the same conceptual layers:

  • Invariants. Pure functions for canonical JSON, SHA-256, Ed25519, and verification of receipts, capabilities, and signed manifests. Zero network.
  • Transport. Streamable HTTP MCP transport with session lifecycle.
  • Client/Session. High-level API for opening a session against a chio edge and calling tools.
  • DPoP. Proof construction and signing bound to a capability, tool, and action-arg hash.
  • Receipt query. Typed client over GET /v1/receipts/query with pagination.
  • Adapters. Framework-specific middleware, decorators, or plugins.

Cross-Language Conformance

All four SDKs pass the same conformance test suite. The suite verifies identical behavior for canonical JSON, hashing, signature verification, receipt parsing, capability parsing, and manifest parsing across every language. Rust is the reference; the other SDKs produce byte-identical output against its test vectors.

bash
# Run conformance per SDK
$ cd packages/sdk/chio-ts && npm test
$ cd packages/sdk/chio-py && pytest
$ cd packages/sdk/chio-go && go test ./...
$ cargo test -p chio-binding-helpers

Canonical JSON is non-negotiable

The single most common source of cross-language verification failures is non-conformant canonical JSON. Every SDK implements RFC 8785 to the letter: key sorting, no whitespace, deterministic number formatting. See the Bindings API for the full contract.

Next Steps

  • Pick your language on the right and jump into its SDK reference.
  • Read the Bindings API if you are porting to a new language or writing an offline verifier.
  • Skim the Receipt Format and Receipt Query API for the data shapes each SDK wraps.