API Documentation
The full Rust API reference is generated from source code documentation using cargo doc.
Viewing API Docs
Build and view the API documentation locally:
# Build all crate docs
cargo doc --workspace --no-deps --open
# Or use the unified build script
bash scripts/build-docs.sh
When using scripts/build-docs.sh, the API docs are available at target/book/doc/.
Publishing Docs
The Docs GitHub Actions workflow builds the book and Rust API docs on pushes to main
and on manual dispatch.
GitHub Pages deployment is enabled only when both of the following are true:
- The repository Pages source is set to
GitHub Actions - The repository variable
ENABLE_GITHUB_PAGES_DOCSis set totrue
The published site is available at https://tirea-ai.github.io/tirea/.
Crate Index
| Crate | Description | API Docs |
|---|---|---|
tirea_state | Core state management | tirea_state |
tirea_state_derive | Derive macros | tirea_state_derive |
tirea_contract | Shared contracts | tirea_contract |
tirea_agentos | Agent runtime & orchestration | tirea_agentos |
tirea_store_adapters | Persistence adapters | tirea_store_adapters |
tirea_agentos_server | Server gateway | tirea_agentos_server |
tirea | Umbrella re-export crate | tirea |
Key Entry Points
tirea_state
apply_patch— Apply a single patch to statePatch— Patch containerOp— Operation typesStateContext— Typed state accessJsonWriter— Dynamic patch builderTireaError— Error types
tirea_contract
Thread— Persisted thread modelRunContext— Run-scoped execution contextRunRequest— Unified protocol requestTool— Tool traitThreadStore— Persistence abstraction
tirea_agentos
AgentOs— Registry + run orchestrationAgentOsBuilder— Builder for wiringAgentDefinition— Declarative agent config