Python API reference
The supported Cayu Python API, organized by import namespace. Every declared lazy export has a linked definition. Root imports remain supported conveniences; use a capability namespace when it makes ownership clearer.
Start with the core contracts
Section titled “Start with the core contracts”- CayuApp
- CayuConfig
- AgentSpec
- Message
- RunRequest
- RunOutcome
- run_to_completion
- Tool
- ToolSpec
- ToolContext
- ToolResult
- EvalCase
- EvalSuite
Public namespaces
Section titled “Public namespaces”| Namespace | Declared imports |
|---|---|
| cayu | 3471 |
| cayu.agents | 3 |
| cayu.applications | 1 |
| cayu.approvals | 38 |
| cayu.artifacts | 68 |
| cayu.budgets | 125 |
| cayu.collaboration | 263 |
| cayu.configuration | 6 |
| cayu.context | 66 |
| cayu.delivery | 67 |
| cayu.egress | 82 |
| cayu.environments | 121 |
| cayu.evals | 819 |
| cayu.events | 3 |
| cayu.exceptions | 2 |
| cayu.extensions.egress | 9 |
| cayu.extensions.runners | 17 |
| cayu.mcp | 53 |
| cayu.memory | 193 |
| cayu.messages | 15 |
| cayu.observability | 31 |
| cayu.providers | 112 |
| cayu.proxies | 5 |
| cayu.runners | 74 |
| cayu.runtime | 1102 |
| cayu.server | 50 |
| cayu.sessions | 275 |
| cayu.snapshots | 121 |
| cayu.storage | 153 |
| cayu.tasks | 170 |
| cayu.testing | 41 |
| cayu.tools | 267 |
| cayu.vaults | 24 |
| cayu.verification | 18 |
| cayu.webhooks | 3 |
| cayu.workflows | 29 |
| cayu.workspaces | 95 |
Read an entry
Section titled “Read an entry”Each entry provides the supported import, source declaration, documented behavior and release source. Method signatures preserve defaults and async return annotations. Fields include inherited declarations; defaults are source expressions rather than evaluated values. Pydantic and dataclass construction follows those frameworks’ semantics. A missing method docstring is not a guarantee that the method cannot fail: consult the linked runtime guarantees and guide for lifecycle, authority and recovery behavior.
Optional imports
Section titled “Optional imports”dir(package) discovers declared names without loading implementations. __all__ is the smaller wildcard-safe surface and omits imports that require extras. Explicit optional imports need their documented dependencies. The generator reads export maps and source statically so reference coverage does not depend on installed extras.
Machine-readable reference
Section titled “Machine-readable reference”Start with the small Python API index, select an import namespace, then fetch its alphabetic symbol index. Each name links to its HTML reference and plain Markdown. Signatures, fields and source links live in those pages rather than a multi-megabyte duplicate JSON export. Coding agents can use this together with the package-shipped cayu guide topics.