- Control and Flexibility: You have full control over the multi-agent process, how the input is processed, which agents are used and in what order.
- Built-in Memory: You can store state and cache results in a database at any time, meaning your agents can re-use results from previous steps.
- Defined as a python class: You do not need to learn a new framework, its just python.
- Define your workflow as a class by inheriting from the
Workflow
class - Add one or more agents to the workflow
- Implement your logic in the
run()
method - Cache results in the
session_state
as needed - Run the workflow using the
.run()
method
Example: Blog Post Generator
Let’s create a blog post generator that can search the web, read the top links and write a blog post for us. We’ll cache intermediate results in the database to improve performance.Create the Workflow
Create a fileblog_post_generator.py
blog_post_generator.py
Run the workflow
Install libraries