Agent Frameworks
An agent already written with an agent framework can run on Dex without a rewrite. A framework adapter wraps the agent in a session Flow, one Flow per session, and keeps the framework's own agent definition, tools and prompts.
How a session runs
The framework makes one model call per Step. Each tool call the model asks for then runs as its own Step, and the tool calls of one turn run in parallel. When they finish, the session goes back to the model with their results.
A crash repeats only the call that was running. Nothing replays the loop, so the framework code needs no determinism rules, and a code change takes effect at the next Step.
The Claude Agent SDK is the exception: it runs its own loop in a CLI subprocess, so its adapter runs each whole turn as one Step.
Tool policies and approvals
Each tool gets a ToolPolicy that marks it as a read, an idempotent write, or a write that must run once. Reads and idempotent writes retry. Other writes get a single attempt, so a retry never repeats them silently. A tool call that needs approval waits in its own Step until someone answers, for as long as it takes.
Install
Python adapters are on PyPI:
pip install dex-agents-pydantic-ai "pydantic-ai-slim[openai]"
pip install dex-agents-langgraph
pip install dex-agents-openai-agents
pip install dex-agents-google-adk
pip install dex-agents-claude-agent-sdk
TypeScript adapters are on npm, with the core and the Dex SDK as peer packages:
npm i @superdurable/dex-agents-vercel-ai @superdurable/dex-agents @superdurable/dex ai zod
npm i @superdurable/dex-agents-mastra @superdurable/dex-agents @superdurable/dex @mastra/core zod
npm i @superdurable/dex-agents-openai-agents @superdurable/dex-agents @superdurable/dex @openai/agents zod
npm i @superdurable/dex-agents-claude-agent-sdk @superdurable/dex-agents @superdurable/dex zod
Adapters
Each adapter's README has a runnable example and its options.
| Framework | Language | Adapter |
|---|---|---|
| Pydantic AI | Python | pydantic-ai |
| LangChain and LangGraph | Python | langgraph |
| OpenAI Agents SDK | Python, TypeScript | Python, TypeScript |
| Google ADK | Python | google-adk |
| Vercel AI SDK | TypeScript | vercel-ai |
| Mastra | TypeScript | mastra |
| Claude Agent SDK | Python, TypeScript | Python, TypeScript |