A sophisticated multi-model AI agent framework with intelligent task routing, extensible plugin architecture, and advanced resource optimization.
A sophisticated multi-model AI agent framework with intelligent task routing, extensible plugin architecture, and advanced resource optimization.
# Clone repository
git clone https://github.com/ageborn-dev/manusprime.git
cd manusprime
# Setup environment
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
pip install -r requirements.txt
# Configure API keys
cp .env.example .env
# Edit .env with your API keys
# Run the server
python server.py
Visit http://localhost:8000 to access the web interface.
ManusPrime employs a sophisticated multi-model approach that intelligently routes tasks to the optimal AI model:
βββββββββββββββ βββββββββββββββββ ββββββββββββββββββ βββββββββββββββ
β User Input ββββββΆβ Task Analysis ββββββΆβ Model SelectionββββββΆβ Execution β
βββββββββββββββ βββββββββββββββββ ββββββββββββββββββ βββββββββββββββ
β β² β² β
β β β β
βΌ β β βΌ
βββββββββββββββ βββββββββββββββββ ββββββββββββββββββ βββββββββββββββ
β Input β β Vector β β Resource β β Plugin β
β Validation β β Memory β β Monitor β β System β
βββββββββββββββ βββββββββββββββββ ββββββββββββββββββ βββββββββββββββ
ManusPrime intelligently selects the most appropriate model based on:
| Provider | Models | Specialties |
|---|---|---|
| OpenAI | GPT-4o, GPT-4o-mini | General purpose, reasoning, tool use |
| Anthropic | Claude 3.7 Sonnet, Claude 3.5 Haiku | Creative tasks, planning, reasoning |
| Mistral | Mistral Large, Mistral Small, Codestral | Code generation, efficient processing |
| Deepseek | Deepseek Chat, Deepseek Reasoner | Specialized reasoning tasks |
| Gemini | Gemini 2.0 Flash, Gemini 1.5 Pro | Multimodal capabilities, planning |
| Ollama | Various local models | Privacy-sensitive operations |
ManusPrimeβs plugin architecture enables powerful integrations and capabilities:
| Category | Plugin | Description |
|---|---|---|
| Provider | Multiple | Connects to various AI model providers |
| Vector Store | vector_memory |
Long-term memory using vector embeddings |
| Utility | input_validator |
Validates and optimizes user inputs |
| Automation | zapier |
Connects with 5,000+ external services |
| Category | Plugin | Description |
|---|---|---|
| Browser | browser_user |
Automates browser interactions and screenshots |
| File System | file_manager |
Manages file operations with security controls |
| Code Execution | python_execute |
Safely executes Python code in sandbox |
| Search | google_search |
Performs web searches for information retrieval |
| Web Crawler | crawl4ai |
Extracts content from websites and web apps |
ManusPrime includes sophisticated resource optimization features:
ManusPrime uses vector embeddings to store and retrieve relevant context:
# Memory enhances future interactions
await agent.execute_task("How do I optimize Python code?")
# Later:
await agent.execute_task("What were those optimization tips again?")
# Agent remembers previous interaction and provides context-aware response
Validates inputs before processing to:
Provides resilience through intelligent fallback mechanisms:
# One-shot execution
python main.py "Write a regex to extract emails from text"
# Interactive mode
python main.py --interactive
# Specify model
python main.py --model gpt-4o "Explain quantum computing"
from manusprime.core.agent import ManusPrime
async def main():
agent = ManusPrime()
await agent.initialize()
# Execute a task
result = await agent.execute_task(
"Create a Python function to download images from a website",
model="codestral-latest" # Optional: override model selection
)
print(result["content"])
print(f"Cost: ${result['cost']:.4f}")
await agent.cleanup()
# GET request for task status
curl http://localhost:8000/api/task/3fa85f64-5717-4562-b3fc-2c963f66afa6
# POST request to create task
curl -X POST http://localhost:8000/api/task \
-H "Content-Type: application/json" \
-d '{"prompt": "Write a blog post about AI agents", "model": "claude-3.7-sonnet"}'
ManusPrime uses TOML for configuration. Edit config/default.toml to customize:
# Provider configuration
[providers]
default = "openai" # Default provider to use
# Model costs per 1K tokens
[costs]
"claude-3.7-sonnet" = 0.015
"gpt-4o" = 0.010
"mistral-large-latest" = 0.008
# Budget configuration
[budget]
limit = 5.0 # Daily budget limit
# Active plugins by category
[plugins.active]
browser = "browser_user"
file_system = "file_manager"
code_execution = "python_execute"
search = "google_search"
vector_store = "vector_memory"
web_crawler = "crawl4ai"
utility = "input_validator"
ManusPrime includes multiple security features:
from plugins.base import Plugin, PluginCategory
class CustomPlugin(Plugin):
"""Custom plugin implementation."""
name = "custom_plugin"
description = "Description of custom plugin"
version = "0.1.0"
category = PluginCategory.UTILITY
async def initialize(self) -> bool:
# Setup code here
return True
async def execute(self, **kwargs) -> dict:
# Implementation here
return {"success": True, "result": "Operation completed"}
# Install development dependencies
pip install -r requirements-dev.txt
# Run tests
pytest tests/
# Run tests with coverage
pytest --cov=manusprime tests/
Contributions are welcome! Please check out our contribution guidelines.
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
ManusPrime builds upon innovations from multiple open-source projects and AI research. Special thanks to the developers of the libraries and models that make this project possible.
| GitHub | Documentation | Issues |
|---|