An operating system for agents — a general-purpose engine that decomposes ANY complex goal into a dynamic DAG (Directed Acyclic Graph) of subtasks, executes them with parallelism, handles failures through replanning, tracks costs, and includes human-in-the-loop checkpoints.
- DAG-based Execution: Accepts natural language goals, decomposes them into atomic parallel subtasks using a DeepSeek-based planner.
- Parallel Subtasks: Runs independent tasks concurrently using AsyncIO.
- Adaptive Execution: When failure occurs, chooses between
RETRY,REPLAN, orESCALATEto adapt at runtime. - Cost Awareness: Tracks model costs continuously to enforce budget constraints across execution phases.
- Human In The Loop: Requests human approval before high-stakes operations or when a budget is exceeded.
- DeepSeek Integration: Uses the reliable
deepseek-chatmodel for robust planning and execution operations.
- Python 3.10+
- DeepSeek API:
deepseek-chatmodel replacing expensive legacy models. - NetworkX: Verifies DAG topological bounds and detects cycles.
- Pydantic: Heavily utilized for data validation and parsing JSON outputs.
- Clone the repository
- Set up the Environment (Requires Python 3.10+)
pip install -r requirements.txt
- Copy
.env.exampleto.envand assign your API key. Make sureDEEPSEEK_API_KEYis present. - Run the Engine CLI:
python main.py run "Evaluate three top web scraping libraries for python, compare their features and write a summary."
- Planner:
GoalDecomposer,DAGValidator,CostEstimator,DynamicReplanner - Executor:
ParallelExecutor,WorkflowScheduler,DependencyResolver - Failure Engine: Error Classification and Strategies (
RETRY,REPLAN,SKIP,ESCALATE) - Monitoring: Live event traces with Cost Analysis.
▶ Executing...
[0.0s] 🚀 Started: research_competitors, research_market, analyze_strengths (parallel)
[3.2s] ✅ research_competitors completed ($0.04, 823 tokens)
[4.1s] ✅ analyze_strengths completed ($0.03, 612 tokens)
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.