Deutsch | English | Español | français | 日本語 | 한국어 | Português | Русский | 中文
An open agent harness for AI applications—ships with a powerful coding agent.
______________________________________________________________________
Dexto是什么?
Dexto是一个 代理工具--编排层,它将LLM转换为可靠的、有状态的代理,可以采取行动、记住上下文并从错误中恢复。
把它想象成人工智能代理的操作系统:
| 组件 | 类比 | 角色 |
|---|---|---|
| LLM | CPU | 原始处理能力 |
| 上下文窗口 | RAM | 工作存储器 |
| 正确的 | 操作系统 | 编排、状态、工具、恢复 |
| 代理 | 应用程序 | 特定于域的逻辑和客户端 |
为什么是Dexto?
- 配置驱动:在YAML中定义代理。在不接触代码的情况下交换模型和工具。
- 包括电池:会话管理、工具编排、内存、多模式支持和可观察性——开箱即用。
- 到处跑:本地、云或混合。CLI、Web UI、REST API、Discord、Telegram或嵌入应用程序。
你能建造什么
- 编码代理 –自主构建、调试和重构代码
- 自治代理 –计划、执行和适应用户目标
- 数字伴侣 –能够记住上下文并预测需求的助理
- MCP客户端和服务器 –通过模型上下文协议连接工具、文件、API
- 多智能体系统 –共同协作、委派和解决复杂任务的代理
______________________________________________________________________
编程代理
Dexto船用 生产就绪编码剂 您可以通过CLI或Web UI立即使用。
# Launch the coding agent (default)
dexto
# Or explicitly
dexto --agent coding-agent它能做什么:
- 从头开始构建新应用
- 在整个代码库中读取、编写和重构代码
- 执行shell命令并运行测试
- Spawn勘探和规划专业分代理
- 使用持久内存跨会话记住上下文
- 与50多个LLM中的任何一个合作(在对话中交换模型)
即用型接口:
- Web用户界面 –带有文件上传、语法高亮显示和MCP工具浏览器的聊天界面
- 命令行界面 –终端原生
/commands、流输出和会话管理
编码代理只是您可以构建的一个示例。通过定义YAML配置来创建自己的代理——同样的架构,你的域。
______________________________________________________________________
快速开始
安装
# 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升级/卸载和迁移故障排除实时文档:
- 安装指南:https://docs.dexto.ai/docs/getting-started/installation
- CLI命令参考:https://docs.dexto.ai/docs/guides/cli/overview
跑
# Start Dexto (launches setup wizard on first run)
dexto更多选项:
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在交互式CLI内部,类型 / 探索命令——切换模型、管理会话、配置工具等。
管理设置
# Configure defaults like LLM provider/model, API keys, or download local models
dexto setup日志存储在 ~/.dexto/logs/.使用 DEXTO_LOG_LEVEL=debug 用于详细输出。
______________________________________________________________________
核心功能
50+LLM,即时切换
在对话中切换模型——无需更改代码,也无需重新启动。
| 提供者 | 模型 |
|---|---|
| 开放人工智能 | gpt-5.2、gpt-5.2-pro、gpt-5.2索引、o4-mini |
| 人类 | 克劳德·十四行诗,作品,俳句(延伸思维) |
| 谷歌 | Gemini 3 Pro,2.5 Pro/Flash |
| 格罗克 | Llama 4,Qwen,DeepSeek |
| 扩展应用识别 | Grok 4,Grok 3 |
| 本地 | Ollama,GGUF通过Node-Calma-CPP(Calma,Qwen,Mistral等) |
| +网关 | OpenRouter、AWS Bedrock、Vertex AI、LiteLLM |
在本地运行以保护隐私:本地模型通过自动GPU检测(Metal、CUDA、Vulkan)将数据保存在您的机器上。
MCP集成(30+工具)
连接到模型上下文协议服务器——Puppeteer、Linear、ElevenLabs、Firecrawl、Sora等。
# 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']从Web UI中的MCP Store或通过以下方式浏览和添加服务器 /mcp CLI中的命令。
人在回路控制
对代理可以做什么进行细粒度控制:
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客服人员会记住您在每个会话中批准了哪些工具。
持久会话和内存
重新启动后,对话仍会持续。创造塑造代理人行为的记忆。
# Continue last conversation
dexto -c
# Resume specific session
dexto -r session-abc123
# Search across all conversations
dexto search "database schema"多智能体系统
代理可以生成专门的子代理来处理复杂的子任务。编码代理使用它来委派探索:
# In your agent config
tools:
- type: agent-spawner
allowedAgents: ["explore-agent"]
maxConcurrentAgents: 5
defaultTimeout: 300000 # 5 minutes内置子代理:
- 勘探代理 –快速、只读的代码库探索
任何代理人 代理注册表 可以作为子代理生成,包括您创建和注册的自定义代理。
子代理临时运行,完成后自动清理,并将工具审批转发给父代理,因此用户可以看到一个统一的审批流。
______________________________________________________________________
运行模式
| 模式 | 命令 | 用例 |
|---|---|---|
| Web用户界面 | dexto | 聊天界面,支持文件上传(默认) |
| 命令行界面 | dexto --mode cli | 终端交互 |
| Web服务器 | dexto --mode server | REST和SSE API |
| MCP 服务器 | dexto --mode mcp | 通过stdio将代理暴露为MCP服务器 |
平台集成: Discord 的中文翻译是“不和谐”或“纷争”。, 电报
Dexto as an MCP Server
运输: stdio
将您的Dexto代理连接为Claude Code或Cursor中的MCP服务器:
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-elicitationClaude代码或游标的MCP配置示例:
{
"command": "npx",
"args": ["-y", "dexto", "--mode", "mcp", "--agent", "coding-agent", "--auto-approve", "--no-elicitation"]
}--auto-approve 和 --no-elicitation MCP模式需要这些参数,因为它是非交互式运行的。
运输: http/sse
dexto --mode server 将您的代理暴露为MCP服务器 /mcp 对于远程客户端:
dexto --mode server --port 3001
ngrok http 3001 # Optional: expose publicly______________________________________________________________________
Dexto代理SDK
以编程方式构建AI代理。CLI所做的一切,你的代码也可以。
npm install @dexto/coreimport { 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({ model: 'claude-sonnet-4-5-20250929' });以编程方式启动服务器:
以编程方式启动Dexto服务器,以公开REST和SSE流式API,从而交互和管理您的代理后端。
import { DextoAgent } from '@dexto/core';
import { loadAgentConfig, startHonoApiServer } from 'dexto';
const config = await loadAgentConfig('./agents/my-agent.yml');
const agent = new DextoAgent(config);
const { server } = await startHonoApiServer(agent, 3001);
// POST /api/message, GET /api/sessions, etc.这将启动一个具有完整REST和SSE API的HTTP服务器,实现与web前端、Webhook和其他服务的集成。看 REST API文档 对于可用端点。
Advanced SDK Usage
会话管理
使用持久存储创建和管理多个会话。
const agent = new DextoAgent(config);
await agent.start();
// Create and manage sessions
const session = await agent.createSession('user-123');
await agent.generate('Hello, how can you help me?', session.id);
// List and manage sessions
const sessions = await agent.listSessions();
const history = await agent.getSessionHistory('user-123');
await agent.deleteSession('user-123');
// Search across conversations
const results = await agent.searchMessages('bug fix', { limit: 10 });LLM管理
在模型和提供者之间动态切换。
// Get current configuration
const currentLLM = agent.getCurrentLLMConfig();
// Switch models (provider inferred automatically)
await agent.switchLLM({ model: 'gpt-5.2' });
await agent.switchLLM({ model: 'claude-sonnet-4-5-20250929' });
// Switch model for a specific session
await agent.switchLLM({ model: 'gpt-5.2' }, 'session-123');
// Get supported providers and models
const providers = agent.getSupportedProviders();
const models = agent.getSupportedModels();MCP经理
对于高级MCP服务器管理,请直接使用MCPManager。
import { MCPManager } from '@dexto/core';
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();存储和持久性
为生产配置存储后端。
# agents/production-agent.yml
storage:
cache:
type: redis
url: $REDIS_URL
database:
type: postgres
connectionString: $POSTGRES_CONNECTION_STRING
sessions:
maxSessions: 1000
sessionTTL: 86400000 # 24 hours支持的后端:
- 缓存:Redis,内存中
- 数据库:PostgreSQL、SQLite、内存
看 存储配置指南 了解详情。
______________________________________________________________________
代理注册表
常见用例的预构建代理:
# List available agents
dexto agents list
# Install and run
dexto agents install coding-agent podcast-agent
dexto --agent coding-agent可用: 编码、播客、图像编辑器、视频(Sora)、数据库、GitHub、Triage(多代理)等。
查看完整 代理注册表.
______________________________________________________________________
代理配置
Dexto将每个配置视为一个唯一的代理,允许您根据需要定义和保存LLM、服务器、存储选项等的组合,以便于移植。在版本控制的YAML中定义代理。更改文件、重新加载和聊天——状态、内存和工具会自动更新。
# agents/production-agent.yml
llm:
provider: anthropic
model: claude-sonnet-4-5-20250929
apiKey: $ANTHROPIC_API_KEY
mcpServers:
filesystem:
type: stdio
command: npx
args: ['-y', '@modelcontextprotocol/server-filesystem', '.']
systemPrompt: |
You are a helpful assistant with filesystem access.
storage:
cache:
type: redis
url: $REDIS_URL
database:
type: postgres
connectionString: $POSTGRES_CONNECTION_STRING
permissions:
mode: manualLLM提供商
立即在提供者之间切换——无需更改代码。
内置提供商
| 提供者 | 模型 | 设置 |
|---|---|---|
| 开放人工智能 | gpt-5.2, gpt-5.2-pro, gpt-5.2-codex, o4-mini | API密钥 |
| 人类 | claude-sonnet-4-5-20250929, claude-opus-4-5-20250929,扩展思维 | API键 |
| 谷歌 | gemini-3-pro, gemini-2.5-pro, gemini-2.5-flash | API密钥 |
| 格罗克 | llama-4-scout, qwen-qwq, deepseek-r1-distill | API密钥 |
| 扩展应用识别 | grok-4, grok-3, grok-3-fast | API密钥 |
| 凝聚 | command-r-plus, command-r | API密钥 |
本地模型(隐私优先)
| 提供者 | 模型 | 设置 |
|---|---|---|
| 奥拉玛 | Llama、Qwen、Mistral、DeepSeek等。 | 本地安装 |
| 节点llama cpp | 任何GGUF型号 | 捆绑(自动GPU检测:金属、CUDA、Vulkan) |
云平台
| 提供者 | 模型 | 设置 |
|---|---|---|
| AWS Bedrock | Claude、Llama、Mistral | AWS证书 |
| 谷歌顶点AI | Claude Gemini | GCP证书 |
网关提供商
| 提供程序 | 访问 | 安装程序 |
|---|---|---|
| 开放路由 | 来自多个供应商的100多种型号 | API密钥 |
| 文学硕士 | 适用于任何提供商的统一API | Self-hosted或API密钥 |
| 格拉玛 | 多供应商网关 | API密钥 |
# Switch models via CLI
dexto -m claude-sonnet-4-5-20250929
dexto -m gemini-2.5-pro
dexto -m llama-4-scout在交互式CLI中切换(/model)或无需更改配置的Web UI。
看 配置指南.
______________________________________________________________________
演示和示例
| 图像编辑器 | MCP商店 | 便携式代理 |
|---|---|---|
| 使用OpenCV进行人脸检测和注释 | 浏览并添加MCP | 通过MCP在Cursor、Claude Code中使用代理 |
More Examples
编程代理
从自然语言构建应用程序:
dexto --agent coding-agent
# "Create a snake game and open it in the browser"播客代理
生成多扬声器音频内容:
dexto --agent podcast-agent多代理分类
协调专业代理:
dexto --agent triage-agent存储器系统
塑造行为的持久上下文:
动态表单
代理为结构化输入生成表单:
浏览器自动化
MCP游乐场
部署前的测试工具:
______________________________________________________________________
CLI Reference
Usage: dexto [options] [command] [prompt...]
Basic Usage:
dexto Start web UI (default)
dexto "query" Run one-shot query
dexto --mode cli Interactive CLI
Session Management:
dexto -c Continue last conversation
dexto -r Resume specific session
Options:
-a, --agent
Agent config file or ID
-m, --model LLM model to use
--auto-approve Skip tool confirmations
--no-elicitation Disable elicitation prompts
--mode web | cli | server | mcp
--port
Server port
Commands:
setup Configure global preferences
deploy Deploy current workspace to cloud
agents install Install agents from registry
agents list List available agents
session list|history Manage sessions
search Search conversation history完整参考: dexto --help
______________________________________________________________________
文档
______________________________________________________________________
遥测
我们收集匿名使用数据(无个人/敏感信息)以帮助改进Dexto。这包括:
- 使用的命令
- 命令执行时间
- 错误发生
- 系统信息(操作系统、节点版本)
- 使用的LLM模型
选择退出:
设置env变量 DEXTO_ANALYTICS_DISABLED=1
______________________________________________________________________
贡献
看 贡献.md.
______________________________________________________________________
社区
建造于 松露AI.加入 Discord 的中文翻译是“不和谐”或“纷争”。 支持。
如果你觉得Dexto有用,请给我们一个⭐ 在GitHub上——它帮助很大!
  
______________________________________________________________________
贡献者

______________________________________________________________________
许可证
弹性许可证2.0。看 许可证.
