agentenv/agentflow
Orchestrate thousands of agents and harnesses as a graph programatically
What it solves
AgentFlow provides a way to orchestrate multiple AI agents (such as Codex, Claude, Kimi, and Pi) into complex workflows. It solves the difficulty of managing agent dependencies, running tasks in parallel (fanout), creating iterative feedback loops, and executing these agents across diverse environments ranging from local Docker containers to remote cloud instances.
How it works
Users define a dependency graph using a Python API where nodes represent agent tasks and edges define the execution order. The system supports:
- Parallelism: The
fanoutfunction creates multiple copies of a node to process lists or dictionaries of data, which can then be reduced usingmerge. - Iterative Cycles: The
on_failuremechanism allows a node to loop back to a previous step until specific success criteria (e.g., a specific string in the output) are met. - Flexible Execution: Agents can be deployed to various "targets" including Docker containers, KVM virtual machines (via Cloud Hypervisor), SSH, EC2, or ECS Fargate.
- Model Routing: Through the
piagent, it can route requests to various external providers (OpenAI, Anthropic, Groq, etc.) or local endpoints (Ollama, LMStudio). - Infrastructure Management: It integrates with SkyPilot to automatically launch vLLM or SGLang inference endpoints on cloud GPUs.
Who it’s for
It is designed for developers and researchers who need to build multi-agent pipelines for complex tasks like automated code review, vulnerability discovery, or large-scale data processing where isolation and scalability are required.
Highlights
- Diverse Execution Targets: Supports Docker, Cloud Hypervisor (KVM), SSH, EC2, and ECS.
- Advanced Graph Control: Built-in support for parallel fanout, batch merging, and iterative loops.
- Tuned Agent Evolution: Ability to use traces from successful runs to evolve and create reusable tuned agents.
- Cloud GPU Integration: Direct integration with SkyPilot for automated inference server deployment.
- Shared State: Includes a "scratchboard" for shared memory across all agents in a graph.
Related
- Project
- Project
- Project
- Project
- Project