criogenai

CriogenAI: the simplest, fastest way to build AI agents · a LangChain alternative Run AI agents like production software.

A Rust engine with Python and TypeScript SDKs: 4× less framework overhead per agent turn than LangGraph in our benchmark. Approval gates, durable conversations, encryption at rest and an audit trail are part of the runtime, so your code is only the tools and the logic.

pip install criogenainpm install criogenai

Free to use, also commercially. Version 0.1, early.

thread ticket-7actor user:dr-rao
  1. step 1
    modelwants the order and the refund policy
    saved v1
  2. step 2
    get_ordercheck_refund_policyget_customer
    saved v2
  3. step 3
    issue_refundwaiting for a personapproved by user:dr-rao
    saved v3
  4. step 4
    model"Your refund of 40.00 is on its way."
    saved v4
completed in 4 steps, audit chain verified

One agent API for 450+ models, from every major provider or your own servers

  • OpenAI
  • Anthropic
  • Gemini
  • OpenRouter
  • DeepSeek
  • Mistral
  • xAI
  • Qwen
  • Moonshot · Kimi
  • Z.ai · GLM
  • Groq
  • Cerebras
  • Together AI
  • Fireworks AI
  • Kaggle
  • Ollama
  • LM Studio
  • vLLM
  • AnthropicClaude Sonnet 5
  • GoogleGemini 3.6 Flash
  • OpenAIGPT-5.4 nano
  • NVIDIANemotron 3.5 Super
  • MetaLlama 4 Maverick
  • MicrosoftPhi 4
  • MistralMistral Large 4
  • DeepSeekDeepSeek V4.1 Flash
  • QwenQwen3.8 Max
  • xAIGrok 4.7
  • GoogleGemma 4 31B
  • MoonshotKimi K3
  • CohereCommand A+
  • AmazonNova Premier
  • OpenAIgpt-oss-120b
  • IBMGranite 4.0

CriogenAI in 50 seconds

See a run, step by step

Each state has one colour, here and across the site: running, waiting for a person, done, failed. The first run waits for your decision.

Branch, run in parallel, wait for a person

A router picks the branches, three searches run at once, and the run stops before the refund. Approve or reject it yourself.

Workflows
requestclassifyescalatesearch_docssearch_ticketssearch_webmergereviewreply
A workflow
  1. run started on thread ticket-7
  2. step 1: classify asks the model
  3. router: three searches at once, escalate skipped
  4. step 2 saved: three results, all or nothing
  5. paused: the refund needs a person
  6. approved by you; the run resumes
  7. completed in 4 steps, every one saved

Kill the process, lose nothing

Every step and every finished tool call is saved. A retry, even from another machine, continues where the run stopped.

Conversations and recovery
thread.sendmodelget_ordersend_emailmodelanswer
A crash, then retry
  1. thread.send("Where is my refund?")
  2. the model calls two tools at once
  3. get_order finished: its result is saved
  4. the process dies while send_email runs
  5. a new process calls thread.retry()
  6. get_order is not run again: its saved result is used
  7. send_email finished; the step is saved
  8. answered; finished tools never ran twice

One endpoint for every model

Apps speak the OpenAI format to the gateway; routes decide which model answers, and fall back when one fails.

The LLM gateway
app.pyapp.tsgatewayopenaianthropicollama (yours)
The gateway
  1. app.py: POST /v1/chat/completions, model "support"
  2. route "support": openai, then ollama
  3. openai answers 429: rate limited
  4. falls back to ollama on your own server
  5. 200 OK, usage recorded
  6. app.ts: same endpoint, model "claude"
  7. 200 OK, in the OpenAI format

One engine, three languages

Scheduling, saving and limits live in the Rust engine. The SDKs only describe agents, so a run behaves the same in each.

from criogenai import Agent, ToolError, tool


@tool
async def get_order(order_id: str) -> dict:
    """Look up an order by id."""
    if order_id != "A-1001":
        raise ToolError(f"No order {order_id}")  # the model sees this and can recover
    return {"status": "shipped", "eta": "tomorrow"}


agent = Agent(
    "openai:gpt-5-mini",  # key from OPENAI_API_KEY
    instructions="You are a support agent. Be brief.",
    tools=[get_order],
)


async def main() -> None:
    result = await agent.run("Where is order A-1001?")
    print(result.text)


asyncio.run(main())
import { Agent, ToolError, tool } from "criogenai";

const getOrder = tool({
  name: "get_order",
  description: "Look up an order by id.",
  input: {
    type: "object",
    properties: { orderId: { type: "string" } },
    required: ["orderId"],
  },
  run: async ({ orderId }) => {
    if (orderId !== "A-1001") throw new ToolError(`No order ${orderId}`); // the model sees this
    return { status: "shipped", eta: "tomorrow" };
  },
});

const agent = new Agent({
  model: "openai:gpt-5-mini", // key from OPENAI_API_KEY
  instructions: "You are a support agent. Be brief.",
  tools: [getOrder],
});

const result = await agent.run("Where is order A-1001?");
console.log(result.text);
use criogenai_agent::{Agent, ToolError, tool_fn};
use criogenai_providers::{Endpoint, ProviderModel, ToolSpec};
use serde_json::json;

let model = ProviderModel::new(
    Endpoint::openai(std::env::var("OPENAI_API_KEY")?),
    "gpt-5-mini",
)?;

let get_order = tool_fn(
    ToolSpec::new(
        "get_order",
        "Look up an order by id.",
        json!({
            "type": "object",
            "properties": {"order_id": {"type": "string"}},
            "required": ["order_id"]
        }),
    ),
    |args, _ctx| async move {
        match args["order_id"].as_str() {
            Some("A-1001") => Ok(json!({"status": "shipped", "eta": "tomorrow"})),
            other => Err(ToolError::new(format!("No order {other:?}"))),
        }
    },
);

let agent = Agent::builder(model)
    .instructions("You are a support agent. Be brief.")
    .tool(get_order)
    .build()?;

let result = agent.run("Where is order A-1001?").await?;
println!("{}", result.text().unwrap_or_default());

Works with your models

Hosted APIs, model routers, Kaggle's free allowance and models on your own hardware, behind one agent API. Switching is one string, such as "anthropic:claude-sonnet-5-5" or "ollama:llama3.2".

  • OpenAI
  • Anthropic
  • Google Gemini
  • OpenRouter
  • DeepSeek
  • Mistral AI
  • xAI
  • Groq
  • Cerebras
  • Together AI
  • Fireworks AI
  • Qwen (Alibaba)
  • Moonshot AI (Kimi)
  • Z.ai (GLM)
  • Kaggle
  • Ollama
  • LM Studio
  • Any OpenAI- or Anthropic-compatible server (vLLM, LiteLLM, your own)
17providers by name (a key variable and the right settings built in), plus any compatible server you point it at
452models reachable through OpenRouter alone (their list, counted 2026-11-01); tool calls depend on the model
8models a standard Kaggle account's free AI allowance could call (each one tested, 2026-11-01)

Free for prototypes: Kaggle's model allowance

Use "kaggle:<model>"; CriogenAI gets and renews the hourly token from your Kaggle token. For prototypes and tests, not production traffic. How it works

  • anthropic/claude-sonnet-5@default
  • google/gemini-3.6-flash
  • google/gemini-3-flash-preview
  • google/gemini-3.5-flash-lite
  • google/gemini-3.1-flash-lite-preview
  • openai/gpt-5.4-nano-2026-03-17
  • openai/gpt-oss-120b
  • ibm/granite-4.0-h-small

Logos are trademarks of their owners and are shown only to say which services CriogenAI works with (icons from Simple Icons, CC0; a plain initial where there is none). CriogenAI is not affiliated with or endorsed by them.

What the runtime handles for you

Tools are plain functions

Python functions, TypeScript functions or Rust closures become tools. Their arguments are checked against a schema before your code runs, so a model's mistake never reaches it.

Agents and tools
Parallel steps that commit atomically

Tool calls of one turn run at the same time. A step commits completely or not at all, and limits stop a run that loops.

How a run works
Approval gates that outlive the process

Mark the risky tools. The run stops before they run and waits in the database until someone approves, rejects or edits the call, from any process.

Human approval
Crash recovery without repeated work

Conversations are saved after every step and every tool call, in SQLite or Postgres. After a crash, retry continues where the run stopped, without running finished tools again.

Conversations
An audit trail you can verify

An audit trail records runs, model calls, tool calls and decisions with the person who made them, and no message content. Data can be encrypted at rest and deleted on a schedule.

Encryption, audit, retention
Any model, through the cloud you already pay for

OpenAI, Claude and Gemini directly, or through Azure OpenAI, Amazon Bedrock and Google Vertex AI with your company's keys and identities. Open models on your own hardware through Ollama and vLLM. A gateway puts all of them behind one OpenAI-compatible endpoint.

Models and the gateway

Connect, search and measure

Tools from any MCP server

GitHub, file systems, databases, browsers, your own services: connect any MCP server, started locally or at a URL, and its tools become the agent's. CriogenAI speaks the current protocol and falls back for older servers.

MCP servers' tools
Search your documents by meaning

Collections store documents, encrypted when your storage is, and find the ones closest in meaning to a question. Give one to an agent as a search tool.

Collections and retrieval
Evals that fail the build when quality drops

Run an agent over your test cases, score the answers (text, JSON, tool use, budgets, a model as judge) and compare with the last good run, in CI.

Evals and quality gates
Every run on a page, on your own computer

A local trace viewer shows each run's model and tool calls on a time axis, with tokens and failures, without an account. Langfuse and any OpenTelemetry backend work too.

Tracing

Measured, with the method published

What the framework itself adds, with trivial steps and an instantly answering model, on one laptop (Ryzen 5 4600H, Windows 11). A real model call takes far longer; these numbers matter for wide or long workflows.

Workflow step

CriogenAI
21.4 µs
LangGraph
244 µs

11× less framework time per workflow step

Parallel node

CriogenAI
3.9 µs
LangGraph
334 µs

86× less framework time per parallel node

PerCriogenAI (Rust engine)LangGraph 1.2 (Python)
Workflow step21.4 µs244 µs
Parallel node3.9 µs334 µs

Also measured: the gateway adds 0.14 ms per request on localhost; a call from the Python SDK adds 0.2 ms. All numbers and how to reproduce them.

Frequently asked

Is CriogenAI the fastest AI agent framework?

It has the lowest framework overhead of the frameworks we measured. On one machine (benchmark of 2026-10-21), an agent turn costs 0.29 ms in CriogenAI, 1.23 ms in LangGraph and 34 ms in CrewAI, and 1,000 agent runs at once take 333 ms against 2.85 s and 48.97 s. With one agent and a real model, the model's own time dominates and all three are close; the gap matters for many steps, many tools and many users at once. The benchmarks page has every number and the kit to rerun it.

Is CriogenAI a LangChain or LangGraph alternative?

Yes. It covers what most teams use LangChain and LangGraph for: agents with tool calling, workflow graphs with branches, joins and loops, human approval, saved conversations and memory, from Python or TypeScript. It installs as one package (1 against 42 for LangGraph) and passed 5 of 5 reliability tests by default, against 2 for LangGraph. It has no catalogue of integrations of its own: any MCP server's tools work instead, and document collections search by meaning. Document loaders and text splitters are next.

Is it ready for production?

It is 0.1: tested on Windows and Linux with simulated and real models, but young. The API may change before 1.0. Start with a pilot, and see exactly what is built on the status page.

Does my data leave my servers?

Only to the model provider you choose. With a self-hosted model (Ollama, vLLM) nothing leaves your network. Storage is your own SQLite file or Postgres database.

How is it different from LangGraph or CrewAI?

CriogenAI's engine is written in Rust and shared by its Python, TypeScript and Rust APIs, so a run behaves the same in all three. Its storage includes encryption at rest and a hash-chained audit trail. The measured cost per step, compared with LangGraph on the same workflows, is on the benchmarks page.

What does it cost?

Nothing: CriogenAI is open source under MIT or Apache-2.0, free to use, also commercially. You pay your model provider, if you use one.

Ship a working agent today

The quickstart takes about ten minutes, in Python or TypeScript.

Start the quickstart