Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

API reference

Build and browse the Rust API docs locally. The authoritative reference lives in rustdoc, generated directly from source — there is no hand-written API doc to drift out of date. Generate the whole workspace and open it in one command:

cargo doc --workspace --no-deps --open

The rest of this chapter covers the flags that matter and maps each crate to its rustdoc entry point.

Generating rustdoc locally

The whole-workspace rustdoc is built with cargo doc. The pre-push lefthook hook also runs this command, so the docs are guaranteed to compile on master.

# Build rustdoc for every workspace member without recursing into transitive deps.
cargo doc --workspace --no-deps

# Same, but also opens the index page in the default browser.
cargo doc --workspace --no-deps --open

# Document private items too — useful when working inside a single crate.
cargo doc -p aa-gateway --no-deps --document-private-items --open

The HTML output lands in target/doc/. Open target/doc/aa_core/index.html (or any other crate’s index) directly if you’d rather not use --open.

Note on eBPF cratesaa-ebpf* requires a nightly toolchain to build the BPF target. CI excludes these crates from the standard build matrix and validates them in a dedicated job. For rustdoc on macOS or non-Linux machines, run cargo doc --workspace --no-deps --exclude aa-ebpf to skip them.

Per-crate API surface

Once rustdoc is built (target/doc/<crate>/index.html), the most-frequented entry points are:

Craterustdoc entryHighlights
aa-coretarget/doc/aa_core/index.htmlDomain newtypes (AgentId, TeamId), ActionType enum, common traits
aa-prototarget/doc/aa_proto/index.htmlGenerated protobuf message types — wire format source of truth
aa-runtimetarget/doc/aa_runtime/index.htmlTokio runtime wrapper, agent lifecycle hooks
aa-proxytarget/doc/aa_proxy/index.htmlMitM HTTPS proxy primitives
aa-gatewaytarget/doc/aa_gateway/index.htmlPolicy engine, agent registry, budget tracker
aa-apitarget/doc/aa_api/index.htmlHTTP layer with utoipa-generated OpenAPI spec
aa-clitarget/doc/aa_cli/index.htmlaasm operator binary surface (clap commands)
aa-sdk-clienttarget/doc/aa_sdk_client/index.htmlShared SDK runtime-client (UDS transport, codec, lifecycle) the Python/Node/Go shims wrap
aa-wasmtarget/doc/aa_wasm/index.htmlwasm-bindgen surface for in-browser embedding
conformancetarget/doc/conformance/index.htmlCross-SDK protocol vector harness

The HTTP API (served by aa-api) additionally publishes a generated OpenAPI v1 spec. Validate the spec with npx @stoplight/spectral-cli lint openapi/v1.yaml.

Hosted documentation (deferred)

Publishing rustdoc to docs.rs and the mdBook to GitHub Pages is out of scope for v0.0.1. Both are tracked as follow-up Stories under Epic AAASM-13. Until then, run cargo doc --workspace --no-deps --open and mdbook serve docs --open locally.


Last updated: 2026-06-11 by Chisanan232