Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

ControlFlow

> AI 编程
Open source

Take control of your AI agents

1.4K stars0 likes3 views
WebsiteGitHub

About

Take control of your AI agents

[!IMPORTANT] Please note: next-generation ControlFlow engine was merged into the Marvin agentic framework, and this repo has been archived.

ControlFlow

ControlFlow is a Python framework for building agentic AI workflows.

ControlFlow provides a structured, developer-focused framework for defining workflows and delegating work to LLMs, without sacrificing control or transparency:

  • Create discrete, observable tasks for an AI to work on.
  • Assign one or more specialized AI agents to each task.
  • Combine tasks into a flow to orchestrate more complex behaviors.

Example

The simplest ControlFlow workflow has one task, a default agent, and automatic thread management:

python
import controlflow as cf

result = cf.run("Write a short poem about artificial intelligence")

print(result)

Result:

In circuits and code, a mind does bloom,
With algorithms weaving through the gloom.
A spark of thought in silicon's embrace,
Artificial intelligence finds its place.

Why ControlFlow?

ControlFlow addresses the challenges of building AI-powered applications that are both powerful and predictable:

  • Task-Centric Architecture: Break complex AI workflows into manageable, observable steps.
  • Structured Results: Bridge the gap between AI and traditional software with type-safe, validated outputs.
  • Specialized Agents: Deploy task-specific AI agents for efficient problem-solving.
  • ️ Flexible Control: Continuously tune the balance of control and autonomy in your workflows.
  • ️ Multi-Agent Orchestration: Coordinate multiple AI agents within a single workflow or task.
  • Native Observability: Monitor and debug your AI workflows with full Prefect 3.0 support.
  • Ecosystem Integration: Seamlessly work with your existing code, tools, and the broader AI ecosystem.

Installation

Install ControlFlow with pip:

bash
pip install controlflow

Next, configure your LLM provider. ControlFlow's default provider is OpenAI, which requires the OPENAI_API_KEY environment variable:

bash
export OPENAI_API_KEY=your-api-key

To use a different LLM provider, see the LLM configuration docs.

Workflow Example

Here's a more involved example that showcases user interaction, a multi-step workflow, and structured outputs:

…
Click to see results

Conversation:

Agent: Hello! I'm here to help you choose a research topic. Do you have 
any particular area of interest or field you would like to explore? 
If you have any specific ideas or requirements, please share them as well.

User: Yes, I'm interested in LLM agentic workflows

Proposal:

…

In this example, ControlFlow is automatically managing a flow, or a shared context for a series of tasks. You can switch between standard Python functions and agentic tasks at any time, making it easy to incrementally build out complex workflows.

Learn More

To dive deeper into ControlFlow:

  • Read the full documentation
  • Explore example projects
  • Join our community on Slack

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Pythonagentagentic-frameworkagentic-workflowai

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryAI 编程
PricingOpen source

> Related tools

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.