How whiteducksoftware/flock works
Principal components
• Flock Core Engine: At the center is the engine responsible for managing agents, their definitions, and the orchestration of workflows.
• Agent System: This encapsulates the “FlockAgent” entities along with their declarative input/output definition. Indicate that these agents can be dynamically chained (via the “hand_off” mechanism).
• Tools Integration: Represent the tools (e.g., web search, code evaluation, etc.) as a separate module that can be attached to agents. This module is plugged into the agent system (as seen in the agents’ 'tools' attribute).
• Logging & Telemetry: Include components for logging (with formatters, tracing, telemetry exporters like file and SQLite exporters) and monitoring integrations (such as Jaeger).
• CLI & Configuration: Represent the command-line interface layer (under src/flock/cli), configuration files (like .env_template and config.py), and external settings that allow users to launch agents and run examples.
• External Integrations: Illustrate integrations with external services (e.g., Temporal, DSPy, Litellm for LLM interaction, and even integrations such as Tavily for search services).
Establish relationships and data flows
• The CLI and configuration modules feed into the Flock Core Engine.
• The agents then communicate with one another either directly (through declared hand-offs) or via the workflow manager.
• The Workflow/Execution System (Temporal integrated) orchestrates the agent executions and ensures fault tolerance.
Architectural design notes
• That the system is highly modular – each subsystem (core, agents, evaluators, modules, routers, context, tools, logging) is loosely coupled and independently testable.
• Declarative programming paradigm: Agent definitions are lean (using clear type contracts via Pydantic) and self-contained.
• Use of Temporal for durable workflows, which is central for production-grade fault tolerance and error recovery.
• The tool integration is designed to be extendable with plugins (illustrate this by separate “tool” nodes that plug into the agent framework).