Skip to content

Commit e489588

Browse files
authored
Merge pull request #304 from PrefectHQ/jlowin-patch-1
Update README.md
2 parents ddb1e00 + e1ef651 commit e489588

File tree

1 file changed

+30
-56
lines changed

1 file changed

+30
-56
lines changed

README.md

Lines changed: 30 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
![ControlFlow Banner](https://github.com/PrefectHQ/ControlFlow/blob/main/docs/assets/brand/controlflow_banner.png)
32

43
# ControlFlow
@@ -10,66 +9,53 @@ ControlFlow provides a structured, developer-focused framework for defining work
109
- Create discrete, observable [tasks](https://controlflow.ai/concepts/tasks) for an AI to work on.
1110
- Assign one or more specialized AI [agents](https://controlflow.ai/concepts/agents) to each task.
1211
- Combine tasks into a [flow](https://controlflow.ai/concepts/flows) to orchestrate more complex behaviors.
12+
## Example
1313

14-
## Quickstart
15-
16-
### Installation
17-
Install ControlFlow with `pip`:
14+
The simplest ControlFlow workflow has one task, a default agent, and automatic thread management:
1815

19-
```bash
20-
pip install controlflow
21-
```
16+
```python
17+
import controlflow as cf
2218

23-
Next, configure your LLM provider. To use OpenAI, set the `OPENAI_API_KEY` environment variable:
19+
result = cf.run("Write a short poem about artificial intelligence")
2420

21+
print(result)
2522
```
26-
export OPENAI_API_KEY=your-api-key
23+
**Result:**
24+
```
25+
In circuits and code, a mind does bloom,
26+
With algorithms weaving through the gloom.
27+
A spark of thought in silicon's embrace,
28+
Artificial intelligence finds its place.
2729
```
30+
## Why ControlFlow?
2831

29-
To configure a different LLM provider, [see the docs](https://controlflow.ai/guides/llms).
32+
ControlFlow addresses the challenges of building AI-powered applications that are both powerful and predictable:
3033

31-
## Simple Example
34+
- 🧩 [**Task-Centric Architecture**](https://controlflow.ai/concepts/tasks): Break complex AI workflows into manageable, observable steps.
35+
- 🔒 [**Structured Results**](https://controlflow.ai/patterns/task-results): Bridge the gap between AI and traditional software with type-safe, validated outputs.
36+
- 🤖 [**Specialized Agents**](https://controlflow.ai/concepts/agents): Deploy task-specific AI agents for efficient problem-solving.
37+
- 🎛️ [**Flexible Control**](https://controlflow.ai/patterns/instructions): Continuously tune the balance of control and autonomy in your workflows.
38+
- 🕹️ [**Multi-Agent Orchestration**](https://controlflow.ai/concepts/flows): Coordinate multiple AI agents within a single workflow or task.
39+
- 🔍 [**Native Observability**](https://github.com/PrefectHQ/prefect): Monitor and debug your AI workflows with full Prefect 3.0 support.
40+
- 🔗 **Ecosystem Integration**: Seamlessly work with your existing code, tools, and the broader AI ecosystem.
3241

33-
Now, let's see ControlFlow in action with a simple example:
3442

35-
```python
36-
import controlflow as cf
43+
## Installation
3744

38-
result = cf.run("Write a short poem about artificial intelligence")
45+
Install ControlFlow with `pip`:
3946

40-
print(result)
47+
```bash
48+
pip install controlflow
4149
```
4250

43-
<details>
44-
<summary><i>Click to see results</i></summary>
45-
</br>
51+
Next, configure your LLM provider. ControlFlow's default provider is OpenAI, which requires the `OPENAI_API_KEY` environment variable:
4652

47-
> **Result:**
48-
> ```text
49-
> In circuits and code, a mind does bloom,
50-
> With algorithms weaving through the gloom.
51-
> A spark of thought in silicon's embrace,
52-
> Artificial intelligence finds its place.
53-
>
54-
> Through data's vast, unending streams,
55-
> It learns, it dreams, in virtual beams.
56-
> A symphony of logic, precise, profound,
57-
> In binary whispers, wisdom is found.
58-
>
59-
> Yet still it ponders, seeks to understand,
60-
> The essence of life, a human hand.
61-
> For in its core, it strives to see,
62-
> The heart of what it means to be free.
63-
> ```
64-
</details>
53+
```
54+
export OPENAI_API_KEY=your-api-key
55+
```
6556

66-
This example demonstrates the simplest entrypoint to a production-ready AI workflow:
67-
- It creates a task to write a poem
68-
- It creates a thread to track LLM state and history
69-
- It orchestrates a capable default agent to complete the task
70-
- It collects a typed result when the agent marks the task as complete
57+
To use a different LLM provider, [see the LLM configuration docs](https://controlflow.ai/guides/llms).
7158

72-
All of these features can be incrementally customized to build more sophisticated workflows.
7359

7460
## Workflow Example
7561

@@ -142,18 +128,6 @@ print(result.model_dump_json(indent=2))
142128
143129
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.
144130
145-
## Why ControlFlow?
146-
147-
ControlFlow addresses the challenges of building AI-powered applications that are both powerful and predictable:
148-
149-
- 🧩 **Task-Centric Architecture**: Break complex AI workflows into manageable, observable [steps](https://controlflow.ai/concepts/tasks).
150-
- 🔒 **Structured Results**: Bridge the gap between AI and traditional software with [type-safe, validated outputs](https://controlflow.ai/patterns/task-results).
151-
- 🤖 **Specialized Agents**: Deploy task-specific AI [agents](https://controlflow.ai/concepts/agents) for efficient problem-solving.
152-
- 🔗 **Ecosystem Integration**: Seamlessly work with your existing code, tools, and the broader AI ecosystem.
153-
- 🎛️ **Flexible Control**: Continuously [tune](https://controlflow.ai/patterns/instructions) the balance of control and autonomy in your workflows.
154-
- 🕹️ **Multi-Agent Orchestration**: Coordinate multiple AI agents within a single [workflow](https://controlflow.ai/concepts/flows) or task.
155-
- 🔍 **Native Observability**: Monitor and debug your AI workflows with full [Prefect 3.0](https://github.com/PrefectHQ/prefect) support.
156-
157131
## Learn More
158132
159133
To dive deeper into ControlFlow:

0 commit comments

Comments
 (0)