- Add intelligent-router.sh hook for automatic agent routing - Add AUTO-TRIGGER-SUMMARY.md documentation - Add FINAL-INTEGRATION-SUMMARY.md documentation - Complete Prometheus integration (6 commands + 4 tools) - Complete Dexto integration (12 commands + 5 tools) - Enhanced Ralph with access to all agents - Fix /clawd command (removed disable-model-invocation) - Update hooks.json to v5 with intelligent routing - 291 total skills now available - All 21 commands with automatic routing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
5.1 KiB
Multi-Agent Architecture
Prometheus uses a multi-agent system powered by LangGraph to intelligently process and resolve GitHub issues. Each agent is specialized for a specific task in the issue resolution pipeline.
Agent Overview
1. Issue Classification Agent
Purpose: Automatically classifies GitHub issues into categories (bug, question, feature, documentation).
Location: prometheus/lang_graph/subgraphs/issue_classification_subgraph.py
Workflow:
- Retrieves relevant code context from the knowledge graph
- Uses LLM to analyze issue content and classify type
- Returns issue type for routing to appropriate handler
When Used: When issue_type == "auto" in the issue request
2. Environment Build Agent
Status: In Progress
Purpose: Automatically sets up and configures the development environment for testing and building.
Planned Features:
- Auto-detect project type (Python, Node.js, Java, etc.)
- Install dependencies
- Configure build tools
- Validate environment setup
3. Bug Reproduction Agent
Purpose: Attempts to reproduce reported bugs by writing and executing reproduction tests.
Location: prometheus/lang_graph/subgraphs/bug_reproduction_subgraph.py
Workflow:
- Retrieves bug-related code context from knowledge graph
- Generates reproduction test code using LLM
- Edits necessary files to create the test
- Executes the test in a Docker container
- Evaluates whether the bug was successfully reproduced
- Retries with feedback if reproduction fails
Output:
reproduced_bug: Boolean indicating successreproduced_bug_file: Path to reproduction testreproduced_bug_commands: Commands to reproducereproduced_bug_patch: Git patch with changes
Key Features:
- Iterative refinement with retry loops
- Docker-isolated execution
- Feedback-driven improvement
4. Context Retrieval Agent
Purpose: Retrieves relevant code and documentation context from the Neo4j knowledge graph.
Location: prometheus/lang_graph/subgraphs/context_retrieval_subgraph.py
Workflow:
- Converts natural language query to knowledge graph query
- Uses LLM with graph traversal tools to find relevant context
- Selects and extracts useful code snippets
- Optionally refines query and retries if context is insufficient
- Returns structured context (code, AST nodes, documentation)
Key Features:
- Iterative query refinement (2-4 loops)
- Tool-augmented LLM with Neo4j access
- Traverses file hierarchy, AST structure, and text chunks
Used By: All other agents for context gathering
5. Issue Resolution Agent
Purpose: Generates and validates bug fix patches for verified bugs.
Location: prometheus/lang_graph/subgraphs/issue_verified_bug_subgraph.py
Workflow:
- Retrieves fix-relevant code context
- Analyzes bug root cause using LLM
- Generates code patch to fix the bug
- Applies patch and creates git diff
- Validates patch against:
- Reproduction test (must pass)
- Regression tests (optional)
- Existing test suite (optional)
- Generates multiple candidate patches
- Selects best patch based on test results
- Retries with error feedback if tests fail
Output:
edit_patch: Final selected fix patch- Test pass/fail results
Key Features:
- Multi-candidate patch generation
- Multi-level validation (reproduction, regression, existing tests)
- Feedback-driven iteration
- Best patch selection using LLM
Agent Coordination
Main Issue Processing Flow
User Issue -> Issue Classification Agent
|
[Route by issue type]
|
+-----+-----+
| |
BUG QUESTION
| |
v v
Bug Pipeline Question Pipeline
Bug Resolution Pipeline
Bug Issue -> Context Retrieval Agent (select regression tests)
-> Bug Reproduction Agent (verify bug exists)
-> [If reproduced] -> Issue Resolution Agent (generate fix)
-> [If not reproduced] -> Direct resolution without reproduction
-> Response Generation
Question Answering Pipeline
Question -> Context Retrieval Agent (gather relevant code/docs)
-> Question Analysis Agent (LLM with tools)
-> Response Generation
Agent Communication
Agents communicate through shared state managed by LangGraph:
- Each subgraph has a typed state dictionary
- State flows through nodes and is updated progressively
- Parent states are inherited by child subgraphs
- Results are passed back through state returns
Technology Stack
- LangGraph: State machine orchestration
- LangChain: LLM integration and tool calling
- Neo4j: Knowledge graph storage and retrieval
- Docker: Isolated test execution environment
- Tree-sitter: Code parsing and AST generation
- Git: Patch management and version control
Future Enhancements
- Environment Build Agent: Complete implementation for automatic setup
- Pull Request Review Agent: Automated code review
- Feature Implementation Agent: Handle feature requests
- Documentation Generation Agent: Auto-generate docs from code