UltronAI is a sophisticated General-Purpose Artificial General Intelligence (AGI) system that leverages multiple specialized AI agents to execute complex tasks intelligently. Built with a modular, state-driven architecture, it can handle diverse tasks ranging from system health checks to portfolio creation, web development, data analysis, and more .
- π€ Multi-Agent Architecture: 9 specialized agents working in coordination
- π§ AI-Powered Planning: Intelligent task decomposition and execution planning
- π Rich Terminal UI: Beautiful, informative interface with progress tracking
- π State-Driven Execution: Persistent state management across task execution
- π‘οΈ Error Resilience: Robust error handling and recovery mechanisms
- π Document Processing: PDF reading and content extraction capabilities
- π Web Research: Comprehensive web search and synthesis capabilities
- π» Code Generation: Advanced code generation with quality assessment
UltronAI/
βββ main.py # Main entry point and orchestration
βββ shared_state.py # State management and persistence
βββ requirements.txt # Dependencies
βββ Agents/ # Specialized agent modules
β βββ planner_agent.py # Task planning and decomposition
β βββ coder_agent.py # Code generation and refinement
β βββ file_handler_agent.py # File operations and project structure
β βββ shell_executer_agent.py # System operations and shell commands
β βββ web_search.py # Web research and synthesis
β βββ error_resolver.py # Error analysis and recovery
β βββ document_reader_agent.py # PDF and document processing
β βββ environment_check_agent.py # System dependency checking
β βββ human_intervention_agent.py # User interaction handling
β βββ prompt_refiner.py # Task refinement and optimization
βββ projects/ # Generated project outputs
| Agent | Primary Function | Capabilities |
|---|---|---|
| Planner Agent | Task decomposition and planning | Goal analysis, quality assessment, execution planning |
| Coder Agent | Code generation and refinement | Content analysis, structure design, code review |
| File Handler Agent | File operations and project structure | Project detection, backup protection, intelligent naming |
| Shell Executer Agent | System operations and shell commands | Platform-aware commands, system health checks |
| Web Search Agent | Web research and synthesis | Multi-source search, analysis, synthesis |
| Error Resolver Agent | Error analysis and recovery | Root cause analysis, fix strategy generation |
| Document Reader Agent | Document processing | PDF reading, content extraction |
| Environment Check Agent | System dependency verification | Tool availability checking |
| Human Intervention Agent | User interaction handling | Help requests, user guidance |
- Python 3.8 or higher
- macOS, Linux, or Windows
- Internet connection for AI model access
-
Clone the repository
git clone <repository-url> cd UltronAI
-
Create virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables
cp .env.example .env # Edit .env with your API keys -
Run the system
python main.py
python main.py
# Enter: "check my system health and report the status through terminal"python main.py
# Enter: "my resume is in desktop named 'resume.pdf', read it and make a portfolio page"python main.py
# Enter: "create a responsive landing page for a tech startup"python main.py
# Enter: "analyze sales data and create visualizations"The system uses a sophisticated state management approach through the SharedState class:
class SharedState:
def __init__(self, original_task: str):
self.original_task: str = original_task
self.current_plan: List[Dict[str, Any]] = []
self.project_directory: Optional[Path] = None
self.created_files: List[str] = []
self.generated_code: Dict[str, str] = {}
self.document_content: Optional[str] = None
# ... additional state propertiesAgents communicate through a standardized JSON format:
{
"agent": "agent_name",
"description": "specific command or instruction"
}- Task Input β User provides task description
- Task Refinement β Prompt refiner optimizes the task
- State Initialization β SharedState created with task context
- Document Processing β If documents mentioned, read and extract content
- Planning Phase β Planner agent creates execution plan
- Execution Loop β Agents execute tasks in sequence
- Quality Assessment β Output quality evaluated
- Refinement β If needed, code is refined and improved
- Completion β Final output delivered
The system implements multiple layers of error handling:
- Pre-flight Checks: Environment and dependency verification
- Execution Monitoring: Real-time error detection
- Error Analysis: Root cause identification
- Recovery Strategies: Automatic fix plan generation
- Human Intervention: User guidance when automatic recovery fails
- Groq DeepSeek R1 Distill Llama 70B: High-performance, fast inference model
- Goal Analysis: Extracts ultimate goals and success criteria
- Quality Assessment: Evaluates output quality (1-10 scale)
- Execution Planning: Creates detailed step-by-step plans
- Refinement Planning: Generates improvement strategies
- Content Analysis: Parses unstructured text into structured data
- Structure Design: Creates optimal layouts and designs
- Code Generation: Produces production-ready code
- Code Review: Self-assessment and improvement
- Iterative Refinement: Continuous quality improvement
- Project Type Detection: Automatically identifies project types
- Intelligent Structure Creation: Creates appropriate project structures
- Backup Protection: Prevents data loss through backup mechanisms
- Content Awareness: Reads and analyzes existing files
- Multi-Source Search: Performs comprehensive web searches
- Source Evaluation: Assesses credibility and relevance
- Information Synthesis: Creates actionable summaries
- Analysis: Provides detailed insights and recommendations
- Response Time: Typically 30-60 seconds for complex tasks
- Accuracy: High-quality output with iterative refinement
- Reliability: Robust error handling and recovery
- Scalability: Modular architecture supports easy expansion
- Memory: Efficient state management with cleanup
- CPU: Optimized for multi-agent coordination
- Network: Minimal API calls with intelligent caching
- Storage: SQLite-based persistent storage
- Command Validation: Prevents dangerous shell commands
- File Protection: Backup mechanisms prevent data loss
- Input Sanitization: Validates all user inputs
- Error Isolation: Errors don't propagate across agents
- Timeout Protection: Prevents infinite loops
- Resource Limits: Prevents excessive resource usage
- Error Recovery: Graceful degradation on failures
- User Confirmation: Critical operations require user approval
- Unit Tests: Individual agent functionality
- Integration Tests: Multi-agent coordination
- End-to-End Tests: Complete task execution
- Error Scenario Tests: Error handling and recovery
- Code Quality: Automated code review and scoring
- Output Quality: 1-10 scale assessment
- User Satisfaction: Feedback collection and analysis
- Performance Monitoring: Response time and resource usage
- Document Reading: PDF parsing and content extraction
- Structured Data: Intelligent parsing of unstructured content
- Context Preservation: Maintains context across operations
- Content Integration: Uses real content instead of placeholders
- Goal-Oriented: Focuses on ultimate objectives
- Quality-Driven: Prioritizes output quality
- Adaptive: Adjusts plans based on progress
- Iterative: Continuous improvement cycles
- Progress Tracking: Real-time execution progress
- Status Updates: Detailed status information
- Error Reporting: Clear error messages and solutions
- Output Display: Beautiful formatting of results
- Fork the repository
- Create a feature branch
- Implement your changes
- Add tests for new functionality
- Submit a pull request
- PEP 8: Python code style guidelines
- Type Hints: Comprehensive type annotations
- Documentation: Detailed docstrings and comments
- Error Handling: Robust error management
- Unit Tests: Test individual functions and methods
- Integration Tests: Test agent interactions
- End-to-End Tests: Test complete workflows
- Performance Tests: Monitor resource usage
This project is licensed under the MIT License - see the LICENSE file for details.
- Groq: For providing high-performance AI inference
- DeepSeek: For the powerful language model
- Rich: For the beautiful terminal UI framework
- Agno: For the agent framework and utilities
For support, questions, or feature requests:
- Issues: Create an issue on GitHub
- Discussions: Use GitHub Discussions
- Documentation: Check the inline code documentation
- Examples: See the
projects/directory for examples
UltronAI Multi-Agent System - Empowering intelligent task execution through coordinated AI agents. π
Created with β€οΈ by Amit Anand