Practical overview
When it fits
Use Flock when a task benefits from multiple agents exchanging structured artifacts, especially when parts can run in parallel and later steps depend on specific outputs.
Who it is for
- Python developers building workflows that divide work among multiple AI agents.
- Teams that want agent handoffs expressed as typed data contracts.
- Developers who need to inspect workflow activity or route tasks using structured decisions.
Documented uses
- Define typed inputs and outputs for agents using Pydantic models.
- Run independent agent analyses in parallel and wait for required results before a downstream step.
- Route tasks based on typed decisions and thresholds.
- Inspect activity in a live dashboard and trace runs with OpenTelemetry.
Requirements & limits
Flock is an MIT-licensed Python framework distributed as the `flock-core` package. The quick-start example requires Python 3.12 or later and specifies an OpenAI API key and model setting.
- Workflow logic is expressed through artifact subscriptions rather than a manually wired graph.
- Pydantic models provide the documented typed contracts and output validation.
- The README quick start uses OpenAI; decision-model support is described separately and names Microsoft-Decision-1, OpenAI Decisions, TypeSafe Jev and a local Clef model.
- A dashboard and OpenTelemetry tracing are identified as built-in capabilities.
- The repository is public, MIT-licensed and not marked archived.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Build and run a typed, parallel agent review workflow
Publish a code submission, run two analysis agents in parallel, and have a reviewer consume both results.
Before you start
- Python 3.12 or later
- Install the
flock-corepackage withpip install flock-core(oruv add flock-core). - Set
OPENAI_API_KEYandDEFAULT_MODELto the values shown in the Quick start; the workflow initializesFlockwithopenai/gpt-4.1. - Use Pydantic models for the typed artifacts.
Steps
Define typed Pydantic artifacts for the code submission, bug analysis, security analysis, and final review; the README example decorates each model with
@flock_type.Create
Flock("openai/gpt-4.1")and declarebug_detectorandsecurity_auditoras consumingCodeSubmissionand publishing their respective analysis artifacts.Declare
revieweras consuming bothBugAnalysisandSecurityAnalysisand publishingFinalReview; this subscription acts as an AND gate.Publish a
CodeSubmission, callawait flock.run_until_idle(), then retrieveFinalReviewartifacts from the store and print the verdict and action items.
Expected outcome
The two analysis agents run in parallel, and the reviewer runs after both analyses are available; typed outputs are validated by Pydantic.
Guide limitations
- The example requires the configured OpenAI model and API key; no provider setup beyond the environment variables is described.
- The documented workflow runs until idle and retrieves results from the store; it does not document deployment.
Serve the review workflow with the dashboard
Use the documented dashboard-serving option to view agent activity and publish artifacts from a browser.
Before you start
- A Flock workflow configured as in the Quick start, including the package and model environment settings.
Steps
Define the typed artifacts and agent subscriptions for the review workflow as shown in the Quick start.
In the asynchronous
main()function, replace the publish-and-run body withawait flock.serve(dashboard=True).Run the application using the Python entry point that calls
asyncio.run(main()).
Expected outcome
Flock serves the workflow with the dashboard, where the README says agents can be watched and artifacts published from the browser.
Guide limitations
- The README does not provide additional dashboard configuration, access controls, or deployment instructions.
Compare options for Agent orchestration
These projects document a common task and share a project role. This is a source-based comparison, not an execution benchmark or a guarantee of interchangeability.
| Project | Documented purpose | Platform | Access and requirements |
|---|---|---|---|
| Flock — whiteducksoftware | Define typed inputs and outputs for agents using Pydantic models. | CLI, Self-hosted, Server | Flock is an MIT-licensed Python framework distributed as the `flock-core` package. The quick-start example requires Python 3.12 or later and specifies an OpenAI API key and model setting. |
| Massgen | Run multiple AI agents against the same user task. | CLI | The repository documents installation through pip or uv and requires Python 3.11 or later. Setup can configure API keys for OpenAI, Anthropic, Google and xAI; credentials are needed for the selected model backends. |
| Langchain Multi Agents Boilerplate | Route incoming football questions to model and agent workflows according to task complexity. | Web | The repository is public and specifies an MIT license. Running the application requires OpenAI and Groq API keys and a Redis server. |
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 12 October 2026
- Original website title
- whiteducksoftware/flock · Official homepage title · retained in its source language

