Open source · MIT · v0.1.0

A drop-in replacement for LangGraphLangGraph.
Same API. Rust engine. 10× faster.

Agentmatic takes your LangGraph code, your LangChain tools, and your existing workflows — and runs them on a compiled Rust engine. Change one import. Keep everything else. Get built-in circuit breakers, retry, dead-letter queues, and self-hosted distributed execution — MIT-licensed, no platform fees.

  • 10–15× faster graph traversal
  • 70–80× faster channels
  • 50–80% less memory
  • 5 native SDKs
$pip install agentmatic
from agentmatic import Agent, OpenAI, tool

@tool
def calculator(expression: str) -> str:
    """Evaluate a math expression."""
    return str(eval(expression))

agent = Agent.build(
    "math-helper",
    llm=OpenAI(),
    tools=[calculator],
)
result = agent.invoke("What is 42 * 17?")

Same API surface in every language. Same Rust engine underneath.

Performance

Same graphs. Native speed.

The Pregel runtime is rewritten in Rust and compiled to native code on every platform. Channels are SPSC ring buffers. The scheduler is lock-free. State diffs are zero-copy. The result: agents that respond before LangGraph would have started.

Graph traversalops/ms
agentmatic
100.0
LangGraph
8.0
Channel throughputmsgs/ms
agentmatic
100.0
LangGraph
1.3
Memory footprint% of LangGraph
agentmatic
38.0
LangGraph
100.0
Cold start% of LangGraph
agentmatic
22.0
LangGraph
100.0

Numbers from the internal benchmark suite (graphs ranging 100 nodes → 10k nodes, mixed ReAct + Supervisor workloads). Higher is better for the first two; lower is better for the last two.

Architecture

One engine. Five languages. Zero glue.

A single Rust core powers PyO3 (Python), napi-rs (TypeScript), CGO (Go), and JNI (Java) bindings. Native Rust is just cargo add agentmatic. Same API surface, same engine, same correctness guarantees in every language.

  • Drop-in StateGraph, conditional edges, time travel, HITL
  • Pregel runtime + SPSC ring-buffer channels (Rust-native)
  • Lock-free scheduler, zero-copy state diffs
  • OpenTelemetry tracing wired in by default
Agentmatic architecture: 5 SDKs over one Rust engine over sub-engines and integrations Your application Python TypeScript Rust Go Java Agentmatic Core (Rust) Pregel · StateGraph · State machine · Channels Checkpointing Resilience (CB · Retry · DLQ) Distributed runtime OpenAI · Anthropic · Gemini · Bedrock · Ollama · MCP · LangChain bridge · Qdrant · Postgres · S3
One engine. Five SDKs. Production primitives in the box.

Agentmatic vs the rest

Stack-for-stack comparison.

Dimension Agentmatic LangGraph CrewAI
Compatibility Drop-in for LangGraph Different paradigm
LangChain tools Bridge wrappers included Native Via LangChain
Engine Rust (compiled) Python Python
Graph traversal 10–15× faster Baseline
Circuit breakers Built-in
Retry + DLQ Built-in Platform (paid)
Distributed cluster Built-in, self-hosted Platform (paid)
Language SDKs Python, TS, Go, Java, Rust Python, JS Python
Checkpointing Memory · SQLite · Postgres · Redis · S3 Memory · SQLite · Postgres
Visual studio Built-in LangGraph Studio
License MIT MIT Apache-2.0

Full comparisons with AutoGen, Vercel AI SDK, OpenAI Agents SDK and others on the /compare hub.

FAQ

Common questions.

An open-source AI agent framework. Drop-in compatible with LangGraph, runs on a Rust engine. Build agents in Python, TypeScript, Go, Java, or Rust — same API in every language.

Ship your next agent in minutes, not weeks.

MIT licensed. Drop-in for LangGraph. Native SDKs in 5 languages. Battle-tested resilience primitives in the box.