Rust-speed agents, Python-simple View on GitHub

Production agent framework

Build agents without building the framework first.

litGraph combines an explicit, easy-to-test Python agent harness with a deterministic Rust runtime for graphs, tools, retrieval, streaming, memory, and durable execution.

1 wheelCPython 3.9–3.13+ via abi3
43 cratesPay only for the Rust pieces you use
0 hard depsPython standard library by default
from litgraph import create_agent
from litgraph.providers import OpenAIChat
from litgraph.tools import CalculatorTool

harness = create_agent(
    OpenAIChat(model="gpt-5"),
    tools=[CalculatorTool()],
    instructions="Solve the task and verify the result.",
    trace_path=".litgraph/traces.jsonl",
)

result = harness.run("What is 17 + 25?")
print(result.output)

The model is always explicit. Planning, virtual scratch space, streaming, event hooks, JSONL traces, and evaluation are ready when you need them.

Pick the right level

What is included

ReAct Plan-execute Supervisor Typed graphs Token streaming Structured output HNSW BM25 + RRF + MMR SQLite / Postgres / Redis OpenTelemetry MCP HTTP + SSE

The framework includes provider adapters, deterministic testing models, document ingestion, vector stores, memory, caching, retry and budget controls, evaluation metrics, checkpointing, human-in-the-loop interrupts, and HTTP serving. The reference map links every subsystem to its canonical guide, tests, and source.

A runtime designed for agents

Python APIPyO3 boundaryshared Tokio runtimeRust schedulerprovider / store

Hot paths—HTTP, SSE parsing, tokenization, vector math, graph scheduling, JSON repair, RRF, and MMR—live in Rust. Python remains the orchestration surface, with the interpreter released around blocking native work. This produces shallow stacks, real parallel graph branches, and one native wheel across supported CPython versions.

Deliberately explicit

litGraph avoids global state, import-time monkey-patching, hidden environment discovery, per-tool configuration files, and a hierarchy for every feature. Provider credentials can follow their conventional environment variables, but the model, tools, graph, storage, and policies remain visible in your code.

Choose litGraph when you need predictable execution, a small runtime surface, Rust throughput, and Python ergonomics. Choose a larger ecosystem when connector breadth matters more than runtime control. See the full framework comparison.

Continue

Start with the Pixi setup, build through the agent harness, then add graphs or retrieval and memory as the solution grows.