# Hierarchical Swarm Examples

This directory contains examples demonstrating hierarchical swarm patterns for multi-agent systems.

## Examples

- [hierarchical_swarm_autosave_example.py](hierarchical_swarm_autosave_example.py) - **Autosave feature example** - Shows how to automatically save conversation history
- [hierarchical_swarm_basic_demo.py](hierarchical_swarm_basic_demo.py) - Basic hierarchical demo
- [hierarchical_swarm_batch_demo.py](hierarchical_swarm_batch_demo.py) - Batch processing demo
- [hierarchical_swarm_comparison_demo.py](hierarchical_swarm_comparison_demo.py) - Comparison demo
- [hierarchical_swarm_example.py](hierarchical_swarm_example.py) - Main hierarchical example
- [hierarchical_swarm_streaming_demo.py](hierarchical_swarm_streaming_demo.py) - Streaming demo
- [hierarchical_swarm_streaming_example.py](hierarchical_swarm_streaming_example.py) - Streaming example
- [hs_interactive.py](hs_interactive.py) - Interactive hierarchical swarm
- [hs_stock_team.py](hs_stock_team.py) - Stock trading team
- [hybrid_hiearchical_swarm.py](hybrid_hiearchical_swarm.py) - Hybrid approach
- [sector_analysis_hiearchical_swarm.py](sector_analysis_hiearchical_swarm.py) - Sector analysis
- [display_hierarchy_example.py](display_hierarchy_example.py) - Visualize swarm hierarchy structure

## Subdirectories

- [hiearchical_examples/](hiearchical_examples/) - Additional hierarchical examples
- [hiearchical_swarm_ui/](hiearchical_swarm_ui/) - UI components for hierarchical swarms

## Overview

Hierarchical swarms organize agents in a tree-like structure with managers and workers. Managers coordinate teams of specialized agents, enabling complex workflows with clear delegation and responsibility chains. This pattern is ideal for organizational structures and complex task decomposition.

