# API reference

The API reference is auto-generated from docstrings in the `activegraph` package. Symbols are organized by topical module — runtime, graph, behaviors, tools, store, packs, errors, observability — each as a separate page navigated from the sidebar.

Two conventions apply across the reference:

- **Public surface and contracted extension suites.** Symbols listed in `activegraph.__all__` and the pack-level `__all__`s appear here. A named conformance suite may also appear at its documented module path so adapter authors can validate implementations without widening the root namespace. Other symbols starting with `_`, or not re-exported, are implementation details.
- **No source dumps.** The reference renders the API contract, not the implementation. Readers who want source go to [GitHub](https://github.com/yoheinakajima/activegraph).

The framework's docstrings are mostly free-form Markdown rather than structured (Google/NumPy/Sphinx). The renderer falls back to raw Markdown for prose-only docstrings; structured sections (`Args:`, `Returns:`, `Raises:`, `Examples:`) render as labeled blocks where they appear.

## Topical reference

- [Runtime](https://docs.activegraph.ai/reference/api/runtime/index.md) — the runtime loop, frames, budget, status.
- [Graph](https://docs.activegraph.ai/reference/api/graph/index.md) — graph and its primitives (objects, relations, patches, views, events).
- [Behaviors](https://docs.activegraph.ai/reference/api/behaviors/index.md) — the behavior decorators and base classes.
- [Tools](https://docs.activegraph.ai/reference/api/tools/index.md) — the `@tool` decorator and tool primitives.
- [Store](https://docs.activegraph.ai/reference/api/store/index.md) — event stores (in-memory, SQLite, Postgres), URL parsing, migration.
- [Packs](https://docs.activegraph.ai/reference/api/packs/index.md) — the pack format primitives.
- [Errors](https://docs.activegraph.ai/reference/api/errors/index.md) — the `ActiveGraphError` hierarchy.
- [Observability](https://docs.activegraph.ai/reference/api/observability/index.md) — accepted-event sinks, the metrics protocol, and shipped backends.
- [Diligence pack](https://docs.activegraph.ai/reference/api/packs/diligence/index.md) — the v0.9 reference pack.

## Docstring coverage

A coverage audit against CONTRACT v1.0 #C2's tier model (100% on public surface, 80% on second ring) is regenerated by `scripts/audit_docstrings.py`. The current state is in [`COVERAGE_REPORT.md`](https://docs.activegraph.ai/reference/api/COVERAGE_REPORT/index.md); the docstring-gate CI commit consumes it as a checklist.
