How to Structure Prompts for a Hierarchy of AI Agents
Watch on TikTok
Prompting a single AI is straightforward. Prompting a hierarchy of AI agents that delegate tasks to each other requires a consistent structure at every level. This video walks through a real example: a chief agent that delegates to a head of admin, which delegates to a personal assistant agent, which calls tool-level agents to execute tasks.
The Org Chart Approach
The system mirrors a company org chart. At the top sits a Chief Agent. Below it are department heads: Head of Admin, Head of Events, Head of Content. Each department head manages sub-agents that handle specific tasks. The plan is to add more departments over time.

One Prompt Template, Every Level
Every agent in the hierarchy uses the same prompt structure, regardless of its position:
- Role: What this agent is and what it is responsible for.
- Context: Background information the agent needs to do its job.
- Objective: What the agent is trying to accomplish.
- SOP: Standard operating procedure for how it should think step by step.
- Tools and Sub-agents: What resources this agent has access to, including other agents it can delegate to.
The Chief Agent's prompt lists its role, context, objective, SOP, and the department-head agents it can call. The Head of Admin's prompt follows the same format but lists its own sub-agents (like the Personal Assistant). The Personal Assistant's prompt lists the tool-level agents it controls (like the Calendar Agent). And the Calendar Agent's prompt lists individual tools for setting meetings and booking events.

Why This Structure Scales
The power of this approach is composability. You can ask a big task that requires multiple departments and multiple agents, and the system breaks it down and completes it across the hierarchy automatically. The Chief Agent figures out which department heads to involve, those heads figure out which sub-agents to call, and the sub-agents execute using their tools.
For example, a calendar agent fills out all the fields for a meeting event based on the original request. The personal assistant orchestrates when and how that happens. The head of admin decides whether the task requires the personal assistant, an events agent, or something else entirely.

The Prompt Details
Each agent's prompt also defines how it communicates results back up the chain. The lowest-level agents respond to their parent agents, which summarize and pass results upward. Eventually, the Chief Agent sends a summary to the human.
The calendar agent, for instance, has a prompt that includes its role (expert calendar manager), its objective (manage calendar events for a specific person), its SOP (get today's date, find emails, check contacts, create events), and its tools (Find Emails, Create Google Calendar Event, Get Events from Google Calendar, etc.).

Key Takeaways
- Use the same five-part prompt structure (Role, Context, Objective, SOP, Tools/Sub-agents) at every level of the hierarchy.
- Each agent only needs to know about its direct reports and its own tools, not the full system.
- This pattern scales by adding new department heads and sub-agents without rewriting existing prompts.
Published May 25, 2026. Writeup generated from a favorited TikTok.