Migrating to AgentsKit
Guides for moving from other frameworks. Honest about what transfers easily and what doesn't.
AgentsKit isn't in conflict with the libraries you're already using β but if you're hitting their limits, these guides walk you through the move.
| From | Guide |
|---|---|
| Vercel AI SDK | from-vercel-ai-sdk |
| LangChain.js | from-langchain |
| LangGraph | from-langgraph |
| LlamaIndex | from-llamaindex |
| OpenAI Assistants | from-openai-assistants |
| Mastra | from-mastra |
#Choose your migration path
- Coming from a chat-first stack: start with Build your first agent, then migrate the UI and provider seam first.
- Coming from a large abstraction stack: read Architecture at a glance, then replace one layer at a time.
- Coming from an agent-first framework: compare use cases and runtime responsibilities before changing code shape.
#Before you migrate
Read the "When you should NOT use AgentsKit" section of the README. If your use case falls in there, stay where you are β that's the honest answer.
#What stays the same
Regardless of what you're coming from:
- Your prompts β system prompts, few-shot examples, tool descriptions transfer as-is
- Your tool implementations β the functions that do the work (fetch, read file, call API) don't change
- Your provider accounts β same API keys, same billing
#What changes
- The shape of the client library β imports, hooks, class instances, method names
- How tools are declared β AgentsKit uses a
ToolDefinitionobject withschema(JSON Schema 7) - How the agent loop runs β AgentsKit's
createRuntimeownsmaxSteps, delegation, memory, retrieval
#Philosophy
Migration guides here are honest: we show the before/after, call out what AgentsKit does better, and call out what the other framework does better. If we can't beat the other option on a given axis, we say so.
#Good first landing points
Explore nearby
- PeerFrom Vercel AI SDK
Side-by-side migration guide. Map your Vercel AI SDK code to AgentsKit β with honest callouts about where each wins.
- PeerFrom LangChain.js
Side-by-side migration guide. Map your LangChain.js code to AgentsKit β with honest callouts about where LangChain still fits.
- PeerFrom LangGraph
Side-by-side migration guide. Map LangGraph stateful graphs to AgentsKit runtime + topologies.
AgentsKit vs. alternatives
How AgentsKit compares to LangChain.js, Vercel AI SDK, Mastra, and LlamaIndex.js across the surface area that actually matters in production.
From Vercel AI SDK
Side-by-side migration guide. Map your Vercel AI SDK code to AgentsKit β with honest callouts about where each wins.