API reference
This reference is generated from the source every time the site is built, so it matches the code: Python from its docstrings and type hints, TypeScript from its declarations and doc comments, Rust from rustdoc.
PythonThe criogenai package: Agent, tool, Thread, Storage, Memory, models, workflows, errors.TypeScriptcriogenai: Agent, tool, Thread, Storage, Memory, models, workflows, errors.RustThe crates: core, providers, agent, storage, telemetry, gateway, trace.
Pages#
Python and TypeScript have one page per module, with a contents table, every parameter and field, return values, errors and examples. Each language has an overview: Python API, TypeScript API. Use the search box to find a name.
| Group | Module | Python | TypeScript |
|---|---|---|---|
| Agents | Agents: Agent, threads, streams, approvals | Python | TypeScript |
| Tools | Python | TypeScript | |
| Hooks | Python | TypeScript | |
| Errors | Python | TypeScript | |
| Usage and cost | Python | TypeScript | |
| Models | Models and providers | Python | TypeScript |
| Gateway | Python | TypeScript | |
| Keys and environment | Python | TypeScript | |
| Redaction | n/a | TypeScript | |
| Data | Storage and memory | Python | TypeScript |
| Collections | Python | TypeScript | |
| Orchestration | Workflows | Python | TypeScript |
| Patterns | Python | TypeScript | |
| Specialist agents | Python | TypeScript | |
| Integrations | MCP servers | Python | TypeScript |
| Web search and page reading | Python | TypeScript | |
| Quality and operations | Telemetry | Python | TypeScript |
| Trace viewer | Python | TypeScript | |
| Evals | Python | TypeScript | |
| Readiness check | Python | TypeScript |
The Rust reference is rustdoc's own, one page per crate: see Rust API.
Where to start in each#
| You want | Python | TypeScript | Rust |
|---|---|---|---|
| An agent | Agent | Agent, AgentOptions | criogenai_agent::AgentBuilder |
| A tool | @tool, ToolError, ToolContext | tool(), ToolDefinition, ToolError | tool_fn, ToolSpec, ToolError |
| A conversation | Thread, Reply | Thread, Reply, Stream | Thread, Reply, ThreadStream |
| Storage | Storage, Memory | Storage, Memory | criogenai_storage::Storage, Memory |
| Models | OpenAI, Anthropic, Gemini, Azure, Bedrock, Vertex, Ollama, OpenAICompatible, FakeModel | openai(), anthropic(), gemini(), azure(), bedrock(), vertex(), ollama(), FakeModel | ProviderModel, Endpoint, AzureModel, VertexModel, FakeModel |
| Errors | CriogenError and subclasses | CriogenError, isCriogenError | AgentError, RunError, StorageError |
| Workflows | Workflow, CompiledWorkflow, WorkflowThread | Workflow, CompiledWorkflow, WorkflowThread | criogenai_core::WorkflowBuilder, Storage::workflow_thread |
| Patterns and specialists | criogenai.patterns, criogenai.specialists | patterns, specialists | criogenai_agent::patterns, criogenai_agent::specialists |
| Web search and page reading | criogenai.web | web | criogenai_agent::web (feature web) |
| Tools from MCP servers | criogenai.mcp | mcp | criogenai_agent::mcp (feature mcp) |
| Documents searched by meaning | Collection | Collection | criogenai_agent::retrieval |
| Evals | criogenai.evals | evals | criogenai_agent::evals |
| The local trace viewer | criogenai.trace | serveTraces | criogenai_trace |
| Gateway | Gateway | Gateway | criogenai_gateway::Gateway, Config |
Once the crates are on crates.io, the Rust reference will also be on docs.rs.