Production AI agents without the framework tax: in Python and TypeScript. β‘
Agent RT gives agents a clear execution boundary for tools, streaming, structured output, permissions, approvals, memory, checkpoints, sandboxing, observability, and deploymentβwithout requiring a heavyweight orchestration stack.
One runtime. Two languages. Any model provider. Production controls built in. π§©
Artie (AΒ·RΒ·T, for Agent RT) is the running robot in the logo, and greets you in the terminal when agent-rt starts. artie is a command alias: artie migrate, artie demo, and every other agent-rt command and option work the same. Artie has moods: it raises a shield when Guard blocks a tool call and celebrates when a migration passes. Its three flagship features have names:
- π‘οΈ Guard β action blockers, including Agent Action Guard, stop a harmful tool call before it runs.
- β»οΈ Checkpoints β resume a run with the turn, tool-call, and token budgets it had already used.
- π§± Wall β the migration wall: 65+ third-party repositories that pass their tests before and after migrating.
- πͺ 8β37Γ fewer input tokens per prompt than Codex, Claude Code, opencode, and Copilot CLI
- π§ 5β14Γ less memory per CLI process than the same agent CLIs
- π¦ 66Γ smaller npm install than LangChain.js (1.24 MiB vs 82.44 MiB)
- β‘ 5.8Γ less framework overhead than LangChain in Python (1.56 ms vs 9.03 ms warm)
- π 65+ third-party repositories pass their tests before and after migration
Measured against deterministic localhost mock models, so the numbers show runtime and harness overhead, not model latency or task quality. Part of the CLI token gap comes from Agent RT's smaller built-in tool set. Method and raw data: comparison/.
Runs on:
Python
pip install agent-rtTypeScript / Node.js
npm install agent-rtβ±οΈ Try it in 10 seconds with the API key you already use for Claude Code, Codex, opencode, or Copilot CLI (no config file needed):
pip install 'agent-rt[cli,anthropic]'
agent-rt claude -p "explain this stack trace" # or: agent-rt codex exec "..." Β· agent-rt opencode run "..." Β· agent-rt copilot -p "..."Only API-key setups are reused; subscription sign-ins stay with the official clients (details).
π¬ No API key? uvx agent-rt demo (or npx agent-rt demo) runs a scripted mock model through a prompt-injection attack and shows Guard stopping rm -rf ~ before the tool runs. agent-rt web --demo replays it in a time-travel debugger where you can fork from any checkpoint.
β‘οΈ Installation Β· Quickstart
- from openai import OpenAI
+ from agent_rt.openai import OpenAI- import OpenAI from "openai";
+ import OpenAI from "agent-rt/openai";The same prefix works for supported subsets of Anthropic, OpenRouter, LangChain, Deep Agents, LlamaIndex, and OpenAI Agents (plus LiteLLM, AutoGen, and CrewAI in Python). See the migration guide.
Or run uvx agent-rt migrate (Python) or npx agent-rt migrate (TypeScript/JavaScript) in your project. It runs your tests before and after the rewrite and keeps it only if nothing new fails: every test that fails afterwards must have failed before, in the same test at the same line. Otherwise every file is restored. It then prints a before-and-after card (tests, test time, peak memory, package size) and, for a GitHub repository, a pre-filled issue link to add it to the migration wall. See automatic migration.
Migrated? Add the opt-in badge to your README.
- πͺΆ Lightweight and measurable β start with the runtime core and add integrations only when needed; reproducible cross-framework benchmarks live in
comparison/. - π‘οΈ Controlled β permissions, composable action blockers, approvals, deterministic PII morphing, limits, guardrails, and sandbox boundaries are runtime concepts, not add-ons.
- π Provider-neutral, two languages β OpenAI, Anthropic, compatible endpoints, or custom providers, with aligned contracts in
Python and
TypeScript.
- π Migration-tested β ongoing compatibility field testing has 65+ third-party repositories passing their test suites both before and after migration to Agent RT.
Decision models (such as Laya and other Jev-compatible models) answer typed choice/score questions for runtime control-plane gates instead of generating text. Toolbase can combine local, deferred, and MCP tools, remove unsafe definitions with a Decision model, pass only the relevant subset to each turn, and keep tool_search available for safe fallback discovery; the same Decision layer also gates memory, reranks retrieval results with optional top-k selection, and classifies failures. Every Decision helper also works with the OpenAI Decisions API (decision_model: {provider: openai}).
- π§ Agent memory β
AgentConfig.memorymixes strings, objects, and stores from LangChain, LangGraph, LlamaIndex, AutoGen, OpenAI Agents, or mem0.load_memory()/loadMemory()connect mem0 (default), Zep, Letta, Supermemory, or memU (Python) and store finished conversations withremember()(details). - β
Task lists β
TodoListgives a model onetodotool with a separate list per session; on by default in the CLI and web UI (details). - π₯οΈ Terminal CLI and web UI (Python) β
agent-rtandagent-rt webshare sessions, so a session started in one resumes in the other; edits need in-page or terminal approval (details). - π¬ Chat bots (Python, beta) β
agent-rt serve telegram,discordanswers allowed users, with no workspace tools (details).
β Built-in Β· β Available / integration-dependent Β· β Not a primary focus
π See reproducible benchmarks β
A tool the model may call, restricted by a capability grant and a model-call budget (Python shown; see the TypeScript package for the npm quick start):
registry = ToolRegistry()
registry.register(
ToolDefinition(
name="get_weather",
description="Get the current weather for a city.",
input_schema={
"type": "object",
"required": ["city"],
"properties": {"city": {"type": "string"}},
"additionalProperties": False,
},
side_effect="read",
),
handler=get_weather, # async (arguments, cancellation_token) -> dict
)
loop = AgentLoop(
load_model(load_config()), # models from agent-rt.yaml: OpenAI, Anthropic, or compatible endpoints
tool_registry=registry,
capability_grant=CapabilityGrant(tools=("get_weather",)),
execution_budget=ExecutionBudget(ExecutionBudgetLimits(max_model_calls=5)),
)
result = await loop.run(agent, messages)Arguments are validated against the schema, tools outside the grant never run, and the budget stops runaway loops. Full runnable versions are in the examples.
| Topic | Documentation |
|---|---|
| Runtime model | How Agent RT executes agents |
| Tools & safety | Tools, policy, permissions, approvals, and guardrails |
| State & memory | State, memory, checkpoints, and artifacts |
| Production | Sandboxing, observability, evaluation, and deployment |
| Migration | LangChain, LlamaIndex, OpenAI, and Anthropic migration |
| Runtime guide | Providers, memory packages, API server, CLI, web UI, chat bots, sandboxes, skills, and migration entry points |
| Features | Features, defaults, and configuration |
| Architecture | Architecture and extension contracts |
| Development | Contributor setup and test workflows |
π Full documentation: agent-rt-pro.github.io/docs
Python Β· TypeScript Β· Python examples Β· TypeScript examples
The inbound API server, terminal CLI, web UI, chat bots, memU memory, and AutoGen/CrewAI/LiteLLM migration shims are Python-only.
MIT β see LICENSE.


