Favicon of AgentFlow

AgentFlow

An open-source Python framework for AI agent workflows, with local Docker execution and Ollama or LMStudio model connections through Pi.

AgentFlow is an MIT-licensed Python framework for developers who want several coding agents to share a workflow. It connects Codex, Claude, Kimi, and Pi tasks in dependency graphs, so planning can feed implementation and parallel reviews can feed a combined result. Agents can run in local Docker containers or on remote machines through SSH, EC2, and ECS.

Its graphs support parallel work across items or combinations of inputs, then merge results in batches or groups. Review cycles can send work back for revision until it meets a success condition or reaches an iteration limit. A shared scratchboard gives agents a common memory file, and the tool includes a browser interface for running pipelines.

Model choice is separate from execution location. Through Pi, AgentFlow connects to local LLM endpoints in Ollama and LMStudio using OpenAI-compatible or Anthropic-compatible protocols. Pi also connects to cloud providers such as OpenAI, Anthropic, and OpenRouter. Those connections send model requests to the chosen service; running an agent locally doesn't make its inference local. For cloud inference under your control, SkyPilot integration can launch shared vLLM or SGLang services.

Isolation is another useful distinction. Docker tasks support read-only workspaces and network restrictions, and don't inherit host credentials by default. On Linux hosts with KVM access, Cloud Hypervisor can give each task a temporary virtual machine. AgentFlow can also turn completed Codex runs into reusable tuned agents, which run on local targets.

Similar to AgentFlow