Agent RT Documentation
Documentation menu
Guides

Migration

Python and TypeScript applications can adopt Agent RT incrementally through compatibility entry points, then move toward native runtime contracts when they need deeper control over tools, state, policy, or execution.

Compatibility surfaces

For common imports, migration can be as small as changing the module prefix. Keep the class or symbol you already use and point the import at Agent RT's compatibility layer. Migration field testing is ongoing; 65+ third-party repositories currently pass their test suites both before and after migration to Agent RT.

Python

LangChain
−from langchain_openai import ChatOpenAI
+from agent_rt.langchain_openai import ChatOpenAI
LlamaIndex
−from llama_index.llms.openai import OpenAI
+from agent_rt.llama_index.llms.openai import OpenAI
LangChain · Qdrant
−from langchain_qdrant import QdrantVectorStore
+from agent_rt.langchain_qdrant import QdrantVectorStore
LlamaIndex · Qdrant
−from llama_index.vector_stores.qdrant import QdrantVectorStore
+from agent_rt.llama_index.vector_stores.qdrant import QdrantVectorStore
OpenAI
−from openai import AsyncOpenAI
+from agent_rt.openai import AsyncOpenAI
Anthropic
−from anthropic import AsyncAnthropic
+from agent_rt.anthropic import AsyncAnthropic
Deep Agents
−from deepagents import create_deep_agent
+from agent_rt.deepagents import create_deep_agent
LiteLLM
−from litellm import completion
+from agent_rt.litellm import completion
OpenRouter
−from openrouter import OpenRouter
+from agent_rt.openrouter import OpenRouter

TypeScript / JavaScript

LangChain
−import { ChatOpenAI } from "@langchain/openai";
+import { ChatOpenAI } from "agent-rt/@langchain/openai";
LlamaIndex
−import { OpenAI } from "@llamaindex/openai";
+import { OpenAI } from "agent-rt/@llamaindex/openai";
LangChain · Qdrant
−import { QdrantVectorStore } from "@langchain/qdrant";
+import { QdrantVectorStore } from "agent-rt/@langchain/qdrant";
LlamaIndex · Qdrant
−import { QdrantVectorStore } from "@llamaindex/qdrant";
+import { QdrantVectorStore } from "agent-rt/@llamaindex/qdrant";
OpenAI
−import OpenAI from "openai";
+import OpenAI from "agent-rt/openai";
Anthropic
−import Anthropic from "@anthropic-ai/sdk";
+import Anthropic from "agent-rt/@anthropic-ai/sdk";
Deep Agents
−import { createDeepAgent } from "deepagents";
+import { createDeepAgent } from "agent-rt/deepagents";
OpenRouter
−import { OpenRouter } from "@openrouter/sdk";
+import { OpenRouter } from "agent-rt/@openrouter/sdk";

Migrate with one command

Run one command in your project to rewrite every supported import:

uvx agent-rt migrate   # Python
npx agent-rt migrate   # TypeScript / JavaScript

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. Nothing is sent automatically. Install agent-rt (and pytest for Python) in the project first. Per-test comparison in TypeScript needs Vitest or Jest.

“Runs on Agent RT” badge

Maintainers whose repository runs on Agent RT can add this badge to their README: Runs on Agent RT

[![Runs on Agent RT](https://agent-rt.pro-genai.com/assets/badge/runs-on-agent-rt.svg)](https://agent-rt.pro-genai.com/#migration)

The badge is opt-in: we never open pull requests or issues asking repositories, including those on the migration wall, to add it.

Adopt in layers

Start at the compatibility entry point closest to the code you already have. Once behavior is stable, move runtime-sensitive concerns—tools, run limits, sandboxing, retrieval, memory, policy, and checkpoints—onto Agent RT-native contracts where the control boundary is explicit.

Supported compatibility themes

The migration layer covers common chat/completion entry points, streaming, tool history, OpenAI Responses continuation, file-search integration through Agent RT retrieval providers, web retrieval integration, reasoning/thinking controls, batch lifecycle compatibility, and read/query vector-store adapters for Chroma, Pinecone, Qdrant, Milvus, and Weaviate.

LangChain compatibility exposes vendor-shaped imports such as agent_rt.langchain_qdrant and agent-rt/@langchain/qdrant. LlamaIndex compatibility exposes agent_rt.llama_index.vector_stores.qdrant and agent-rt/@llamaindex/qdrant, including integration with VectorStoreIndex.from_vector_store() / fromVectorStore(). These adapters query existing collections; vendor write/admin lifecycle APIs remain outside the compatibility layer. See the vector database guide for the complete mapping.

Complete migration referenceThis page is the navigation-oriented overview. Read the full migration reference for API coverage, framework-specific compatibility notes, and code examples.