# CriogenAI > A fast AI agent framework and LangChain alternative: agents and workflows on a Rust engine, used from Python, TypeScript or Rust, with tools, approvals, durable threads, memory, an audit trail and an LLM gateway. CriogenAI is an AI agent framework: a Rust engine runs agents (a model with tools, in a loop) and workflow graphs, and Python and TypeScript SDKs define the agents, tools and workflows in the developer's own language. ## Speed and reliability Measured on one machine: 0.29 ms of framework overhead per agent turn against 1.23 ms for LangGraph and 34 ms for CrewAI, and 1,000 concurrent agent runs in 333 ms against 2.85 s for LangGraph. Install footprint: 1 package, 17.9 MB, 148 ms to import (LangGraph: 42 packages, 42.9 MB, 1.70 s). Reliability tests passed by default: CriogenAI 5 of 5, LangGraph 2, CrewAI 4. With one agent and a real model, the model's time dominates and the frameworks are close; the difference shows with many steps, many tool calls and many concurrent runs. Full numbers and a kit to rerun them: https://criogenai.com/benchmarks/ Install: `npm install criogenai` (Node 18+, Linux x64/ARM64, macOS, Windows x64). Python: `pip install criogenai` (Python 3.9+, the same platforms). Free to use, also commercially. ## Docs - [What CriogenAI is](https://criogenai.com/docs/): AI agents and workflows on a Rust engine, used from Python, TypeScript or Rust. - [Install](https://criogenai.com/docs/install/): CriogenAI for Python, TypeScript and Rust, on Linux, macOS and Windows. - [Quickstart](https://criogenai.com/docs/quickstart/): An agent with a tool, a conversation that remembers, and an approval, in Python, TypeScript or Rust. - [Status: built and planned](https://criogenai.com/docs/status/): Exactly what works in CriogenAI 0.1, per language, and what is planned. - [Coming from LangGraph or LangChain](https://criogenai.com/docs/from-langgraph/): How LangGraph and LangChain ideas map to CriogenAI - graphs, state and reducers, checkpointers and threads, interrupts and approvals, stores and memory - with side-by-side code and the differences that matter. - [Tutorial: build a support agent](https://criogenai.com/docs/tutorial/support-agent/): From an empty folder to a running support agent with tools, a staff approval for refunds, a conversation saved in SQLite, memory per customer, streaming and tests. - [Agents and the loop](https://criogenai.com/docs/concepts/agent-loop/): What an agent is, what happens in each turn of its loop, how it ends, and which limits keep it from running away. - [How a run works](https://criogenai.com/docs/concepts/runs/): Steps, state, pauses, failures and retries, the same for agents and workflows. - [Messages and tools](https://criogenai.com/docs/concepts/messages-and-tools/): The conversation format every language and provider shares, and how tool calls are checked. - [State, storage and threads](https://criogenai.com/docs/concepts/state-and-threads/): What a run's state is, what storage keeps, what a thread and a checkpoint are, and how they relate. - [Errors and retries](https://criogenai.com/docs/concepts/errors-and-retries/): Which failures the engine handles for you, which reach your code, how to tell them apart by code, and how retries, fallbacks and thread retry work. - [Agents](https://criogenai.com/docs/guides/agents/): Build an agent, choose its options, read its result, ask for typed output, run agents inside agents, and cancel or time-limit a run. - [Tools](https://criogenai.com/docs/guides/tools/): Write tools the model can call - schemas from type hints or JSON Schema, Zod, errors the model sees, retries, timeouts, the tool context, and tools from other agents and MCP servers. - [Human approval](https://criogenai.com/docs/guides/approvals/): Pause before risky tool calls, let a person approve, edit, reject or answer them from any process, and record who decided. - [Hooks](https://criogenai.com/docs/guides/hooks/): Run your own code around the agent loop - block or change tool calls, hide data from the model, answer from a cache, or stop a run early. - [Streaming](https://criogenai.com/docs/guides/streaming/): Show text, tool calls and approvals as they happen, send them to a browser, and know what happens when the reader goes away. - [MCP servers' tools](https://criogenai.com/docs/guides/mcp/): Give a CriogenAI agent the tools of any MCP server (GitHub, files, databases, browsers, your own services) over stdio or Streamable HTTP, in Python, TypeScript and Rust. - [Testing without a model](https://criogenai.com/docs/guides/testing/): Test agents, tools, approvals, threads, retries and fallbacks with a scripted FakeModel - no key, no network, the same result every time. - [Conversations (threads)](https://criogenai.com/docs/guides/threads/): Durable conversations that remember, wait for approvals, survive crashes, take turns, and can be listed, rewound and deleted. - [Storage: SQLite and Postgres](https://criogenai.com/docs/guides/storage/): Where threads, memory and the audit trail live; choosing a backend; how runs on one thread take turns; and running Postgres in production. - [Long-term memory](https://criogenai.com/docs/guides/memory/): Facts about a user, a customer or a patient that every conversation can recall - namespaces, recall, the memory tools, search by meaning, expiry and deletion. - [Collections and retrieval](https://criogenai.com/docs/guides/retrieval/): Store documents, find them by meaning, and give an agent a search tool, in Python, TypeScript and Rust, with vectors encrypted at rest. - [Workflows](https://criogenai.com/docs/guides/workflows/): Graphs of steps over a shared state - branches, parallel steps and joins, loops, reducers, agents as steps, pauses for a person, limits, and durable runs. - [Patterns, specialists and web search](https://criogenai.com/docs/guides/patterns/): Ready-made agent designs (pipelines, review loops, coordinators, swarms), default specialist agents you can extend, and web search tools, in Python, TypeScript and Rust. - [Models and providers](https://criogenai.com/docs/guides/models/): OpenAI, Anthropic, Gemini, DeepSeek, Mistral, Groq, xAI, Qwen, Kimi, GLM, OpenRouter and self-hosted models, with fallback. - [The LLM gateway](https://criogenai.com/docs/guides/gateway/): One OpenAI- and Anthropic-compatible endpoint in front of every provider, with keys, limits, budgets, fallback and usage records. - [In the browser (WebAssembly)](https://criogenai.com/docs/guides/browser/): Run CriogenAI agents in a web page or a Web Worker, on the same Rust engine compiled to WebAssembly, with the same TypeScript API. - [Using CriogenAI in your app](https://criogenai.com/docs/guides/production/): Where it runs, health checks, typed output, usage and cost, redaction, tests, streaming and cancelling, tracing, and examples for Next.js, Vercel and NestJS. - [Deploying](https://criogenai.com/docs/guides/deploying/): Run agents behind a web server (FastAPI, Next.js), stream to a browser, choose storage for one or many processes, keep keys in the environment, and what works on serverless. - [Encryption, audit trail, retention](https://criogenai.com/docs/guides/compliance/): For sensitive data such as patient records - encrypt at rest, record who did what, delete on schedule. - [Tracing: Langfuse and OpenTelemetry](https://criogenai.com/docs/guides/telemetry/): Every run as a trace, with model calls as generations; content capture can be turned off. - [Evals and quality gates](https://criogenai.com/docs/guides/evals/): Measure an agent over a set of cases, compare with the last good run, and fail CI when quality drops, in Python, TypeScript and Rust. - [Troubleshooting and FAQ](https://criogenai.com/docs/troubleshooting/): Install problems by platform, missing keys, common errors by code and what to do about each, timeouts, notebooks, Next.js, and frequent questions. - [API reference](https://criogenai.com/docs/reference/api/): Every public class, function and type of CriogenAI, for Python, TypeScript and Rust, generated from the code. - [Error codes](https://criogenai.com/docs/reference/errors/): Every stable error code, what it means, whether to retry, and the error class each SDK raises. - [JSON formats](https://criogenai.com/docs/reference/schemas/): JSON Schemas of the data CriogenAI exchanges and stores - messages, tools, requests, errors, audit records. - [Benchmarks](https://criogenai.com/docs/reference/benchmarks/): What CriogenAI itself costs per step, per tool call and per gateway request, measured with the method and machine. - [Python API](https://criogenai.com/docs/reference/api/python/): The Python API reference of CriogenAI, one page per module: agents, tools, models, storage, workflows, patterns, MCP, telemetry and evals. - [Python API: Agents](https://criogenai.com/docs/reference/api/python/agent/): Python API reference, agents: Agent, Thread, Stream, Reply, RunResult, Decision, ApprovalRequest, Retry, and more. - [Python API: Tools](https://criogenai.com/docs/reference/api/python/tools/): Python API reference, tools: tool, Tool, ToolError, ToolContext. - [Python API: Hooks](https://criogenai.com/docs/reference/api/python/hooks/): Python API reference, hooks: HookContext, HookAction, ToolCall, ToolResult. - [Python API: Errors](https://criogenai.com/docs/reference/api/python/errors/): Python API reference, errors: CriogenError, ModelError, ToolExecutionError, LimitExceededError, ThreadBusyError, ThreadSuspendedError, StorageError, ValidationError, and more. - [Python API: Usage and cost](https://criogenai.com/docs/reference/api/python/usage/): Python API reference, usage and cost: estimate_cost. - [Python API: Models](https://criogenai.com/docs/reference/api/python/models/): Python API reference, models: OpenAI, Anthropic, Gemini, FakeModel, OpenAICompatible, OpenRouter, DeepSeek, Mistral, and more. - [Python API: Gateway](https://criogenai.com/docs/reference/api/python/gateway/): Python API reference, gateway: Gateway, ChatReply, Chunk, ChatStream. - [Python API: Keys and environment](https://criogenai.com/docs/reference/api/python/env/): Python API reference, keys and environment: parse_env, load_env, status, key_name. - [Python API: Storage and memory](https://criogenai.com/docs/reference/api/python/storage/): Python API reference, storage and memory: Storage, Memory. - [Python API: Collections](https://criogenai.com/docs/reference/api/python/collections/): Python API reference, collections: Collection, Document, Hit. - [Python API: Workflows](https://criogenai.com/docs/reference/api/python/workflow/): Python API reference, workflows: Workflow, CompiledWorkflow, WorkflowThread, END, NodeContext, suspend, goto, Interrupt, and more. - [Python API: Patterns](https://criogenai.com/docs/reference/api/python/patterns/): Python API reference, patterns: sequential, parallel, loop, custom, PatternResult, Pattern, iterative_refinement, review_and_critique, and more. - [Python API: Specialist agents](https://criogenai.com/docs/reference/api/python/specialists/): Python API reference, specialist agents: Specialist, register, unregister, get, available. - [Python API: MCP servers](https://criogenai.com/docs/reference/api/python/mcp/): Python API reference, mcp servers: McpServer, stdio, http, McpTool. - [Python API: Web search and page reading](https://criogenai.com/docs/reference/api/python/web/): Python API reference, web search and page reading: tavily_search, brave_search, search, default_tools, fetch. - [Python API: Telemetry](https://criogenai.com/docs/reference/api/python/telemetry/): Python API reference, telemetry: Telemetry. - [Python API: Trace viewer](https://criogenai.com/docs/reference/api/python/trace/): Python API reference, trace viewer: serve, TraceViewer, main. - [Python API: Evals](https://criogenai.com/docs/reference/api/python/evals/): Python API reference, evals: evaluate, Dataset, EvalResult, compare, EvalFailed, Case, Score, Scorer, and more. - [Python API: Readiness check](https://criogenai.com/docs/reference/api/python/ready/): Python API reference, readiness check: ready, ready_sync. - [TypeScript API](https://criogenai.com/docs/reference/api/typescript/): The TypeScript API reference of CriogenAI, one page per module: agents, tools, models, storage, workflows, patterns, MCP, telemetry and evals. - [TypeScript API: Agents](https://criogenai.com/docs/reference/api/typescript/agent/): TypeScript API reference, agents: Agent, AgentOptions, Thread, Stream, Reply, RunResult, RunOptions, CallOptions, and more. - [TypeScript API: Tools](https://criogenai.com/docs/reference/api/typescript/tools/): TypeScript API reference, tools: tool, Tool, ToolDefinition, ToolError, ToolContext, JsonSchema, StandardIssue, StandardResult, and more. - [TypeScript API: Hooks](https://criogenai.com/docs/reference/api/typescript/hooks/): TypeScript API reference, hooks: HookContext, HookAction, ToolCall, ToolResult, Hook. - [TypeScript API: Errors](https://criogenai.com/docs/reference/api/typescript/errors/): TypeScript API reference, errors: CriogenError, NativeUnavailableError, ModelError, ToolExecutionError, LimitExceededError, ThreadBusyError, ThreadSuspendedError, StorageError, and more. - [TypeScript API: Usage and cost](https://criogenai.com/docs/reference/api/typescript/usage/): TypeScript API reference, usage and cost: ModelUse, RunFacts, Price, estimateCost. - [TypeScript API: Models](https://criogenai.com/docs/reference/api/typescript/models/): TypeScript API reference, models: openai, anthropic, gemini, FakeModel, openaiCompatible, ModelOptions, ProviderModel, openrouter, and more. - [TypeScript API: Gateway](https://criogenai.com/docs/reference/api/typescript/gateway/): TypeScript API reference, gateway: Gateway, ChatInput, ChatOptions, ChatReply, Chunk, GatewayOptions, ChatStream. - [TypeScript API: Keys and environment](https://criogenai.com/docs/reference/api/typescript/env/): TypeScript API reference, keys and environment: parseEnv, LoadEnvOptions, loadEnv, envStatus, keyName. - [TypeScript API: Redaction](https://criogenai.com/docs/reference/api/typescript/redact/): TypeScript API reference, redaction: Redactor. - [TypeScript API: Storage and memory](https://criogenai.com/docs/reference/api/typescript/storage/): TypeScript API reference, storage and memory: Storage, Memory, StorageOptions, MemoryOptions, RetentionOptions. - [TypeScript API: Collections](https://criogenai.com/docs/reference/api/typescript/collections/): TypeScript API reference, collections: Collection, CollectionOptions, Document, Hit, CollectionTool. - [TypeScript API: Workflows](https://criogenai.com/docs/reference/api/typescript/workflow/): TypeScript API reference, workflows: Workflow, CompiledWorkflow, WorkflowThread, END, NodeContext, Suspend, Goto, suspend, and more. - [TypeScript API: Patterns](https://criogenai.com/docs/reference/api/typescript/patterns/): TypeScript API reference, patterns: sequential, parallel, loop, custom, CEILING, DEFAULT_MODEL_ENV, Step, PatternResult, and more. - [TypeScript API: Specialist agents](https://criogenai.com/docs/reference/api/typescript/specialists/): TypeScript API reference, specialist agents: SpecialistSettings, ExtendOptions, Specialist, register, unregister, get, available. - [TypeScript API: MCP servers](https://criogenai.com/docs/reference/api/typescript/mcp/): TypeScript API reference, mcp servers: McpServer, McpOptions, stdio, http, StdioOptions, HttpOptions, McpInfo, McpTool. - [TypeScript API: Web search and page reading](https://criogenai.com/docs/reference/api/typescript/web/): TypeScript API reference, web search and page reading: TAVILY_URL, BRAVE_URL, tavilySearch, braveSearch, search, defaultTools, fetchPage, fetch. - [TypeScript API: Telemetry](https://criogenai.com/docs/reference/api/typescript/telemetry/): TypeScript API reference, telemetry: Telemetry, TelemetryOptions. - [TypeScript API: Trace viewer](https://criogenai.com/docs/reference/api/typescript/trace/): TypeScript API reference, trace viewer: serveTraces, TraceViewer, TraceViewerOptions. - [TypeScript API: Evals](https://criogenai.com/docs/reference/api/typescript/evals/): TypeScript API reference, evals: evaluate, Dataset, EvalResult, compare, FORMAT, MAX_CASES, MAX_LINE_BYTES, MAX_OUTPUT_CHARS, and more. - [TypeScript API: Readiness check](https://criogenai.com/docs/reference/api/typescript/ready/): TypeScript API reference, readiness check: ready, ReadyReport, ReadyOptions. - [Rust API](https://criogenai.com/docs/reference/api/rust/): Rust API reference: every public item of the CriogenAI crates, with documentation, signatures and examples, from rustdoc. ## Blog - [CriogenAI 0.1.6: your models through Azure, Bedrock and Vertex AI](https://criogenai.com/blog/criogen-0-1-6/) (2026-11-11): Agents can now reach models through the cloud your company already uses, with its own keys and identities. And OpenAI models reason while they use tools. - [CriogenAI 0.1.5: MCP tools, a local trace viewer, evals and collections](https://criogenai.com/blog/criogen-0-1-5/) (2026-11-09): Four features in one release. Agents can use tools from any MCP server. Every run can be watched on a page on your own computer. Quality checks can fail CI. Documents can be searched by meaning. All of it works in Python, TypeScript and Rust. ## Optional - [Every doc in one file](https://criogenai.com/llms-full.txt) - [The Python and TypeScript API reference in one file](https://criogenai.com/llms-api.txt) - [Benchmark lab](https://criogenai.com/benchmarks/): CriogenAI, LangGraph and CrewAI on the same work - [Benchmark lab, live comparison](https://criogenai.com/benchmarks/#live): CriogenAI and LangChain side by side on one job - [Pattern playground](https://criogenai.com/playground/): every common agent pattern (ReAct, Reflexion, ReWOO, supervisor, swarm, IBM's agent types…), runnable in the browser, with the CriogenAI code