Migrating¶
Two guides for the two most common starting points. Each maps concept-for-concept, shows a side-by-side rewrite, and calls out what you lose (there is always something) and what you gain.
-
From LangChain
You already have chains, tools, and an
AgentExecutor. Here's the concept-to-concept mapping, a full before/after, and an honest read on where LangChain still wins (large integration catalog). -
From vanilla asyncio + provider SDK
You wrote your own
messages.createloop with aforover tool calls. Here's the same loop as aReActCognitionand every resilience/cancel/budget primitive you were about to write yourself.
If your starting point is LlamaIndex, this round doesn't have a dedicated guide — the shapes differ enough (LlamaIndex is retrieval-first, agentkit is composition-first) that a direct mapping would mislead more than help. Read the Cheatsheet and Why agentkit instead, and open an issue if a proper guide would help.