Stop Wrestling with Agent Orchestration—Dexto Does It for You
What if every AI agent you built didn't just respond but actually remembered, recovered, and got smarter over time? Here's the brutal truth: most developers are duct-taping together LLM calls with fragile prompt engineering and praying nothing breaks in production. Your agents forget context between sessions. They crash when tools fail. They can't switch models without rewriting half your codebase. Sound familiar?
There's a better way. Enter Dexto—the open agent harness that's quietly becoming the secret weapon of developers building serious AI applications. Built by Truffle AI, Dexto isn't just another LLM wrapper. It's the orchestration layer that transforms raw language models into production-grade agents with state management, tool orchestration, persistent memory, and error recovery—out of the box. No more reinventing the wheel. No more 3 AM debugging sessions because your agent lost its mind after the fifth API call. Whether you're building coding agents, autonomous assistants, or multi-agent systems, Dexto gives you the infrastructure that should have existed all along.
What Is Dexto?
Dexto is an open-source agent harness—the missing operating system for AI agents. While everyone else is busy comparing LLM benchmarks, Truffle AI recognized the real bottleneck: orchestration. Raw LLMs are like CPUs without an operating system. Powerful, yes, but utterly useless without memory management, process scheduling, and I/O handling.
| 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 |
Created by Truffle AI, Dexto sits in that critical gap between model and application. It's configuration-driven—define your agents in YAML, swap models and tools without touching code. It ships with session management, multimodal support, observability, and 50+ LLM integrations. And it's designed to run anywhere: your laptop, the cloud, or hybrid deployments through CLI, Web UI, REST API, Discord, Telegram, or embedded directly in your applications.
The project is currently in Beta under the Elastic License 2.0, with an active Discord community and rapidly growing ecosystem. What makes it genuinely exciting isn't just the feature list—it's the architectural philosophy. Dexto treats agent configuration as infrastructure-as-code, making your AI systems version-controllable, portable, and reproducible.
Key Features That Separate Dexto from the Pack
50+ LLMs with Instant Switching
Stop committing to one model. Dexto lets you switch models mid-conversation with zero code changes. OpenAI's GPT-5.2, Anthropic's Claude Sonnet, Google's Gemini 3 Pro, Groq's Llama 4, xAI's Grok 4, or local models via Ollama and node-llama-cpp with automatic GPU detection (Metal, CUDA, Vulkan). Cloud platforms like AWS↗ Bright Coding Blog Bedrock and Vertex AI. Gateway providers like OpenRouter and LiteLLM. The flexibility is staggering.
MCP Integration: 30+ Tools Ready to Connect
The Model Context Protocol is revolutionizing how agents interact with external systems. Dexto embraces this fully with built-in MCP server connectivity—Puppeteer for browser automation, Linear for project management, ElevenLabs for voice, Firecrawl for web scraping, Sora for video generation, and more. Browse and install from the MCP Store directly in the Web UI.
Human-in-the-Loop Security
Not ready to let your agent run wild? Fine-grained permission controls let you require manual approval per tool, auto-approve trusted operations, or set always-deny policies for dangerous actions like file deletion. Agents remember your approvals per session, creating a smooth, secure workflow.
Persistent Sessions & Semantic Memory
Conversations survive restarts. Search across your entire conversation history. Create persistent memories that shape agent behavior over time. This isn't token-limited context stuffing—it's genuine long-term memory architecture.
Multi-Agent Orchestration
Agents spawning sub-agents. The coding agent delegates exploration to specialized sub-agents. Each runs ephemerally, auto-cleans up, and forwards approvals to the parent. Build complex systems that collaborate, delegate, and solve problems beyond any single agent's capability.
Four Runtime Modes
Web UI for chat interactions. CLI for terminal-native workflows. Web Server for REST and SSE APIs. MCP Server mode to expose your agent as an MCP server itself—embed Dexto agents directly into Claude Code or Cursor.
Real-World Use Cases Where Dexto Dominates
Autonomous Coding Agents
The flagship use case. Dexto's built-in coding agent builds applications from scratch, reads and refactors entire codebases, executes shell commands, runs tests, and spawns exploration sub-agents to understand unfamiliar code. With 50+ LLM support, you can optimize for speed (Groq), quality (Claude Opus), or cost (local models)—switching on the fly.
Production AI Assistants
Build digital companions that remember user preferences across months of interaction. The persistent memory system and session management mean your assistant doesn't just process requests—it builds relationships. Perfect for customer support, personal productivity, or specialized professional assistants.
Multi-Agent Research Systems
The triage agent demonstrates how multiple specialized agents collaborate. A coordinator delegates to research, analysis, and writing agents. Each handles subtasks, reports back, and the system synthesizes comprehensive outputs. Scale this to automated report generation, competitive intelligence, or scientific literature review.
MCP-Powered Tool Ecosystems
Connect your agent to the entire MCP ecosystem. Browser automation for web workflows. File system operations for document processing. Voice synthesis for audio content. Database queries for business intelligence. The MCP Store makes discovering and integrating tools effortless.
Embedded Agent Infrastructure
Use Dexto as the backend for your own products. The SDK and REST API let you build custom frontends while leveraging Dexto's orchestration. The MCP server mode means Cursor and Claude Code users can access your specialized agents directly.
Step-by-Step Installation & Setup Guide
Getting started with Dexto takes under two minutes. Here's every path to a running system.
Quick Install (Recommended)
macOS / Linux / WSL:
# Native installer—handles dependencies automatically
curl -fsSL https://dexto.ai/install | bash
Windows PowerShell:
# One-line install for Windows environments
irm https://dexto.ai/install.ps1 | iex
Build from Source
# Clone the repository
git clone https://github.com/truffle-ai/dexto.git
cd dexto
# Install dependencies (requires pnpm)
pnpm install
# Build and install CLI globally
pnpm install-cli
First Run & Configuration
# Launch Dexto—triggers interactive setup wizard on first run
dexto
# Configure defaults: LLM provider, API keys, local models
dexto setup
The setup wizard walks through provider selection, API key configuration, and optional local model downloads. All settings are stored in ~/.dexto/ with logs at ~/.dexto/logs/. Debug verbose output with:
DEXTO_LOG_LEVEL=debug dexto
Essential CLI Patterns
# Terminal-native mode
dexto --mode cli
# One-shot task execution
dexto -p "create a landing page for a coffee shop"
# Skip confirmations for trusted operations
dexto --auto-approve "refactor this codebase"
# Switch models on the fly
dexto -m claude-sonnet-4-5-20250929
# Continue previous conversation
dexto -c
# Resume specific session
dexto -r session-abc123
# Search conversation history
dexto search "database schema"
Inside interactive CLI, type / to explore commands—model switching, session management, tool configuration, and more.
REAL Code Examples from Dexto
Let's dive into actual code from the repository, with detailed explanations of how to leverage Dexto's power.
Example 1: MCP Server Configuration
The foundation of Dexto's tool ecosystem is YAML-based MCP server configuration:
# agents/my-agent.yml
mcpServers:
filesystem:
type: stdio # Standard I/O transport for local processes
command: npx # Use npx to run without global install
args: ['-y', '@modelcontextprotocol/server-filesystem', '.']
browser:
type: stdio
command: npx
args: ['-y', '@anthropics/mcp-server-puppeteer']
What's happening here? This configuration defines two MCP tool servers. The filesystem server gives your agent read/write access to the current directory ('.'), while the browser server provides Puppeteer-based web automation. The stdio transport means these run as local child processes—secure, fast, and isolated. The -y flag auto-accepts npx prompts. This declarative approach means you can version-control your agent's capabilities, share configurations across teams, and swap tools without code changes.
Example 2: Permission Policies for Safe Automation
Production agents need guardrails. Dexto's permission system is remarkably granular:
permissions:
mode: manual # Require approval for each tool execution
# mode: auto-approve # Trust mode for rapid local development
toolPolicies:
alwaysAllow:
- mcp--filesystem--read_file # Safe: reading files
- mcp--filesystem--list_directory # Safe: directory listing
alwaysDeny:
- mcp--filesystem--delete_file # Dangerous: permanent deletion
The security model: Dexto uses hierarchical permission resolution. The mode sets the baseline—manual for maximum safety, auto-approve for speed. toolPolicies then create exceptions: alwaysAllow bypasses confirmation for trusted operations, while alwaysDeny creates hard blocks regardless of mode. The naming convention mcp--{server}--{tool} prevents ambiguity. Agents remember per-session approvals, so you won't be re-prompted for the same operation—striking the balance between security and workflow efficiency.
Example 3: Multi-Agent Spawner Configuration
This is where Dexto's architecture gets genuinely powerful—agents creating agents:
# In your agent configuration
tools:
- type: agent-spawner
allowedAgents: ["explore-agent"] # Whitelist: which sub-agents can spawn
maxConcurrentAgents: 5 # Prevent resource exhaustion
defaultTimeout: 300000 # 5 minutes: kill hung agents
The orchestration pattern: The coding agent uses this to delegate codebase exploration. When encountering an unfamiliar repository, it spawns lightweight explore-agent instances that map structure, identify key files, and report findings—all read-only, all ephemeral. The parent agent then synthesizes this intelligence for actual code modifications. maxConcurrentAgents prevents runaway spawning. defaultTimeout ensures resources clean up. Sub-agents forward their tool approvals to the parent, so you see one unified approval flow. This is recursive agent architecture made production-safe.
Example 4: Programmatic SDK Usage
For embedding Dexto in your applications, the TypeScript SDK provides full control:
import { DextoAgent } from '@dexto/core';
// Initialize with provider configuration
const agent = new DextoAgent({
llm: {
provider: 'openai',
model: 'gpt-5.2',
apiKey: process.env.OPENAI_API_KEY
}
});
await agent.start();
// Create persistent conversation session
const session = await agent.createSession();
// Simple generation
const response = await agent.generate('What is TypeScript?', session.id);
console.log(response.content);
// Streaming for real-time UX
for await (const event of await agent.stream('Write a story', session.id)) {
if (event.name === 'llm:chunk') {
process.stdout.write(event.content); // Stream tokens as they arrive
}
}
// Multimodal input support
await agent.generate([
{ type: 'text', text: 'Describe this image' },
{ type: 'image', image: base64Data, mimeType: 'image/png' }
], session.id);
// Dynamic model switching—same session, different brain
await agent.switchLLM({ model: 'claude-sonnet-4-5-20250929' });
Architecture insights: The SDK mirrors Dexto's design philosophy—everything is session-based, everything is persistent, everything can change dynamically. The stream method returns async iterables of typed events, enabling sophisticated UI patterns like token-by-token rendering with syntax highlighting. Multimodal support isn't bolted-on; it's native to the message format. And switchLLM demonstrates the harness abstraction—you're not locked into provider-specific APIs, you're controlling an agent whose implementation details are swappable.
Example 5: Production Server Deployment
Expose your agent as a service:
import { DextoAgent } from '@dexto/core';
import { loadAgentConfig, startHonoApiServer } from 'dexto';
// Load configuration from version-controlled YAML
const config = await loadAgentConfig('./agents/my-agent.yml');
// Instantiate and start agent
const agent = new DextoAgent(config);
// Launch HTTP server with REST and SSE endpoints
const { server } = await startHonoApiServer(agent, 3001);
// Available: POST /api/message, GET /api/sessions, SSE streaming
Deployment pattern: This is how you productize Dexto. The loadAgentConfig function validates and parses YAML—catching configuration errors before runtime. startHonoApiServer (using the lightweight Hono framework) provides both synchronous REST endpoints and Server-Sent Events for streaming. Your frontend, webhook consumers, or other services interact through clean HTTP while Dexto handles all the LLM complexity, retry logic, and state management internally.
Advanced Usage & Best Practices
Model Selection Strategy: Use fast models (Groq Llama 4) for exploration and initial drafting, then switch to high-quality models (Claude Opus) for final refinement. The cost and latency savings are substantial.
Memory Hygiene: Create explicit memories for domain knowledge that should persist: "This project uses Next.js↗ Bright Coding Blog App Router, not Pages Router." These shape agent behavior more reliably than hoping context windows retain everything.
Sub-Agent Design Patterns: Keep sub-agents single-purpose. The explore-agent is read-only by design—this containment prevents accidental modifications during reconnaissance. Always set timeouts; LLM calls can hang unpredictably.
MCP Server Curation: Start minimal. Each connected server increases latency and attack surface. The MCP Store makes discovery easy, but discipline in selection prevents bloat.
Local-First Development: Use node-llama-cpp with GGUF models for sensitive codebases. Automatic GPU detection means you're not sacrificing speed for privacy.
Observability: Set DEXTO_LOG_LEVEL=debug during development, but structure production logs for aggregation. The session-based architecture means you can reconstruct complete agent decision chains for debugging.
Dexto vs. Alternatives: Why This Harness Wins
| Capability | Dexto | LangChain | AutoGPT | Custom Build |
|---|---|---|---|---|
| Configuration-Driven | ✅ Native YAML | ❌ Code-heavy | ❌ Limited | Your burden |
| 50+ LLM Support | ✅ Built-in | ⚠️ Requires integrations | ❌ Limited | Your burden |
| Model Switching | ✅ Mid-conversation | ❌ Restart required | ❌ Fixed | Your burden |
| MCP Integration | ✅ Native + Store | ⚠️ Manual setup | ❌ None | Your burden |
| Persistent Memory | ✅ Sessions + search | ⚠️ Add-on | ❌ Basic | Your burden |
| Multi-Agent Spawning | ✅ Built-in | ⚠️ Complex orchestration | ❌ Unstable | Your burden |
| Human-in-the-Loop | ✅ Granular policies | ⚠️ Manual implementation | ❌ None | Your burden |
| Run Modes (CLI/UI/API/MCP) | ✅ Four modes | ❌ Framework only | ❌ CLI only | Your burden |
| Production Storage | ✅ Redis/PostgreSQL↗ Bright Coding Blog | ⚠️ Bring your own | ❌ None | Your burden |
The verdict: LangChain is a toolkit—powerful but requires assembly. AutoGPT pioneered autonomous agents but lacks reliability. Custom builds give control at massive development cost. Dexto occupies the sweet spot: opinionated enough to work out of the box, flexible enough for serious customization. The YAML configuration and multi-mode deployment specifically address the "it works on my machine" problem that plagues agent deployments.
FAQ: What Developers Ask About Dexto
Is Dexto free to use?
Yes. Dexto is open-source under the Elastic License 2.0. You can use, modify, and deploy it freely. The license allows commercial use with reasonable protections for the project's sustainability.
Do I need to pay for LLM APIs?
Dexto supports free local models via Ollama and node-llama-cpp. For cloud providers (OpenAI, Anthropic, etc.), you bring your own API keys and pay their rates. The flexibility to switch between free and paid models is core to Dexto's value.
How does Dexto compare to using an LLM directly?
Raw LLMs are stateless and tool-less. Dexto adds the orchestration layer—session persistence, tool execution, error recovery, memory, and multi-agent coordination—that transforms demos into production systems.
Can I use Dexto with my existing codebase?
Absolutely. The coding agent works with any project structure. The SDK lets you embed Dexto in existing applications. The MCP server mode means you can access Dexto agents from tools you already use like Cursor and Claude Code.
Is my data safe with Dexto?
For maximum privacy, run local models—data never leaves your machine. With cloud providers, Dexto sends data only to your configured APIs. Telemetry is anonymous and opt-out via DEXTO_ANALYTICS_DISABLED=1. No training data is collected.
How stable is the Beta release?
The core orchestration is production-ready. The Beta designation reflects rapid feature evolution. The coding agent is actively used for real development. Join the Discord for support and migration guidance.
Can I build custom agents without coding?
Define agents entirely in YAML—LLM selection, tools, prompts, permissions, storage. No TypeScript required for configuration. Coding is needed only for custom tool implementations or SDK integration.
Conclusion: The Agent Infrastructure You Should Have Started With
Here's what separates developers who ship from those who stall: infrastructure discipline. Anyone can prompt an LLM. Few can build agents that survive contact with real users, real errors, and real complexity.
Dexto solves this. It's not the flashiest project in the AI space, but it's arguably one of the most important—because it attacks the unsexy problem that kills most agent projects: reliable orchestration. The YAML-driven configuration, instant model switching, MCP ecosystem integration, and multi-agent architecture give you a foundation that scales from prototype to production without rewriting everything.
The built-in coding agent alone justifies exploration. But the real power is the harness itself—the ability to define your own agents, your own tools, your own deployment topology, all with infrastructure-as-code rigor.
My take? Stop building agent scaffolding. Start building agent applications. Dexto has done the hard work. Your move.
👉 Star Dexto on GitHub and join the Discord community to see what the future of agent orchestration looks like.
Built by Truffle AI. Licensed under Elastic License 2.0.