Architecture at a glance
See the AgentsKit ecosystem by layer, how the contracts compose, and how teams usually adopt it over time.
AgentsKit works best when you think of it as a layered ecosystem, not a single framework.
At the center is a small contract layer. Around it are packages for UI, runtime, data, and production. You can start with one layer and add the rest as your agent becomes more capable.
#The stack in one view
graph TD
core["@agentskit/core\ncontracts + primitives"]
ui["@agentskit/react Β· @agentskit/ink Β· framework bindings\nchat surfaces"]
providers["@agentskit/adapters\nmodel providers"]
runtime["@agentskit/runtime\nloops, delegation, orchestration"]
capabilities["@agentskit/tools Β· @agentskit/skills\nactions + behavior"]
data["@agentskit/memory Β· @agentskit/rag\ncontext + retrieval"]
ops["@agentskit/observability Β· @agentskit/eval Β· @agentskit/sandbox\ntrust + production controls"]
cli["@agentskit/cli Β· @agentskit/templates\nbootstrap + workflows"]
core --> ui
core --> providers
core --> runtime
core --> capabilities
core --> data
core --> ops
core --> cli
providers --> runtime
capabilities --> runtime
data --> runtime
runtime --> ui
ops --> runtime
cli --> ui
cli --> runtime#What each layer does
| Layer | Packages | Role |
|---|---|---|
| Contract layer | @agentskit/core | Shared types, controller, events, and contracts |
| UI layer | @agentskit/react, @agentskit/ink, framework bindings | Chat surfaces and framework-specific ergonomics |
| Provider layer | @agentskit/adapters | Model vendors, routing, fallbacks, local models |
| Runtime layer | @agentskit/runtime | Multi-step execution, delegation, orchestration |
| Capability layer | @agentskit/tools, @agentskit/skills | Tool use, integrations, behavior packaging |
| Data layer | @agentskit/memory, @agentskit/rag | Persistence, retrieval, embeddings, reranking |
| Production layer | @agentskit/observability, @agentskit/eval, @agentskit/sandbox | Tracing, quality control, safety |
| Bootstrap layer | @agentskit/cli, @agentskit/templates | Project setup, workflows, scaffolding |
#The six contracts
The reason the ecosystem composes is that the layers meet through six stable contracts:
Adapterβ swap model providersToolβ expose actions to the modelSkillβ package behavior and promptsMemoryβ persist and reload contextRetrieverβ fetch external contextRuntimeβ compose the loop that ties everything together
Deep dive: Concepts
#Three common adoption paths
#1. UI first
Start with @agentskit/react or @agentskit/ink, then add runtime and tools once the chat needs to do real work.
Best for:
- chat products
- prototypes
- customer-facing assistants
#2. Runtime first
Start with @agentskit/runtime and @agentskit/tools, then add a UI later if the workflow proves useful.
Best for:
- jobs
- internal automations
- research agents
- coding agents
#3. Knowledge first
Start with @agentskit/rag, @agentskit/memory, and a UI or runtime entry point, then harden with production controls.
Best for:
- internal copilots
- support assistants
- retrieval-heavy apps
#How teams usually grow the stack
- Pick a provider and a single entry point.
- Add runtime when the task becomes multi-step.
- Add tools when the model needs to act.
- Add memory and retrieval when context needs to persist.
- Add observability, evals, and safety before wider rollout.
#Where to go next
Explore nearby
- PeerGet started
Build your first agent, learn the stack, then go deeper.
- PeerWhich package do I need?
A 5-question decision tree from your use case to the one or two AgentsKit packages you actually need to install.
- PeerAgentsKit vs. alternatives
How AgentsKit compares to LangChain.js, Vercel AI SDK, Mastra, and LlamaIndex.js across the surface area that actually matters in production.