dexto

dexto

The Orchestration Layer for AI agents. Connect your models, tools, and data into a smart interface to create agentic apps that can think, act and talk to you

Stars: 204

Visit
 screenshot

Dexto is a lightweight runtime for creating and running AI agents that turn natural language into real-world actions. It serves as the missing intelligence layer for building AI applications, standalone chatbots, or as the reasoning engine inside larger products. Dexto features a powerful CLI and Web UI for running AI agents, supports multiple interfaces, allows hot-swapping of LLMs from various providers, connects to remote tool servers via the Model Context Protocol, is config-driven with version-controlled YAML, offers production-ready core features, extensibility for custom services, and enables multi-agent collaboration via MCP and A2A.

README:

Dexto

An all-in-one toolkit to build agentic applications that turn natural language into real-world actions.

Dexto Demo

What is Dexto?

Dexto is a universal agent interface for building agentic apps—software that understands natural language and takes real-world actions. It orchestrates LLMs, tools, and data into persistent, stateful systems with memory, so you can rapidly create AI assistants, copilots, and context-aware apps that think, act and feel alive.

With Dexto, you can build:

  • Autonomous Agents - Agents that plan, execute, and adapt to user goals.
  • Digital Companions - AI assistants & copilots that remember context and anticipate needs.
  • Multi-Agent Systems - Architect agents that collaborate, delegate, and solve complex tasks together.
  • MCP Clients - Connect multiple tools, files, APIs, and data via MCP Servers.
  • Agent-as-a-Service – Transform your existing SaaS products and APIs into dynamic, conversational experiences.
  • Agentic Applications – Integrate Dexto as a reasoning engine to power interactive, multimodal, AI-native applications.

What You Get

  • Batteries Included – Session management, tool orchestration, multimodal support.
  • 20+ LLMs – Instantly switch between OpenAI, Anthropic, Google, Groq, local models or bring your own.
  • Run Anywhere – Local for privacy, cloud for reach, or hybrid. Same agent, any deployment.
  • Native Multimodal – Text, images, files, and tools in a single conversation. Upload screenshots, ask questions, take actions.
  • Persistent Sessions – Conversations, context, and memory are saved and can be exported, imported, or shared across environments.
  • Flexible Interfaces – One agent, endless ways to interact: Ready to-use CLI, WebUI, APIs, or integrate with your own UI.
  • Production Ready – Observability and error handling built-in.
  • Tooling & MCP – Integrate 100+ tools and connect to external servers via the Model Context Protocol (MCP).
  • Customizable Agents – Define agent behavior, tools, and prompts in YAML or TypeScript.
  • Pluggable Storage – Use Redis, PostgreSQL, SQLite, in-memory, and more for cache and database backends.

Installation

# NPM global
npm install -g dexto

# —or— build from source
git clone https://github.com/truffle-ai/dexto.git
cd dexto && npm i && npm run build && npm link

Quick Start

# 1. Set your API key
export OPENAI_API_KEY=your_openai_api_key_here

# 2. Try a multi-step task
dexto "create a snake game in HTML/CSS/JS, then open it in the browser"

# Optional: Launch the Web UI
dexto --mode web

Dexto will use filesystem tools to write code and browser tools to open it—all from a single prompt. The Web UI allows you to navigate previous conversations and experiment with different models, tools and more.

Examples & Demos

🛒 Amazon Shopping Assistant

Task: Can you go to amazon and add some snacks to my cart? I like trail mix, cheetos and maybe surprise me with something else?

# Default agent has browser tools
dexto
Dexto: Amazon shopping agent demo

👁️ Computer Vision: Face Detection & Annotation

Task: Detect all faces in this image and draw bounding boxes around them.

dexto --agent image-editor-agent

Face Detection Demo

🎙️ Podcast Agent: Generate AI Podcast Intros

Task: Generate an intro for a podcast about the latest in AI.

dexto --agent podcast-agent

Podcast Agent Demo

🖼️ Hugging Face: Image Generation

Task: Generate a photo of a baby panda.

Hugging Face Image Generation Demo

🛠️ Adding Custom MCP Servers

You can add your own Model Context Protocol (MCP) servers to extend Dexto's capabilities with new tools or data sources. Just edit your agent YAML or add it directly in the WebUI.

Add MCP Server Example

🎮 Web App Development: Snake Game

Task: Create a snake game in HTML/CSS/JS, then open it in the browser

dexto "create a snake game in HTML/CSS/JS, then open it in the browser"

Snake Game Development Demo

📧 Send Email Summaries to Slack

Task: Summarize emails and send highlights to Slack

dexto --agent ./agents/examples/email_slack.yml

Email to Slack Demo


Run Modes

Mode Command Best for
Interactive CLI dexto Everyday automation & quick tasks
Web UI dexto --mode web Friendly chat interface w/ image support
Headless Server dexto --mode server REST & WebSocket APIs for agent interaction
MCP Server (Agent) dexto --mode mcp Exposing your agent as a tool for others via stdio
MCP Server (Aggregator) dexto mcp --group-servers Re-exposing tools from multiple MCP servers via stdio
Discord Bot dexto --mode discord Community servers & channels (Requires Setup)
Telegram Bot dexto --mode telegram Mobile chat (Requires Setup)

Run dexto --help for all flags, sub-commands, and environment variables.

Configuration

Agent Configuration

Dexto treats each configuration as a unique agent allowing you to define and save combinations of LLMs, servers, storage options, etc. based on your needs for easy portability. Define agents in version-controlled YAML. Change the file, reload, and chat—state, memory, and tools update automatically.

# agents/my-agent.yml
llm:
  provider: openai
  model: gpt-4.1-mini
  apiKey: $OPENAI_API_KEY

mcpServers:
  filesystem:
    type: stdio
    command: npx
    args: ['-y', '@modelcontextprotocol/server-filesystem', '.']
  web:
    type: stdio
    command: npx
    args: ['-y', '@modelcontextprotocol/server-brave-search']

systemPrompt: |
  You are a helpful AI assistant with access to files and web search.

LLM Providers

Switch between providers instantly—no code changes required.

Provider Models Setup
OpenAI gpt-5, gpt-5-mini, gpt-5-nano, gpt-4.1, gpt-4.1-mini, gpt-4.1-nano, gpt-4o, gpt-4o-mini, gpt-4o-audio-preview, o4-mini, o3, o3-mini, o1 export OPENAI_API_KEY=...
Anthropic claude-opus-4-1-20250805, claude-4-opus-20250514, claude-4-sonnet-20250514, claude-3-7-sonnet-20250219, claude-3-5-sonnet-20240620, claude-3-5-haiku-20241022 export ANTHROPIC_API_KEY=...
Google gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.0-flash, gemini-2.0-flash-lite export GOOGLE_GENERATIVE_AI_API_KEY=...
Groq llama-3.3-70b-versatile, meta-llama/llama-4-scout-17b-16e-instruct, meta-llama/llama-4-maverick-17b-128e-instruct, qwen/qwen3-32b, gemma-2-9b-it, openai/gpt-oss-20b, openai/gpt-oss-120b, moonshotai/kimi-k2-instruct, deepseek-r1-distill-llama-70b export GROQ_API_KEY=...
xAI grok-4, grok-3, grok-3-mini, grok-code-fast-1 export XAI_API_KEY=...
Cohere command-a-03-2025, command-r-plus, command-r, command-r7b export COHERE_API_KEY=...
# Switch models via CLI
dexto -m claude-4-sonnet-20250514
dexto -m gemini-2.5-pro

See our Configuration Guide for complete setup instructions.

Agent Recipes

Dexto comes with pre-built agent recipes for common use cases. Install and use them instantly:

# List available agents
dexto list-agents

# Install specific agents
dexto install nano-banana-agent podcast-agent

# Use an agent
dexto --agent nano-banana-agent "create a futuristic cityscape with flying cars"
dexto --agent podcast-agent "generate a podcast intro with two hosts discussing AI"

Available Agents:

  • Nano Banana Agent – Advanced image generation and editing using Google's Nano Banana (Gemini 2.5 Flash Image)
  • Podcast Agent – Advanced podcast generation using Google Gemini TTS for multi-speaker audio content
  • Database Agent – Demo agent for SQL queries and database operations
  • Image Editor Agent – Image editing and manipulation
  • Music Agent – Music creation and audio processing
  • PDF Agent – Document analysis and conversation
  • Product Researcher – Product naming and branding research
  • Triage Agent – Demo multi-agent customer support routing system

Each agent is pre-configured with the right tools, prompts, and LLM settings for its domain. No setup required—just install and start building.

More ready-to-run recipes live in agents/ and the docs site.

Programmatic API

Build applications with the DextoAgent class. Everything the CLI can do, your code can too.

import { DextoAgent } from 'dexto';

// Create and start agent
const agent = new DextoAgent({
  llm: {
    provider: 'openai',
    model: 'gpt-4.1-mini',
    apiKey: process.env.OPENAI_API_KEY
  }
});
await agent.start();

// Run tasks
const response = await agent.run('List the 5 largest files in this repo');
console.log(response);

// Hold conversations
await agent.run('Write a haiku about TypeScript');
await agent.run('Make it funnier');

await agent.stop();

See our TypeScript SDK docs for complete examples with MCP tools, sessions, and advanced features.


Advanced Usage

Session Management

Create and manage multiple conversation sessions with persistent storage.

const agent = new DextoAgent(config);
await agent.start();

// Create and manage sessions
const session = await agent.createSession('user-123');
await agent.run('Hello, how can you help me?', undefined, 'user-123');

// List and manage sessions
const sessions = await agent.listSessions();
const sessionHistory = await agent.getSessionHistory('user-123');
await agent.deleteSession('user-123');

// Search across conversations
const results = await agent.searchMessages('bug fix', { limit: 10 });

LLM Management

Switch between models and providers dynamically.

// Get current configuration
const currentLLM = agent.getCurrentLLMConfig();

// Switch models (provider inferred automatically)
await agent.switchLLM({ model: 'gpt-4.1-mini' });
await agent.switchLLM({ model: 'claude-4-sonnet-20250514' });

// Get supported providers and models
const providers = agent.getSupportedProviders();
const models = agent.getSupportedModels();
const openaiModels = agent.getSupportedModelsForProvider('openai');

MCP Manager

For advanced MCP server management, use the MCPManager directly.

import { MCPManager } from 'dexto';

const manager = new MCPManager();

// Connect to MCP servers
await manager.connectServer('filesystem', {
  type: 'stdio',
  command: 'npx',
  args: ['-y', '@modelcontextprotocol/server-filesystem', '.']
});

// Access tools, prompts, and resources
const tools = await manager.getAllTools();
const prompts = await manager.getAllPrompts();
const resources = await manager.getAllResources();

// Execute tools
const result = await manager.executeTool('readFile', { path: './README.md' });

await manager.disconnectAll();

Storage & Persistence

Configure storage backends for production-ready persistence and caching.

# agents/production-agent.yml
storage:
  cache:
    type: redis
    url: $REDIS_URL
    maxConnections: 100
  database:
    type: postgres
    connectionString: $POSTGRES_CONNECTION_STRING
    maxConnections: 25

sessions:
  maxSessions: 1000
  sessionTTL: 86400000 # 24 hours

Supported Backends:

  • Cache: Redis, In-Memory (fast, ephemeral)
  • Database: PostgreSQL, SQLite, In-Memory (persistent, reliable)

Use Cases:

  • Development: In-memory for quick testing
  • Production: Redis + PostgreSQL for scale
  • Simple: SQLite for single-instance persistence

See the DextoAgent API Documentation for complete method references.


CLI Reference

Click to expand for full CLI reference (`dexto --help`)
Usage: dexto [options] [command] [prompt...]

Dexto CLI allows you to talk to Dexto, build custom AI Agents, build complex AI applications like Cursor, and more.

Run dexto interactive CLI with `dexto` or run a one-shot prompt with `dexto -p "<prompt>"` or `dexto "<prompt>"`
Start with a new session using `dexto --new-session [sessionId]`
Run dexto web UI with `dexto --mode web`
Run dexto as a server (REST APIs + WebSockets) with `dexto --mode server`
Run dexto as a discord bot with `dexto --mode discord`
Run dexto as a telegram bot with `dexto --mode telegram`
Run dexto agent as an MCP server with `dexto --mode mcp`
Run dexto as an MCP server aggregator with `dexto mcp --group-servers`

Check subcommands for more features. Check https://github.com/truffle-ai/dexto for documentation on how to customize dexto and other examples

Arguments:
  prompt                           Natural-language prompt to run once. If not passed, dexto will start as an interactive CLI

Options:
  -v, --version                    output the current version
  -a, --agent <name|path>          Agent name or path to agent config file
  -p, --prompt <text>              One-shot prompt text. Alternatively provide a single quoted string as positional argument.
  -s, --strict                     Require all server connections to succeed
  --no-verbose                     Disable verbose output
  --no-interactive                 Disable interactive prompts and API key setup
  -m, --model <model>              Specify the LLM model to use
  -r, --router <router>            Specify the LLM router to use (vercel or in-built)
  --new-session [sessionId]        Start with a new session (optionally specify session ID)
  --mode <mode>                    The application in which dexto should talk to you - cli | web | server | discord | telegram | mcp (default: "cli")
  --web-port <port>                optional port for the web UI (default: "3000")
  --no-auto-install                Disable automatic installation of missing agents from registry
  -h, --help                       display help for command

Commands:
  create-app                       Scaffold a new Dexto Typescript app
  init-app                         Initialize an existing Typescript app with Dexto
  setup [options]                  Configure global Dexto preferences
  install [options] [agents...]    Install agents from the registry
  uninstall [options] [agents...]  Uninstall agents from the local installation
  list-agents [options]            List available and installed agents
  which <agent>                    Show the path to an agent
  mcp [options]                    Start Dexto as an MCP server. Use --group-servers to aggregate and re-expose tools from configured MCP servers.

Next Steps


Contributing

We welcome contributions! Refer to our Contributing Guide for more details.

Community & Support

Dexto is built by the team at Truffle AI.
Join our Discord to share projects, ask questions, or just say hi!

Discord

If you enjoy Dexto, please give us a ⭐ on GitHub—it helps a lot!

Twitter Follow Twitter Follow


Contributors

Thanks to all these amazing people for contributing to Dexto!

Contributors


License

Elastic License 2.0. See LICENSE for full terms.

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for dexto

Similar Open Source Tools

For similar tasks

For similar jobs