by truffle-ai
A coding agent and general agent harness for building and orchestrating agentic applications.
# Add to your Claude Code skills
git clone https://github.com/truffle-ai/dextoDexto is an agent harness—the orchestration layer that turns LLMs into reliable, stateful agents that can take actions, remember context, and recover from errors.
Think of it like an operating system for AI agents:
| Component | Analogy | Role | |-----------|---------|------| | LLM | CPU | Raw processing power | | Context Window | RAM | Working memory | | Dexto | Operating System | Orchestration, state, tools, recovery | | Your Agent | Application | Domain-specific logic and clients |
Dexto ships with a production-ready coding agent you can use immediately via the CLI or Web UI.
# Launch the coding agent (default)
dexto
# Or explicitly
dexto --agent coding-agent
What it can do:
Ready-to-use interfaces:
/commands, streaming output, and session managementThe coding agent is just one example of what you can build. Create your own agents by defining a YAML config—same architecture, your domain.
# macOS / Linux / WSL (native installer, recommended)
curl -fsSL https://dexto.ai/install | bash
# Windows PowerShell
irm https://dexto.ai/install.ps1 | iex
# Or build from source
git clone https://github.com/truffle-ai/dexto.git
cd dexto && pnpm install && pnpm install-cli
Upgrade/uninstall and migration troubleshooting live in docs:
# Start Dexto (launches setup wizard on first run)
dexto
More options:
dexto --mode cli # Terminal mode
dexto -p "create a landing page for a coffee shop" # One-shot task
dexto --auto-approve "refactor this codebase" # Skip confirmations
dexto -m claude-sonnet-4-5-20250929 # Switch models
dexto --help # Explore all options
Inside the interactive CLI, type / to explore commands—switch models, manage sessions, configure tools, and more.
# Configure defaults like LLM provider/model, API keys, or download local models
dexto setup
Logs are stored in ~/.dexto/logs/. Use DEXTO_LOG_LEVEL=debug for verbose output.
Switch models mid-conversation—no code changes, no restarts.
| Provider | Models | |----------|--------| | OpenAI | gpt-5.2, gpt-5.2-pro, gpt-5.2-codex, o4-mini | | Anthropic | Claude Sonnet, Opus, Haiku (with extended thinking) | | Google | Gemini 3 Pro, 2.5 Pro/Flash | | Groq | Llama 4, Qwen, DeepSeek | | xAI | Grok 4, Grok 3 | | Local | Ollama, GGUF via node-llama-cpp (Llama, Qwen, Mistral, etc.) | | + Gateways | OpenRouter, AWS Bedrock, Vertex AI, LiteLLM |
Run locally for privacy: Local models keep data on your machine with automatic GPU detection (Metal, CUDA, Vulkan).
Connect to Model Context Protocol servers—Puppeteer, Linear, ElevenLabs, Firecrawl, Sora, and more.
# agents/my-agent.yml
mcpServers:
filesystem:
type: stdio
command: npx
args: ['-y', '@modelcontextprotocol/server-filesystem', '.']
browser:
type: stdio
command: npx
args: ['-y', '@anthropics/mcp-server-puppeteer']
Browse and add servers from the MCP Store in the Web UI or via /mcp commands in the CLI.
Fine-grained control over what your agent can do:
permissions:
mode: manual # Require approval for each tool
# mode: auto-approve # Trust mode for local development
toolPolicies:
alwaysAllow:
- mcp--filesystem--read_file
- mcp--filesystem--list_directory
alwaysDeny:
- mcp--filesystem--delete_file
Agents remember which tools you've approved per session.
Conversations persist across restarts. Create memories that shape agent behavior.
# Continue last conversation
dexto -c
# Resume specific session
dexto -r session-abc123
# Search across all conversations
dexto search "database schema"
Agents can spawn specialized sub-agents to handle complex subtasks. The coding agent uses this to delegate exploration:
# In your agent config
tools:
- type: agent-spawner
allowedAgents: ["explore-agent"]
maxConcurrentAgents: 5
defaultTimeout: 300000 # 5 minutes
Built-in sub-agents:
Any agent in the Agent Registry can be spawned as a sub-agent—including custom agents you create and register.
Sub-agents run ephemerally, auto-cleanup after completion, and forward tool approvals to the parent—so users see one unified approval flow.
| Mode | Command | Use Case |
|------|---------|----------|
| Web UI | dexto | Chat interface with file uploads (default) |
| CLI | dexto --mode cli | Terminal interaction |
| Web Server | dexto --mode server | REST & SSE APIs |
| MCP Server | dexto --mode mcp | Expose agent as an MCP server over stdio |
Platform integrations: Discord, Telegram
Transport: stdio
Connect your Dexto agent as an MCP server in Claude Code or Cursor:
dexto --mode mcp --auto-approve --no-elicitation # Default agent
dexto --mode mcp --agent coding-agent --auto-approve --no-elicitation
npx dexto --mode mcp --agent coding-agent --auto-approve --no-elicitation
Example MCP config for Claude Code or Cursor:
{
"command": "npx",
"args": ["-y", "dexto", "--mode", "mcp", "--agent", "coding-agent", "--auto-approve", "--no-elicitation"]
}
--auto-approve and --no-elicitation are required for MCP mode since it runs non-interactively.
Transport: http/sse
dexto --mode server exposes your agent as an MCP server at /mcp for remote clients:
dexto --mode server --port 3001
ngrok http 3001 # Optional: expose publicly
Build AI agents programmatically. Everything the CLI does, your code can too.
npm install @dexto/core
import { DextoAgent } from '@dexto/core';
const agent = new DextoAgent({
llm: { provider: 'openai', model: 'gpt-5.2', apiKey: process.env.OPENAI_API_KEY }
});
await agent.start();
const session = await agent.createSession();
const response = await agent.generate('What is TypeScript?', session.id);
console.log(response.content);
// Streaming
for await (const event of await agent.stream('Write a story', session.id)) {
if (event.name === 'llm:chunk') process.stdout.write(event.content);
}
// Multimodal
await agent.generate([
{ type: 'text', text: 'Describe this image' },
{ type: 'image', image: base64Data, mimeType: 'image/png' }
], session.id);
// Switch models mid-conversation
await agent.switchLLM({ mo
No comments yet. Be the first to share your thoughts!