agentflow  by shouc

Orchestrate complex agentic workflows as programmatic graphs

Created 1 month ago
779 stars

Top 44.8% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

AgentFlow is a Python framework for programmatically orchestrating complex AI agent workflows. It enables users to define dependency graphs of agents (like Codex, Claude, Kimi) and execute them with advanced features such as parallel fanout, iterative cycles, and remote execution across SSH, EC2, and ECS. This empowers developers to build sophisticated, scalable, and distributed AI systems.

How It Works

AgentFlow models agent interactions as directed acyclic graphs (DAGs) defined in Python. Core functionalities include parallel fanout, where a single agent's task can be distributed to numerous parallel instances based on count, list items, or Cartesian products. Results can be aggregated using batch (merge(size=N)) or grouped (merge(by=...)) strategies. Iterative cycles allow agents to loop until specific success_criteria are met, with a max_iterations limit. Remote execution is a key feature, supporting deployment to SSH, EC2, and ECS targets with minimal configuration. A scratchboard option provides shared memory across all agents in a graph.

Quick Start & Requirements

Installation is streamlined via a one-line bash script: curl -fsSL https://raw.githubusercontent.com/shouc/agentflow/master/install.sh | bash. This command installs AgentFlow, adds it to the system's PATH, and includes necessary agent skills. Alternatively, manual installation involves setting up a Python virtual environment and running pip install -e .[dev]. The framework requires Python 3.

Highlighted Details

  • Remote Execution: Seamlessly deploy agents to SSH hosts, EC2 instances (auto-discovering AWS resources), or ECS Fargate tasks.
  • Flexible Fanout: Distribute tasks across agents using integer counts, list elements, or dictionary-based Cartesian products for complex parallelization.
  • Iterative Workflows: Implement self-correcting or refinement loops using success_criteria and max_iterations for agent tasks.
  • Scalability: Demonstrated with a 94-node pipeline involving planning, parallel worker execution, batch merging, reviews, and synthesis.
  • Shared State: The scratchboard=True option enables a shared memory file accessible by all agents within a graph.

Maintenance & Community

The project acknowledges contributions from "gepa", "kiss-ai", "claude-code-telegram", and "linux.do". No specific community channels (e.g., Discord, Slack) or detailed contributor information are provided in the README snippet.

Licensing & Compatibility

The license type is not specified in the provided README content.

Limitations & Caveats

No explicit limitations are detailed in the README. The complexity inherent in managing large-scale, distributed agent graphs and configuring remote execution environments may present adoption challenges.

Health Check
Last Commit

6 days ago

Responsiveness

Inactive

Pull Requests (30d)
7
Issues (30d)
0
Star History
788 stars in the last 30 days

Explore Similar Projects

Starred by Andrew Ng Andrew Ng(Founder of DeepLearning.AI; Cofounder of Coursera; Professor at Stanford), Jack Lukic Jack Lukic(Author of Semantic UI), and
5 more.

ag2 by ag2ai

0.7%
4k
AgentOS for building AI agents and facilitating multi-agent cooperation
Created 1 year ago
Updated 12 hours ago
Feedback? Help us improve.