AL

ayourtch-llm/tttt

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

22 stars 4 forks 质量 71 趋势 24

AI代理编排框架——多重PTY会话、MCP工具、实时加载、基于模式的自动化

概览

(Takes Two To Tango)是一款基于Rust的终端复用器,专为AI代理编排而设计。它允许根AI代理(如Claude Opus)生成、监控并协调多个工作代理(如Claude Sonnet、本地模型如Qwen)——每个代理运行在自己的PTY会话中——同时通过MCP(模型上下文协议)工具保持完全控制。 可以把它想象成:会话管理、屏幕阅读、输入键盘、基于模式的通知、实时加载和远程监控——所有这些都暴露为 MCP 工具,AI 代理可以通过程序调用。 当前的AI编码助手作为单一代理在单一终端运行。当任务变得复杂时,你需要多个代理并行工作——但协调它们需要标准终端多路复用器所不具备的基础设施。 被设计出来是为了回答:如果人工智能代理能够管理自己的工作空间会怎样?

概述(AI 翻译)

tttt(Takes Two To Tango)是一款基于Rust的终端复用器,专为AI代理编排而设计。它允许根AI代理(如Claude Opus)生成、监控和协调多个工作代理(如Claude Sonnet、本地模型如Qwen)——每个代理运行在自己的PTY会话中——同时通过MCP(模型上下文协议)工具保持完全控制。

可以把它看作是为AI代理设计的tmux:会话管理、屏幕阅读、输入键盘、基于模式的通知、实时加载和远程监控——所有这些都暴露为MCP工具,AI代理可以通过程序调用。

**警告:该软件允许AI代理直接访问终端会话,包括执行命令、发送按键和管理进程的能力。会话沙箱尚未实现。仅用于实验性/概念验证环境,并始终监督运行中的代理。未经适当隔离,切勿在生产环境或敏感数据系统上部署。另外:如果您启用输入日志,所有内容包括密码按键都会登录到~/.local/share/tttt/tttt中。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

tttt — Takes Two To Tango

tttt (Takes Two To Tango) is a Rust-based terminal multiplexer purpose-built for AI agent orchestration. It allows a root AI agent (e.g., Claude Opus) to spawn, monitor, and coordinate multiple worker agents (e.g., Claude Sonnet, local models like Qwen) — each running in its own PTY session — while maintaining full control through MCP (Model Context Protocol) tools.

Think of it as tmux designed for AI agents: session management, screen reading, keystroke injection, pattern-based notifications, live reload, and remote monitoring — all exposed as MCP tools that AI agents can call programmatically.

**WARNING: This software gives AI agents direct access to terminal sessions, including the ability to execute commands, send keystrokes, and manage processes. Session sandboxing is not yet implemented. Use only in experimental / proof-of-concept environments and always supervise the running agents. Do not deploy in production or on systems with sensitive data without proper isolation in place. ALSO: If you enable the input logging, everything including your password keystrokes are logged into ~/.local/share/tttt/tttt.db - keep this in mind and avoid entering any sensitive info ! **

Why This Exists

Current AI coding assistants run as single agents in a single terminal. When tasks get complex, you want multiple agents working in parallel — but coordinating them requires infrastructure that doesn’t exist in standard terminal multiplexers.

tttt was built to answer: What if the AI agent could manage its own workspace?

The result: Claude Opus running inside tttt can autonomously launch Sonnet workers, delegate implementation tasks, monitor progress, review and commit code, restart itself to pick up new tools, and even message the human on Webex when it needs input — all without human intervention.

Demo: What a Real Session Looks Like

In a single session, Claude Opus (running as the root agent inside tttt):

  1. Launched a Sonnet worker in a new terminal and sent it a feature spec
  2. Monitored progress using tttt_get_status (idle time, last output line)
  3. Approved permissions when Sonnet hit permission prompts
  4. Reviewed the code, ran tests, and committed — all while Sonnet worked on the next task
  5. Live-reloaded tttt with SIGUSR1 to pick up code changes without losing any sessions
  6. Restarted itself with SIGUSR2 to discover newly-added MCP tools, auto-continuing via --resume
  7. Messaged the human on Webex when it needed input, read the reply, and continued working

All of this happened in a single 3-hour session where 16 features were implemented — most by delegating to Sonnet.

Features

Terminal Management (MCP Tools)

  • tttt_pty_launch — Spawn new terminal sessions with custom commands, dimensions, working directories
在 GitHub 查看完整 README

安装

docker run -it ghcr.io/ayourtch-llm/tttt:latest
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "webex": { "command": "/path/to/mcp-webex-messaging" } } }