Python API

Every public class, function and type of the criogenai Python package (0.1.7), one page per module, generated from its docstrings and type hints every time the site is built. Install it with pip install criogenai. The same API in TypeScript and Rust.

New to CriogenAI? Start with the quickstart and the agents guide; come here for the exact names, parameters and defaults.

Agents#

PageWhat it coversMain names
AgentsThe agent: a model, tools and instructions; runs, threads, streams and approvals.Agent, Thread, Stream, Reply
ToolsFunctions the model can call: definitions, input schemas, errors and the tool context.tool, Tool, ToolError, ToolContext
HooksYour code around the agent loop: before and after model and tool calls.HookContext, HookAction, ToolCall, ToolResult
ErrorsEvery error class, one per stable error code.CriogenError, ModelError, ToolExecutionError, LimitExceededError
Usage and costTokens and an estimated price for a run.estimate_cost

Models#

PageWhat it coversMain names
ModelsProviders and models: OpenAI, Anthropic, Gemini, Azure, Bedrock, Vertex AI, local servers and more.OpenAI, Anthropic, Gemini, FakeModel
GatewayChat, stream and embed without an agent, with retries and fallbacks.Gateway, ChatReply, Chunk, ChatStream
Keys and environmentLoading API keys from a file or the environment.parse_env, load_env, status, key_name

Data#

PageWhat it coversMain names
Storage and memoryDurable threads (SQLite, Postgres, in memory), encryption, audit, retention and long-term memory.Storage, Memory
CollectionsDocuments to search by meaning, and a retrieval tool for agents.Collection, Document, Hit

Orchestration#

PageWhat it coversMain names
WorkflowsGraphs of steps and agents: routes, joins, loops, pauses for people, and threads.Workflow, CompiledWorkflow, WorkflowThread, END
PatternsReady-made multi-agent designs: sequential, parallel, loops, routers, debates and more.sequential, parallel, loop, custom
Specialist agentsDefault agent recipes (researcher, writer, critic, ...) and a registry for your own.Specialist, register, unregister, get

Integrations#

PageWhat it coversMain names
MCP serversTools from Model Context Protocol servers, over HTTP or a local process.McpServer, stdio, http, McpTool
Web search and page readingWeb search (Tavily, Brave) and safe page reading tools.tavily_search, brave_search, search, default_tools

Quality and operations#

PageWhat it coversMain names
TelemetryExporting runs to Langfuse or any OpenTelemetry backend.Telemetry
Trace viewerA local page that shows your runs, with no account.serve, TraceViewer, main
EvalsDatasets, scorers, judges, comparisons and quality gates.evaluate, Dataset, EvalResult, compare
Readiness checkChecks that the engine, keys and providers work before you ship.ready, ready_sync