Skip to main content
The Star Pattern (also known as Hub-and-Spoke) is an efficient orchestration approach that centralizes coordination through a single agent while leveraging specialized expertise through satellite agents. This pattern mirrors traditional hub-and-spoke systems where a central node connects to multiple peripheral nodes.

Key Characteristics

Star Pattern The Star Pattern establishes a clear two-level structure:
  • Coordinator Agent (Hub): A central agent that maintains overall context, delegates specific tasks to specialists, and synthesizes their outputs into a coherent final result. The coordinator understands the big picture and how each specialist’s work contributes to the whole.
  • Specialist Agents (Spokes): Domain-specific agents that perform focused tasks within their area of expertise. Each specialist receives targeted instructions from the coordinator, performs its specialized work, and reports results back to the coordinator without needing to communicate with other specialists.
Unlike more complex hierarchical patterns, the Star Pattern creates a flat structure where all specialists directly connect to a single coordinator, eliminating intermediate layers and simplifying communication flows.

Information Flow

Star Flow Pattern The Star Pattern creates a highly efficient, centralized workflow:
  • Outward Flow: The coordinator distributes specific tasks to appropriate specialists based on their expertise.
  • Inward Flow: Specialists complete their tasks and report results directly back to the coordinator.
  • Synthesis: The coordinator integrates all specialist inputs into a cohesive final output.
This pattern creates a streamlined, predictable information flow where all communication passes through the central coordinator. This ensures consistency in the final output while allowing each specialist to focus exclusively on their domain. The coordinator agent is responsible for task decomposition, specialist selection, and final integration, making it a critical component that must have sufficient contextual understanding to effectively manage the process.

Implementation

In our implementation using AG2’s Swarm, we’ve created:
  • A clear star topology with one coordinator agent and multiple specialist agents, each focused on a specific domain of expertise.
  • Direct handoffs designed for efficient task delegation:
    • The coordinator uses OnCondition to route tasks to the appropriate specialist based on the query type
    • Each specialist is configured with AfterWork to always report back directly to the coordinator
    • The coordinator maintains context and synthesizes the final response
  • Shared context variables to track:
    • Which specialist(s) are needed for a given query
    • The status of each specialist’s work
    • The accumulated specialist responses
  • A complete workflow that follows the star model:
    • The coordinator analyzes the initial request
    • The coordinator delegates specific tasks to appropriate specialists
    • Specialists perform their focused work and report back
    • The coordinator synthesizes the final response
This pattern is particularly effective for tasks where a clear division of expertise exists and coordination needs to be centralized. The implementation demonstrates how automated agents can efficiently distribute cognitive labor while maintaining a coherent overview of the entire task. The star structure enables quick routing of questions to the right expert while ensuring all information passes through a central point for consistency and synthesis. This creates a scalable system that can handle diverse domains of knowledge while presenting unified responses.

Agent Flow

Code

In this code example we use OpenAI’s GPT-4o mini with structured outputs.

Output