# Managed by IssueSpec. Hand edits are welcome; keep the schema valid. id: 19 title: Start and monitor agents from Ori state: open author: name: k33g email: ph.charriere@gmail.com createdAt: 2026-09-18T00:00:00.000Z updatedAt: 2026-09-18T00:00:00.000Z labels: - feature - enhancement - agents body: | Add the ability to start multiple independent agents from Ori and monitor their progress in real-time. ## Use Cases - Start parallel agents with different tasks: "agent bob: write a story about X" and "agent rikker: write a story about Y" - Monitor multiple long-running agents simultaneously - Track agent progress, tool calls, and outputs in separate views - Stop/pause/resume individual agents - Review agent results when complete ## Requirements ### Agent Lifecycle - Command syntax: `agent : ` or `/agent ` - Each agent gets a unique identifier/name - Agents run independently in parallel (like Task tool with run_in_background) - Agents persist across Ori sessions (survive page refresh) - Clear indication when agent starts, is running, completes, or errors ### Monitoring & Visibility - Real-time display of what each agent is doing - Stream agent thoughts, tool calls, and outputs as they happen - Show agent status: queued, running, paused, completed, failed - Visual distinction between agents (colors, avatars, icons) - Ability to expand/collapse agent views - Notification when agent completes or encounters error ### Control & Interaction - Pause/resume individual agents - Stop/terminate agents - Respond to agent questions/prompts individually - View full agent conversation history - Export/save agent results - Restart failed agents ## Implementation Considerations ### Backend - Extend ACP protocol or use existing Task tool capabilities - Each agent needs its own ACP session or isolated execution context - Agent state persistence (in-memory or file-based) - Agent output streaming (SSE, WebSocket, or polling) - Resource limits per agent (memory, CPU, timeout) - Queue management if too many agents requested ### Frontend UI Options **Option 1: Tabbed Agent Panel** - Each agent gets its own tab - Active tab shows streaming output - Tab indicators show agent status (spinner, checkmark, error icon) - Similar to browser tabs or VS Code terminal tabs **Option 2: Split View** - Vertical or horizontal splits - Each pane shows one agent - Resize panes to focus on specific agents - Similar to tmux or terminal multiplexers **Option 3: Agent Dashboard** - Grid or list view of all active agents - Cards show agent name, status, last output - Click card to expand to full view - Similar to task/process managers **Option 4: Unified Stream with Filtering** - All agent outputs in single stream - Color-coded or labeled by agent name - Filter controls to show/hide specific agents - Similar to multi-tail log viewers ### ACP Integration - Leverage existing ACP streaming capabilities - Use Task tool with run_in_background: true - Poll TaskOutput for agent progress - Or implement new ACP commands: `start_agent`, `list_agents`, `stop_agent` ## User Experience Flow ``` User: agent bob: write a story about Jean-Luc Picard User: agent rikker: write a story about Seven of Nine UI: Shows two agent cards/tabs: [Bob] ⏳ Writing story... (thought: searching for Picard references) [Rikker] ⏳ Writing story... (thought: analyzing Seven's character arc) User: *clicks Bob's card to expand* UI: Shows full streaming output of Bob's work User: *Bob completes* UI: [Bob] ✓ Complete - picard-story.md created User: /agents list UI: - bob: completed (2 min ago) - picard-story.md - rikker: running (3/5 tasks complete) ``` ## Related Features - Could integrate with `/btw` command for agent-specific context - Agent results could appear in file tree automatically - Terminal panel could show agent bash commands - Could support agent-to-agent communication (advanced) ## Open Questions - Maximum number of concurrent agents? - Should agents share workspace context or be isolated? - How to handle agent conflicts (both editing same file)? - Should agents see each other's outputs? - Pricing/cost implications of multiple parallel agents? - Should agent names be user-defined or auto-generated? - Persist agent history across Ori restarts? - Should there be agent templates/presets? ## Technical Challenges - Resource management with multiple Claude API calls - State synchronization between backend and frontend - File system conflicts when multiple agents write - Error handling and recovery for individual agents - Performance impact of streaming multiple outputs ## Priority High - This would be a differentiating feature for Ori as a multi-agent orchestration tool ## Related Work - Claude Code's Task tool with run_in_background - Aider's architect mode - AutoGPT/BabyAGI multi-agent systems - LangChain agent executors