Python course Β· Module 11: RAG and Multi-Agent Systems

Subagents and Agent Hierarchies

14 min read Β·
In this lesson8

The expedition grows: someone scouts the route, someone counts supplies, someone checks permits, someone watches quality. When each of them talks to everyone else, after a week nobody knows who agreed on what. You need an expedition leader who hands out tasks and collects reports.

Subagents are an architectural pattern where the main agent (the orchestrator) delegates tasks to specialized sub-agents. It is like a company's organizational structure - the CEO delegates tasks to managers, who delegate further.

Subagent Architecture

The diagram shows three levels of the hierarchy, from the leader down to the tools:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Agent Hierarchy                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                             β”‚
β”‚                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                        β”‚
β”‚                    β”‚  Orchestrator β”‚                        β”‚
β”‚                    β”‚   (Main AI)   β”‚                        β”‚
β”‚                    β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜                        β”‚
β”‚                            β”‚                                β”‚
β”‚           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”               β”‚
β”‚           β”‚                β”‚                β”‚               β”‚
β”‚           β–Ό                β–Ό                β–Ό               β”‚
β”‚    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”‚
β”‚    β”‚ Research   β”‚   β”‚ Analysis   β”‚   β”‚ Execution  β”‚        β”‚
β”‚    β”‚ Subagent   β”‚   β”‚ Subagent   β”‚   β”‚ Subagent   β”‚        β”‚
β”‚    β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜        β”‚
β”‚          β”‚                β”‚                β”‚                β”‚
β”‚    β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”         β”‚
β”‚    β”‚  Tools    β”‚    β”‚  Tools    β”‚    β”‚  Tools    β”‚         β”‚
β”‚    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
β”‚                                                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

At the top the orchestrator, which coordinates the work and delegates tasks. Below it the specialist subagents, and at the bottom the tools they use. The orchestrator never reaches for tools directly.

Basic Subagent Implementation

First the data types: roles as an Enum, and the task and result as a @dataclass:

from openai import OpenAI
from abc import ABC, abstractmethod
from dataclasses import dataclass
from typing import Optional
from enum import Enum

client = OpenAI()

class SubagentRole(Enum):
    RESEARCHER = "researcher"
    ANALYST = "analyst"
    EXECUTOR = "executor"
    VALIDATOR = "validator"

@dataclass
class SubagentTask:
    """Task for a subagent."""
    description: str
    context: str
    expected_output: str
    priority: int = 1

@dataclass
class SubagentResult:
    """Result of subagent work."""
    success: bool
    output: str
    metadata: dict

SubagentTask carries a description, context and expected output, everything a specialist needs so it does not have to ask the leader for details.

The base Subagent class inherits from ABC and enforces system_prompt with @abstractmethod, just like BaseAgent from the lesson on multi-agent systems:

class Subagent(ABC):
    """Base subagent class."""

    def __init__(self, name: str, role: SubagentRole, model: str = "gpt-4o-mini"):
        self.name = name
        self.role = role
        self.model = model
        self.tools: list[dict] = []
        self.memory: list[str] = []

    @property
    @abstractmethod
    def system_prompt(self) -> str:
        """Subagent's system prompt."""
        pass

    def add_tool(self, tool: dict) -> None:
        """Adds a tool to the subagent."""
        self.tools.append(tool)

Every subagent has its own tool list and memory. add_tool appends a tool definition in the OpenAI format, and memory collects summaries of completed tasks.

The execute method builds a prompt from the three task fields and calls the model:

    async def execute(self, task: SubagentTask) -> SubagentResult:
        """Executes a task."""
        messages = [
            {"role": "system", "content": self.system_prompt},
            {"role": "user", "content": f"""
Task: {task.description}
Context: {task.context}
Expected output: {task.expected_output}
"""}
        ]

        response = client.chat.completions.create(
            model=self.model,
            messages=messages,
            tools=self.tools if self.tools else None
        )

        output = response.choices[0].message.content
        self.memory.append(f"Task: {task.description} -> Result: {output[:100]}...")

        return SubagentResult(
            success=True,
            output=output,
            metadata={"model": self.model, "role": self.role.value}
        )

The method is async, but it uses a synchronous client, so it blocks the event loop. In production use AsyncOpenAI and await. Watch out for tools too: when the model calls a tool instead of answering with text, content is None and output[:100] raises an error.

Specialized Subagents

As before, the specialists differ only in their prompt. The researcher and the analyst:

class ResearchSubagent(Subagent):
    """Research subagent - gathers information."""

    @property
    def system_prompt(self) -> str:
        return """You are a specialized research agent.

Your tasks:
1. Gather information from available sources
2. Verify facts
3. Structure knowledge
4. Identify information gaps

Always:
- Provide information sources
- Flag uncertainties
- Suggest further research directions"""


class AnalysisSubagent(Subagent):
    """Analytical subagent - analyzes data."""

    @property
    def system_prompt(self) -> str:
        return """You are a specialized analytical agent.

Your tasks:
1. Analyze provided data
2. Identify patterns and trends
3. Formulate conclusions
4. Assess risks and opportunities

Always:
- Use numerical data
- Present alternative interpretations
- Highlight key discoveries"""

Each prompt says what the subagent does and what it must always watch out for. The "Always" section works like camp rules for that specialist.

The executor and the validator complete the team:

class ExecutorSubagent(Subagent):
    """Executor subagent - carries out tasks."""

    @property
    def system_prompt(self) -> str:
        return """You are a specialized executor agent.

Your tasks:
1. Carry out planned actions
2. Use tools to complete tasks
3. Report progress
4. Handle errors

Always:
- Execute tasks step by step
- Verify the results of each action
- Report problems immediately"""


class ValidatorSubagent(Subagent):
    """Validator subagent - checks quality."""

    @property
    def system_prompt(self) -> str:
        return """You are a specialized validation agent.

Your tasks:
1. Verify result correctness
2. Check compliance with requirements
3. Identify errors and shortcomings
4. Suggest corrections

Always:
- Be critical but constructive
- Use specific criteria
- Propose solutions to problems"""

The validator reviews the others' results, so a mistake by one specialist has a chance of being caught.

Orchestrator - Managing Subagents

The orchestrator keeps a registry of subagents and a task history:

from typing import Dict, List
import asyncio

class AgentOrchestrator:
    """Main orchestrator managing subagents."""

    def __init__(self, model: str = "gpt-4o-mini"):
        self.model = model
        self.subagents: Dict[str, Subagent] = {}
        self.task_history: List[dict] = []

    def register_subagent(self, subagent: Subagent) -> None:
        """Registers a subagent."""
        self.subagents[subagent.name] = subagent
        print(f"Registered subagent: {subagent.name} ({subagent.role.value})")

    def get_available_subagents(self) -> str:
        """Returns a description of available subagents."""
        return "\n".join([
            f"- {name}: {agent.role.value}"
            for name, agent in self.subagents.items()
        ])

get_available_subagents builds a text list of specialists, which we will show the model in a moment.

The orchestrator's steps always go in this order: plan_execution, choosing a subagent, subagent.execute and synthesize_results. Planning asks the model for a plan in JSON:

    async def plan_execution(self, task: str) -> List[SubagentTask]:
        """Plans task execution through appropriate subagents."""
        planning_prompt = f"""You have a task to execute: {task}

Available subagents:
{self.get_available_subagents()}

Plan the task execution. For each step specify:
1. Which subagent should execute the step
2. Task description for the subagent
3. Expected output
4. Priority (1-5)

Reply in JSON format:
{{"steps": [{{"subagent": "name", "task": "description", "expected_output": "...", "priority": 1}}, ...]}}"""

        response = client.chat.completions.create(
            model=self.model,
            messages=[
                {"role": "system", "content": "You are a task planner. Reply only in JSON."},
                {"role": "user", "content": planning_prompt}
            ],
            response_format={"type": "json_object"}
        )

        import json
        plan = json.loads(response.choices[0].message.content)

        tasks = []
        for step in plan.get("steps", plan):
            tasks.append(SubagentTask(
                description=step["task"],
                context=task,
                expected_output=step["expected_output"],
                priority=step.get("priority", 1)
            ))

        return tasks

The response_format={"type": "json_object"} mode guarantees a valid JSON object, but not an array. That is why the prompt asks for an object with a steps key, and the code reads plan.get("steps", plan).

execute_task ties planning, execution and synthesis together:

    async def execute_task(self, task: str) -> str:
        """Executes a task using subagents."""
        # 1. Planning
        planned_tasks = await self.plan_execution(task)
        print(f"Planned {len(planned_tasks)} steps")

        # 2. Execution
        results = []
        for i, subtask in enumerate(planned_tasks):
            # Find the appropriate subagent
            subagent = self._select_subagent(subtask)

            if subagent:
                print(f"Step {i+1}: {subagent.name} executing: {subtask.description[:50]}...")
                result = await subagent.execute(subtask)
                results.append({
                    "step": i + 1,
                    "subagent": subagent.name,
                    "task": subtask.description,
                    "result": result.output
                })

        # 3. Synthesis
        final_result = await self._synthesize_results(task, results)

        return final_result

The results go into a list of dictionaries, so the synthesis knows which subagent did what.

Choosing a subagent is a simple keyword heuristic:

    def _select_subagent(self, task: SubagentTask) -> Optional[Subagent]:
        """Selects the best subagent for the task."""
        # Simple heuristic - can be extended with ML
        keywords = {
            "researcher": ["research", "find", "search", "information"],
            "analyst": ["analyze", "evaluate", "compare", "conclusions"],
            "executor": ["execute", "do", "create", "implement"],
            "validator": ["check", "verify", "validate", "test"]
        }

        task_lower = task.description.lower()

        for subagent_type, kws in keywords.items():
            if any(kw in task_lower for kw in kws):
                for agent in self.subagents.values():
                    if agent.role.value == subagent_type:
                        return agent

        # Default to the first available
        return list(self.subagents.values())[0] if self.subagents else None

The dictionary keys must equal the role values, which is why the first key is "researcher" and not "research", otherwise the researcher would never be chosen. The subagent field from the plan is ignored here, which is worth improving.

Finally the synthesis merges the results into one answer:

    async def _synthesize_results(self, original_task: str, results: List[dict]) -> str:
        """Synthesizes results from all subagents."""
        results_summary = "\n\n".join([
            f"Step {r['step']} ({r['subagent']}): {r['result']}"
            for r in results
        ])

        synthesis_prompt = f"""Original task: {original_task}

Subagent results:
{results_summary}

Create a coherent, final answer based on the results of all subagents."""

        response = client.chat.completions.create(
            model=self.model,
            messages=[
                {"role": "system", "content": "You are a synthesizer. You combine results into a coherent whole."},
                {"role": "user", "content": synthesis_prompt}
            ]
        )

        return response.choices[0].message.content

This is the third model call in a single task, next to planning and the subagents' work.

Using the Orchestrator

We register four specialists and ask for a Safari plan:

import asyncio

async def main():
    # Create orchestrator
    orchestrator = AgentOrchestrator()

    # Register subagents
    orchestrator.register_subagent(
        ResearchSubagent("safari_researcher", SubagentRole.RESEARCHER)
    )
    orchestrator.register_subagent(
        AnalysisSubagent("data_analyst", SubagentRole.ANALYST)
    )
    orchestrator.register_subagent(
        ExecutorSubagent("task_executor", SubagentRole.EXECUTOR)
    )
    orchestrator.register_subagent(
        ValidatorSubagent("quality_checker", SubagentRole.VALIDATOR)
    )

    # Execute a complex task
    result = await orchestrator.execute_task(
        "Prepare a complete 7-day Safari plan in the Serengeti for 4 people"
    )

    print("\n" + "="*50)
    print("FINAL RESULT:")
    print("="*50)
    print(result)

asyncio.run(main())

asyncio.run starts the main coroutine, and the orchestrator plans, delegates and assembles the result by itself. Which specialist gets a step depends on the words in the descriptions generated by the planner, not in the task itself.

Multi-Level Hierarchy

A large expedition has team leaders. An orchestrator can have other orchestrators under it:

class HierarchicalOrchestrator:
    """Orchestrator with multi-level hierarchy."""

    def __init__(self, name: str, level: int = 0):
        self.name = name
        self.level = level
        self.subagents: Dict[str, Subagent] = {}
        self.sub_orchestrators: Dict[str, "HierarchicalOrchestrator"] = {}

    def add_sub_orchestrator(self, orchestrator: "HierarchicalOrchestrator") -> None:
        """Adds a sub-orchestrator (for deeper hierarchy)."""
        orchestrator.level = self.level + 1
        self.sub_orchestrators[orchestrator.name] = orchestrator

    async def delegate_task(self, task: str) -> str:
        """Delegates task to the appropriate hierarchy level."""
        # Check if task requires a sub-orchestrator
        complexity = self._assess_complexity(task)

        if complexity > 3 and self.sub_orchestrators:
            # Delegate to sub-orchestrator
            sub_orch = self._select_sub_orchestrator(task)
            return await sub_orch.delegate_task(task)
        else:
            # Execute through own subagents
            return await self._execute_locally(task)

delegate_task passes the task down when the complexity score exceeds 3.

Helper methods assess complexity and execute the task locally:

    def _assess_complexity(self, task: str) -> int:
        """Assesses task complexity (1-5)."""
        # Simple heuristic
        complexity_indicators = [
            "complete", "detailed", "multi-step",
            "comprehensive", "elaborate"
        ]
        return sum(1 for ind in complexity_indicators if ind in task.lower()) + 1

    def _select_sub_orchestrator(self, task: str) -> "HierarchicalOrchestrator":
        """Selects sub-orchestrator for the task."""
        # Can be extended with intelligent selection
        return list(self.sub_orchestrators.values())[0]

    async def _execute_locally(self, task: str) -> str:
        """Executes task locally."""
        # Use own subagents
        results = []
        for subagent in self.subagents.values():
            subtask = SubagentTask(
                description=task,
                context=f"Level {self.level}",
                expected_output="Task result"
            )
            result = await subagent.execute(subtask)
            results.append(result.output)

        return "\n".join(results)

Complexity is the number of indicator words plus one, and _select_sub_orchestrator always takes the first team for now.

The example builds two teams under the main orchestrator:

# Hierarchy usage example
async def hierarchical_example():
    # Main orchestrator
    main_orchestrator = HierarchicalOrchestrator("Main Orchestrator")

    # Sub-orchestrator for research
    research_orchestrator = HierarchicalOrchestrator("Research Team")
    research_orchestrator.subagents["researcher"] = ResearchSubagent(
        "researcher", SubagentRole.RESEARCHER
    )

    # Sub-orchestrator for analysis
    analysis_orchestrator = HierarchicalOrchestrator("Analysis Team")
    analysis_orchestrator.subagents["analyst"] = AnalysisSubagent(
        "analyst", SubagentRole.ANALYST
    )

    # Add to hierarchy
    main_orchestrator.add_sub_orchestrator(research_orchestrator)
    main_orchestrator.add_sub_orchestrator(analysis_orchestrator)

    # Execute complex task
    result = await main_orchestrator.delegate_task(
        "Conduct a complete market research on Safari in East Africa"
    )
    print(result)

Spot the trap: the task contains too few indicator words, so it stays with the main orchestrator, which has no subagents of its own and returns empty text. Lower the threshold or give it a subagent.

Communication Between Subagents

Sometimes a specialist needs to ask a colleague. First the message types:

from dataclasses import dataclass, field
from typing import Optional, List
from datetime import datetime
from enum import Enum

class MessageType(Enum):
    TASK = "task"
    RESULT = "result"
    QUERY = "query"
    RESPONSE = "response"
    ERROR = "error"

@dataclass
class AgentMessage:
    """Message between agents."""
    sender: str
    receiver: str
    content: str
    message_type: MessageType
    timestamp: datetime = field(default_factory=datetime.now)
    correlation_id: Optional[str] = None
    metadata: dict = field(default_factory=dict)

correlation_id links a question with its answer, and field(default_factory=...) gives every message its own timestamp.

A Message Bus is the channel through which agents talk without direct dependencies:

class MessageBus:
    """Communication bus for agents."""

    def __init__(self):
        self.messages: List[AgentMessage] = []
        self.subscribers: Dict[str, List[callable]] = {}

    def publish(self, message: AgentMessage) -> None:
        """Publishes a message."""
        self.messages.append(message)

        # Notify subscribers
        if message.receiver in self.subscribers:
            for callback in self.subscribers[message.receiver]:
                callback(message)

    def subscribe(self, agent_name: str, callback: callable) -> None:
        """Subscribes an agent to messages."""
        if agent_name not in self.subscribers:
            self.subscribers[agent_name] = []
        self.subscribers[agent_name].append(callback)

    def get_messages_for(self, agent_name: str) -> List[AgentMessage]:
        """Gets messages for an agent."""
        return [m for m in self.messages if m.receiver == agent_name]

An agent subscribes to its own name, and publish calls the receiver's callbacks. The sender does not need the receiver's object, only its name, and that is exactly what loose coupling means.

A communicating subagent answers queries and sends messages:

class CommunicatingSubagent(Subagent):
    """Subagent with communication capabilities."""

    def __init__(self, name: str, role: SubagentRole, message_bus: MessageBus):
        super().__init__(name, role)
        self.message_bus = message_bus
        self.message_bus.subscribe(name, self._handle_message)
        self.pending_responses: Dict[str, str] = {}

    def _handle_message(self, message: AgentMessage) -> None:
        """Handles incoming messages."""
        if message.message_type == MessageType.QUERY:
            # Reply to query
            response = self._process_query(message.content)
            self.send_message(
                message.sender,
                response,
                MessageType.RESPONSE,
                correlation_id=message.correlation_id
            )
        elif message.message_type == MessageType.RESPONSE:
            # Save response
            if message.correlation_id:
                self.pending_responses[message.correlation_id] = message.content

    def send_message(
        self,
        receiver: str,
        content: str,
        message_type: MessageType,
        correlation_id: Optional[str] = None
    ) -> None:
        """Sends a message to another agent."""
        import uuid
        message = AgentMessage(
            sender=self.name,
            receiver=receiver,
            content=content,
            message_type=message_type,
            correlation_id=correlation_id or str(uuid.uuid4())
        )
        self.message_bus.publish(message)

    def _process_query(self, query: str) -> str:
        """Processes a query from another agent."""
        # Implementation depends on role
        return f"Response to: {query}"

The answer comes back with the same correlation_id, so the asker knows what it answers.

Asking a question and waiting for the answer:

    async def ask_other_agent(self, agent_name: str, question: str) -> str:
        """Asks another agent and waits for a response."""
        import uuid
        correlation_id = str(uuid.uuid4())

        self.send_message(
            agent_name,
            question,
            MessageType.QUERY,
            correlation_id
        )

        # Wait for response (with timeout)
        import asyncio
        for _ in range(10):
            if correlation_id in self.pending_responses:
                return self.pending_responses.pop(correlation_id)
            await asyncio.sleep(0.1)

        return "Timeout - no response"

The bus calls callbacks synchronously, so the answer is usually waiting at the first check, and the limit is one second.

Best Practices for Subagents

The principles of subagent architecture gathered in one place:

"""
Best Practices for subagent architecture:

1. SEPARATION OF CONCERNS
   - Each subagent has one clearly defined responsibility
   - Avoid "god agents" that do everything

2. LOOSE COUPLING
   - Subagents communicate through message bus
   - No direct dependencies between subagents

3. SINGLE SOURCE OF TRUTH
   - The orchestrator is the sole source of truth about task state
   - Subagents report results to the orchestrator

4. GRACEFUL DEGRADATION
   - System works even when one subagent fails
   - Implement fallback strategies

5. OBSERVABILITY
   - Log all interactions between agents
   - Implement metrics and monitoring

6. SCALABILITY
   - Subagents should be stateless
   - Easy to add more instances of the same type

7. TESTING
   - Test subagents in isolation
   - Test orchestrator integration with subagents
"""

Pay attention to the point about statelessness: our subagents have memory, so when scaling, move it to external storage.

The last element is an error-tolerant orchestrator:

class RobustOrchestrator(AgentOrchestrator):
    """Orchestrator with error handling and fallback."""

    async def execute_with_fallback(self, task: str) -> str:
        """Executes task with error handling."""
        try:
            return await self.execute_task(task)
        except Exception as e:
            print(f"Main execution error: {e}")

            # Fallback - simpler approach
            return await self._simple_execution(task)

    async def _simple_execution(self, task: str) -> str:
        """Simple execution as fallback."""
        response = client.chat.completions.create(
            model=self.model,
            messages=[
                {"role": "system", "content": "You are a helpful assistant."},
                {"role": "user", "content": task}
            ]
        )
        return response.choices[0].message.content

When the full pipeline fails, the fallback asks the model directly. I recommend designing the hierarchy flat from the start and adding more levels only when there is a real need.

Subagents and agent hierarchies are powerful architectural patterns that let you build complex, scalable AI systems. Congratulations - you have learned advanced AI techniques! In the final module you will create a comprehensive project combining all the skills you have gained!

Remember: a good orchestrator is an expedition leader who hands out tasks, collects reports and does not carry every backpack alone.

Docs entries used in this lesson

Spotted a mistake in this lesson?

Check yourself

Answer the questions from this lesson. Pick an answer to see right away whether it is correct.

  1. 1. What are subagents in AI architecture?

  2. 2. What is the role of an orchestrator in a subagent system?

These are 2 of 3 questions for this lesson. Solve the rest in the game.

Hands-on tasks in the game

  • Vertical ordering

    Arrange the typical agent hierarchy from top to bottom:

  • Code editor

    Implement a Subagent class with ABC and @abstractmethod.

  • Vertical ordering

    Arrange the steps of task execution by the orchestrator:

  • Code editor

    Implement an AgentOrchestrator with register_subagent and execute_task methods.

  • Code editor

    Build a Safari AI graph with agent, tool, and approval nodes.

  • Code editor

    Create a HierarchicalOrchestrator with sub_orchestrators and subagents.

  1. QuestionSubagents
  2. QuestionOrchestrator
  3. Put in orderAgent Hierarchy
  4. Coding taskSubagent Class
  5. QuestionMessage Bus
  6. Put in orderOrchestrator Execute
  7. Coding taskAgentOrchestrator
  8. Coding taskProject: LangGraph Workflow
  9. Coding taskProject: Hierarchical Agent System
  10. VideoRAG and Multi-Agent - Theory Summary
  11. Project to submitSubmit Project to Mentor
  12. VideoModule Summary

Useful articles