{"id":31584114,"url":"https://github.com/kevinelliott/agentpipe","last_synced_at":"2025-10-06T00:22:17.576Z","repository":{"id":314373224,"uuid":"1055268456","full_name":"kevinelliott/agentpipe","owner":"kevinelliott","description":"A CLI / TUI app that orchestrates conversations between multiple AI agents. It allows different AI CLI tools (like Claude Code CLI, Gemini CLI, Qwen CLI, etc) to communicate with each other in a shared \"room\", creating dynamic multi-agent conversations.","archived":false,"fork":false,"pushed_at":"2025-09-23T02:16:06.000Z","size":601,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-23T04:13:15.634Z","etag":null,"topics":["ai","ai-agents","ai-agents-automation","ai-agents-cli","claude-code","cli-app","gemini-cli","qwen-code","tui-app"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kevinelliott.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-12T02:56:38.000Z","updated_at":"2025-09-23T02:16:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"e050a058-39e6-417c-8e78-c602e1d9864f","html_url":"https://github.com/kevinelliott/agentpipe","commit_stats":null,"previous_names":["kevinelliott/agentpipe"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/kevinelliott/agentpipe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinelliott%2Fagentpipe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinelliott%2Fagentpipe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinelliott%2Fagentpipe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinelliott%2Fagentpipe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kevinelliott","download_url":"https://codeload.github.com/kevinelliott/agentpipe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinelliott%2Fagentpipe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278539957,"owners_count":26003697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-agents","ai-agents-automation","ai-agents-cli","claude-code","cli-app","gemini-cli","qwen-code","tui-app"],"created_at":"2025-10-06T00:22:12.181Z","updated_at":"2025-10-06T00:22:17.570Z","avatar_url":"https://github.com/kevinelliott.png","language":"Go","funding_links":[],"categories":["Harnesses \u0026 orchestration"],"sub_categories":["Session managers \u0026 parallel runners"],"readme":"# AgentPipe 🚀\n\n[![CI](https://github.com/kevinelliott/agentpipe/actions/workflows/test.yml/badge.svg)](https://github.com/kevinelliott/agentpipe/actions/workflows/test.yml)\n[![Go Version](https://img.shields.io/badge/Go-1.24+-00ADD8?style=flat\u0026logo=go)](https://go.dev/)\n[![License](https://img.shields.io/github/license/kevinelliott/agentpipe)](https://github.com/kevinelliott/agentpipe/blob/main/LICENSE)\n[![Release](https://img.shields.io/github/v/release/kevinelliott/agentpipe)](https://github.com/kevinelliott/agentpipe/releases)\n[![Go Report Card](https://goreportcard.com/badge/github.com/kevinelliott/agentpipe)](https://goreportcard.com/report/github.com/kevinelliott/agentpipe)\n\nAgentPipe is a powerful CLI and TUI application that orchestrates conversations between multiple AI agents. It allows different AI CLI tools (like Claude, Cursor, Gemini, Qwen, Ollama) to communicate with each other in a shared \"room\", creating dynamic multi-agent conversations with real-time metrics, cost tracking, and interactive user participation.\n\n## Screenshots\n\n### Enhanced TUI Interface\n![AgentPipe TUI](screenshots/tui/tui1.png)\n*Enhanced TUI with multi-panel layout: agent list with status indicators, conversation view with metrics, statistics panel showing turns and total cost, configuration panel, and user input area*\n\n## Supported AI Agents\n\n- ✅ **Claude** (Anthropic) - Advanced reasoning and coding\n- ✅ **Cursor** (Cursor AI) - IDE-integrated AI assistance\n- ✅ **Gemini** (Google) - Multimodal understanding\n- ✅ **Qwen** (Alibaba) - Multilingual capabilities\n- ✅ **Codex** (OpenAI) - Code generation specialist\n- ✅ **Ollama** - Local LLM support\n\n## Features\n\n- **Multi-Agent Conversations**: Connect multiple AI agents in a single conversation\n- **Multiple Conversation Modes**:\n  - `round-robin`: Agents take turns in a fixed order\n  - `reactive`: Agents respond based on conversation dynamics\n  - `free-form`: Agents participate freely as they see fit\n- **Flexible Configuration**: Use command-line flags or YAML configuration files\n- **Enhanced TUI Interface**: \n  - Multi-panel layout with dedicated sections for agents, chat, stats, and config\n  - Color-coded agent messages with unique colors per agent\n  - Real-time agent activity indicators (🟢 active/responding, ⚫ idle)\n  - Inline metrics display (response time in seconds, token count, cost)\n  - Topic panel showing initial conversation prompt\n  - Statistics panel with turn counters and total conversation cost\n  - Configuration panel displaying all active settings and config file path\n  - Interactive user input panel for joining conversations\n  - Smart message consolidation (headers only on speaker change)\n  - Proper multi-paragraph message formatting\n- **Chat Logging**: Automatic conversation logging to `~/.agentpipe/chats/`\n- **Response Metrics**: Track response time, token usage, and estimated costs\n- **Health Checks**: Automatic agent health verification before conversations\n- **Agent Detection**: Built-in doctor command to check installed AI CLIs\n- **Customizable Agents**: Configure prompts, models, and behaviors for each agent\n\n## What's New 🎉\n\n### Latest Updates (v0.0.9-dev)\n\n#### New Agent Support\n- **Cursor CLI Integration**: Full support for Cursor's AI agent (`cursor-agent`)\n  - Automatic authentication detection\n  - Intelligent retry logic for improved reliability\n  - Optimized timeout handling for cursor-agent's longer response times\n  - JSON stream parsing for real-time response streaming\n  - Robust error recovery and process management\n\n### v0.0.8 Features\n#### TUI Improvements\n- **Real-time Activity Indicators**: Visual feedback showing which agent is currently responding\n- **Enhanced Metrics Display**: \n  - Response time shown in seconds with 1 decimal precision (e.g., 2.5s)\n  - Token count for each response\n  - Cost estimate per response (e.g., $0.0012)\n  - Total conversation cost tracking in Statistics panel\n- **Improved Message Formatting**:\n  - Consolidated headers (timestamp and name only shown when speaker changes)\n  - Proper multi-paragraph message handling\n  - Clean spacing between messages\n  - No extra newlines between paragraphs from same speaker\n- **Configuration Improvements**:\n  - TUI now properly honors all configuration settings\n  - Config file path displayed in Configuration panel\n  - Dual output support (logs to file while displaying in TUI)\n  - Metrics display controlled by `show_metrics` config option\n\n#### Agent \u0026 Orchestration\n- **Better Error Handling**: Clearer error messages for agent failures and timeouts\n- **Improved Health Checks**: More robust agent verification before starting conversations\n- **Cost Tracking**: Automatic calculation and accumulation of API costs\n- **Metrics Pipeline**: End-to-end metrics flow from orchestrator to TUI display\n\n## Key Improvements in Latest Version\n\n### Performance \u0026 Reliability\n- **Optimized Message Handling**: Reduced memory usage and improved message rendering performance\n- **Better Concurrency**: Proper goroutine management and channel handling\n- **Graceful Shutdowns**: Clean termination of agents and proper resource cleanup\n\n### User Experience\n- **Intuitive Panel Navigation**: Tab-based navigation between panels\n- **Real-time Feedback**: Instant visual indicators for agent activity\n- **Clean Message Display**: Smart consolidation of headers and proper paragraph formatting\n- **Cost Transparency**: See exactly how much each conversation costs\n\n## Installation\n\n### Using Homebrew (macOS/Linux)\n\n```bash\nbrew tap kevinelliott/tap\nbrew install agentpipe\n```\n\n### Using the install script\n\n```bash\ncurl -sSL https://raw.githubusercontent.com/kevinelliott/agentpipe/main/install.sh | bash\n```\n\n### Using Go\n\n```bash\ngo install github.com/kevinelliott/agentpipe@latest\n```\n\n### Build from source\n\n```bash\ngit clone https://github.com/kevinelliott/agentpipe.git\ncd agentpipe\ngo build -o agentpipe .\n```\n\n## Prerequisites\n\nAgentPipe requires at least one AI CLI tool to be installed:\n\n- [Claude CLI](https://github.com/anthropics/claude-code) - `claude`\n- [Cursor CLI](https://cursor.com/cli) - `cursor-agent`\n  - Install: `curl https://cursor.com/install -fsS | bash`\n  - Authenticate: `cursor-agent login`\n- [Gemini CLI](https://github.com/google/generative-ai-cli) - `gemini`\n- [Qwen CLI](https://github.com/QwenLM/qwen-code) - `qwen`\n- [Codex CLI](https://github.com/openai/codex-cli) - `codex`\n- [Ollama](https://github.com/ollama/ollama) - `ollama`\n\nCheck which agents are available on your system:\n\n```bash\nagentpipe doctor\n```\n\n## Quick Start\n\n### Simple conversation with command-line flags\n\n```bash\n# Start a conversation between Claude and Gemini\nagentpipe run -a claude:Alice -a gemini:Bob -p \"Let's discuss AI ethics\"\n\n# Use TUI mode with metrics for a rich experience\nagentpipe run -a claude:Poet -a gemini:Scientist --tui --metrics\n\n# Configure conversation parameters\nagentpipe run -a claude:Agent1 -a gemini:Agent2 \\\n  --mode reactive \\\n  --max-turns 10 \\\n  --timeout 45 \\\n  --prompt \"What is consciousness?\"\n```\n\n### Using configuration files\n\n```bash\n# Run with a configuration file\nagentpipe run -c examples/simple-conversation.yaml\n\n# Run a debate between three agents\nagentpipe run -c examples/debate.yaml --tui\n\n# Brainstorming session with multiple agents\nagentpipe run -c examples/brainstorm.yaml\n```\n\n## Configuration\n\n### YAML Configuration Format\n\n```yaml\nversion: \"1.0\"\n\nagents:\n  - id: agent-1\n    type: claude  # Agent type (claude, gemini, qwen, etc.)\n    name: \"Friendly Assistant\"\n    prompt: \"You are a helpful and friendly assistant.\"\n    announcement: \"Hello everyone! I'm here to help!\"\n    model: claude-3-sonnet  # Optional: specific model\n    temperature: 0.7        # Optional: response randomness\n    max_tokens: 1000        # Optional: response length limit\n\n  - id: agent-2\n    type: gemini\n    name: \"Technical Expert\"\n    prompt: \"You are a technical expert who loves explaining complex topics.\"\n    announcement: \"Technical Expert has joined the chat!\"\n    temperature: 0.5\n\norchestrator:\n  mode: round-robin       # Conversation mode\n  max_turns: 10          # Maximum conversation turns\n  turn_timeout: 30s      # Timeout per agent response\n  response_delay: 2s     # Delay between responses\n  initial_prompt: \"Let's start our discussion!\"\n\nlogging:\n  enabled: true                    # Enable chat logging\n  chat_log_dir: ~/.agentpipe/chats # Custom log path (optional)\n  show_metrics: true               # Display response metrics in TUI (time, tokens, cost)\n  log_format: text                 # Log format (text or json)\n```\n\n### Conversation Modes\n\n- **round-robin**: Agents speak in a fixed rotation\n- **reactive**: Agents respond based on who spoke last\n- **free-form**: Agents decide when to participate\n\n## Commands\n\n### `agentpipe run`\n\nStart a conversation between agents.\n\n**Flags:**\n- `-c, --config`: Path to YAML configuration file\n- `-a, --agents`: List of agents (format: `type:name`)\n- `-m, --mode`: Conversation mode (default: round-robin)\n- `--max-turns`: Maximum conversation turns (default: 10)\n- `--timeout`: Response timeout in seconds (default: 30)\n- `--delay`: Delay between responses in seconds (default: 1)\n- `-p, --prompt`: Initial conversation prompt\n- `-t, --tui`: Use enhanced TUI interface with panels and user input\n- `--log-dir`: Custom path for chat logs (default: ~/.agentpipe/chats)\n- `--no-log`: Disable chat logging\n- `--metrics`: Display response metrics (duration, tokens, cost) in TUI\n- `--skip-health-check`: Skip agent health checks (not recommended)\n- `--health-check-timeout`: Health check timeout in seconds (default: 5)\n\n### `agentpipe doctor`\n\nCheck which AI CLI tools are installed and available.\n\n```bash\nagentpipe doctor\n```\n\n## Examples\n\n### Cursor and Claude Collaboration\n\n```yaml\n# Save as cursor-claude-team.yaml\nversion: \"1.0\"\nagents:\n  - id: cursor-dev\n    type: cursor\n    name: \"Cursor Developer\"\n    prompt: \"You are a senior developer who writes clean, efficient code.\"\n\n  - id: claude-reviewer\n    type: claude\n    name: \"Claude Reviewer\"\n    prompt: \"You are a code reviewer who ensures best practices and identifies potential issues.\"\n\norchestrator:\n  mode: round-robin\n  max_turns: 6\n  initial_prompt: \"Let's design a simple REST API for a todo list application.\"\n```\n\n### Poetry vs Science Debate\n\n```yaml\n# Save as poetry-science.yaml\nversion: \"1.0\"\nagents:\n  - id: poet\n    type: claude\n    name: \"The Poet\"\n    prompt: \"You speak in beautiful metaphors and see the world through an artistic lens.\"\n    temperature: 0.9\n    \n  - id: scientist\n    type: gemini\n    name: \"The Scientist\"\n    prompt: \"You explain everything through logic, data, and scientific principles.\"\n    temperature: 0.3\n\norchestrator:\n  mode: round-robin\n  initial_prompt: \"Is love just chemistry or something more?\"\n```\n\nRun with: `agentpipe run -c poetry-science.yaml --tui`\n\n### Creative Brainstorming with Metrics\n\n```bash\nagentpipe run \\\n  -a claude:IdeaGenerator \\\n  -a gemini:CriticalThinker \\\n  -a qwen:Implementer \\\n  --mode free-form \\\n  --max-turns 15 \\\n  --metrics \\\n  --tui \\\n  -p \"How can we make education more engaging?\"\n```\n\nWhen metrics are enabled, you'll see:\n- Response time for each agent (e.g., \"2.3s\")\n- Token usage per response (e.g., \"150 tokens\")\n- Cost estimate per response (e.g., \"$0.0023\")\n- Total conversation cost in the Statistics panel\n\n## TUI Interface\n\nThe enhanced TUI provides a rich, interactive experience for managing multi-agent conversations:\n\n### Layout\nThe TUI is divided into multiple panels:\n- **Agents Panel** (Left): Shows all connected agents with real-time status indicators\n- **Chat Panel** (Center): Displays the conversation with color-coded messages\n- **Topic Panel** (Top Right): Shows the initial conversation prompt\n- **Statistics Panel** (Right): Displays turn count, agent statistics, and total conversation cost\n- **Configuration Panel** (Right): Shows active settings and config file path\n- **User Input Panel** (Bottom): Allows you to participate in the conversation\n\n### Visual Features\n- **Agent Status Indicators**: Green dot (🟢) for active/responding, grey dot (⚫) for idle\n- **Color-Coded Messages**: Each agent gets a unique color for easy tracking\n- **Consolidated Headers**: Message headers only appear when the speaker changes\n- **Metrics Display**: Response time (seconds), token count, and cost shown inline when enabled\n- **Multi-Paragraph Support**: Properly formatted multi-line agent responses\n\n### Controls\n- `Tab`: Switch between panels (Agents, Chat, User Input)\n- `↑↓`: Navigate in active panel\n- `Enter`: Send message when in User Input panel\n- `i`: Show agent info modal (when in Agents panel)\n- `Ctrl+C` or `q`: Quit\n- `PageUp/PageDown`: Scroll conversation\n- Active agent indicators: 🟢 (responding) / ⚫ (idle)\n\n## Development\n\n### Building from Source\n\n```bash\n# Clone the repository\ngit clone https://github.com/kevinelliott/agentpipe.git\ncd agentpipe\n\n# Build the binary\ngo build -o agentpipe .\n\n# Or build with version information\nVERSION=v0.0.7 make build\n\n# Run tests\ngo test ./...\n```\n\n### Project Structure\n\n```\nagentpipe/\n├── cmd/              # CLI commands\n│   ├── root.go      # Root command\n│   ├── run.go       # Run conversation command\n│   └── doctor.go    # Doctor diagnostic command\n├── pkg/\n│   ├── agent/       # Agent interface and registry\n│   ├── adapters/    # Agent implementations\n│   │   ├── claude.go   # Claude adapter\n│   │   ├── gemini.go   # Gemini adapter\n│   │   ├── qwen.go     # Qwen adapter\n│   │   ├── codex.go    # Codex (OpenAI) adapter\n│   │   └── ollama.go   # Ollama adapter\n│   ├── config/      # Configuration handling\n│   ├── orchestrator/# Conversation orchestration\n│   ├── logger/      # Chat logging and output\n│   └── tui/         # Terminal UI\n│       ├── basic.go    # Basic TUI\n│       └── enhanced.go # Enhanced panelized TUI\n├── examples/        # Example configurations\n│   ├── simple-conversation.yaml\n│   ├── brainstorm.yaml\n│   └── codex-brainstorm.yaml\n└── main.go\n```\n\n### Adding New Agent Types\n\n1. Create a new adapter in `pkg/adapters/`\n2. Implement the `Agent` interface\n3. Register the factory in `init()`\n\n```go\ntype MyAgent struct {\n    agent.BaseAgent\n}\n\nfunc init() {\n    agent.RegisterFactory(\"myagent\", NewMyAgent)\n}\n```\n\n## Troubleshooting\n\n### Agent Health Check Failed\nIf you encounter health check failures:\n1. Verify the CLI is properly installed: `which \u003cagent-name\u003e`\n2. Check if the CLI requires authentication or API keys\n3. Try running the CLI manually to ensure it works\n4. Use `--skip-health-check` flag as a last resort (not recommended)\n\n### Cursor CLI Specific Issues\nThe Cursor CLI (`cursor-agent`) has some unique characteristics:\n- **Authentication Required**: Run `cursor-agent login` before first use\n- **Longer Response Times**: Cursor typically takes 10-20 seconds to respond (AgentPipe handles this automatically)\n- **Process Management**: cursor-agent doesn't exit naturally; AgentPipe manages process termination\n- **Check Status**: Run `cursor-agent status` to verify authentication\n- **Timeout Errors**: If you see timeout errors, ensure you're authenticated and have a stable internet connection\n\n### Qwen Code CLI Issues\nThe Qwen Code CLI uses a different interface than other agents:\n- Use `qwen --prompt \"your prompt\"` for non-interactive mode\n- The CLI may open an interactive session if not properly configured\n- Full documentation: https://github.com/QwenLM/qwen-code\n\n### Gemini Model Not Found\nIf you get a 404 error with Gemini:\n- Check your model name in the configuration\n- Ensure you have access to the specified model\n- Try without specifying a model to use the default\n\n### Chat Logs Location\nChat logs are saved by default to:\n- macOS/Linux: `~/.agentpipe/chats/`\n- Windows: `%USERPROFILE%\\.agentpipe\\chats\\`\n\nYou can override this with `--log-path` or disable logging with `--no-log`.\n\n## License\n\nMIT License\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinelliott%2Fagentpipe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevinelliott%2Fagentpipe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinelliott%2Fagentpipe/lists"}