Open-Alita is a generalist agent designed to enable scalable agentic reasoning with minimal predefinition and maximal self-evolution. This project leverages the Model Context Protocol (MCP) to dynamically create, adapt, and reuse capabilities based on the demands of various tasks, moving away from the reliance on predefined tools and workflows.
Follow updates & connect: @ryan_tzr on Twitter
Open-Alita implements a modular, self-evolving architecture built around the Model Context Protocol (MCP). The system is designed to minimize hard-coded behaviors while maximizing adaptive capabilities.
📊 View Complete Architecture Diagram
The architecture consists of multiple layers working together to provide intelligent query routing, dynamic tool creation, and web search capabilities.
The central orchestrator that handles user interactions and coordinates all system components.
Key Features:
- Dynamic Intent Recognition: Uses LLM-powered natural language understanding combined with regex fallbacks
- Command Processing: Handles both streaming and batch processing modes
- MCP Lifecycle Management: Creates, caches, and reuses dynamic capabilities
- Fallback Mechanisms: Gracefully degrades from LLM-based parsing to pattern matching
A capability registry that stores and manages all Model Context Protocol functions.
Key Features:
- Capability Storage: Maintains both pre-loaded and dynamically generated MCPs
- Metadata Management: Tracks function descriptions, arguments, return types, and source origins
- Command Caching: Stores original user commands to enable capability reuse
- Introspection: Provides detailed listings of available capabilities
A secure code execution engine that transforms LLM-generated scripts into executable functions.
Key Features:
- Script Parsing: Extracts metadata and code from LLM responses
- Sandboxed Execution: Provides restricted Python execution environment
- Dependency Management: Safely imports whitelisted modules based on requirements
- Error Handling: Graceful failure and recovery mechanisms
Handles all interactions with large language models for code generation and intent parsing.
Key Features:
- Code Generation: Creates new MCP scripts based on user requests
- Streaming Support: Real-time code generation with user feedback
- Intent Parsing: Natural language understanding for command interpretation
A Flask-based web application providing an intuitive chat interface.
Components:
- WebApp (
web_app.py): Flask server with streaming response support - Frontend (
templates/index.html): Real-time chat interface with streaming - Styling (
static/style.css): Modern, responsive UI design
User Input → AlitaAgent → Intent Recognition
↓
Check MCPBox for existing capability
↓
If not found: LLMProvider → Generate Code → MCPFactory → Validate & Execute
↓
Store in MCPBox for future reuse
↓
Execute capability → Return result
- Sandboxed Execution: All dynamically generated code runs in a restricted Python environment
- Whitelisted Imports: Only approved modules can be imported based on declared requirements
- Safe Globals: Limited built-in functions available to generated code
- Error Isolation: Failures in generated code don't crash the main system
- Minimal Predefinition: Equipped with a minimal set of core capabilities, allowing for flexibility and adaptability.
- Maximal Self-Evolution: The agent can autonomously create and refine external capabilities as needed.
- Dynamic MCP Creation: Alita can generate and adapt MCPs on-the-fly, enhancing its ability to tackle diverse tasks.
- Real-time Streaming: Watch capabilities being created and executed in real-time
- Capability Reuse: Automatically caches and reuses previously generated tools
- Natural Language Processing: Advanced intent recognition for intuitive interactions
- Enhanced Error Handling - Better robustness for dynamic code generation
- Performance Optimization - Code caching and faster execution
- Persistent Memory - Save learned capabilities across sessions
- Multi-modal Support - Handle images, audio, and files
- Web Agent - Browse websites, extract content, and interact with web services (coming this week)
To set up the project, clone the repository and install the required dependencies:
cd Open-Alita
pip install -r requirements.txtTo run the Alita agent with the web interface:
- Navigate to the web application directory:
cd src/web - Run the Flask web application:
python web_app.py
This will typically start the server on http://127.0.0.1:5001/.
To run the agent in command-line mode (without the web UI):
python -m src.prompt.mcpMake sure to configure the necessary parameters (e.g., API keys in a .env file or directly in the code) as needed.
This project is inspired by the Alita project by CharlesQ9 and the concepts presented in the research paper "Alita: Generalist Agent Enabling Scalable Agentic Reasoning with Minimal Predefinition and Maximal Self-Evolution".
- Original Alita Project: CharlesQ9/Alita on GitHub
- Research Paper: Alita: Generalist Agent Enabling Scalable Agentic Reasoning with Minimal Predefinition and Maximal Self-Evolution (arXiv:2505.20286)
Full credits to the authors and contributors of these works for the foundational architecture and ideas.
Contributions are welcome! If you have ideas for improvements or new features, feel free to submit a pull request or open an issue.
This project is licensed under the MIT License. See the LICENSE file for more details.
We would like to thank the contributors and the community for their support and feedback in developing Open-Alita.