The role of the leader and the sub-agents
On this page
A clear hierarchy
Grok’s multi-agent architecture rests on a fundamental distinction between two kinds of agents: the leader and the sub-agents. Until you understand this hierarchy, you write prompts aimed at the wrong part of the system, then wonder why your instructions aren’t followed.
The leader agent
The leader is the main agent, and the only one that interacts with you directly. It performs three functions in sequence. First it coordinates, breaking your request down and handing subtasks to the sub-agents. Then it supervises, tracking each agent’s research and steering the discussion toward the angles that produce results. Finally it synthesizes, compiling the contributions into a structured answer.
One point is worth taking exactly as stated: only the tool calls and the leader’s answer are returned to the user. You never see directly what the sub-agents produce, only the leader’s final result. In practice, if a sub-agent finds a crucial piece of information but the leader decides it falls outside your request, that information will appear nowhere in what you receive.
The sub-agents
The sub-agents are the team’s researchers, and each one has exactly the same toolset as the leader. An agent responsible for product monitoring will pull official announcements with web_search, then gauge reactions on the ground with x_search, which searches X posts. The agent that inherits a numbers-heavy part of the work can open code_execution to recompute a projection rather than estimate it in its head. collections_search queries your collections, and the remote MCP tools you’ve declared are also available to the whole team, not just the leader.
They talk to each other and to the leader to sharpen their research, which lets them explore a topic from several angles at once without two agents redoing the same work.
The sub-agents’ encrypted reasoning
The sub-agents’ internal reasoning stays encrypted. You can’t read their thought process, unlike the visible reasoning that older models such as grok-3-mini exposed. This difference often surprises developers who are used to inspecting reasoning traces to understand an unexpected result: that door is closed here.
Three consequences follow. You see the leader’s final result, never the intermediate steps. Sub-agent state is only accessible by enabling the use_encrypted_content=True parameter. And even with that parameter, the content stays encrypted: it’s there for the model to keep a conversation consistent across turns, not for you to read. This opacity is a deliberate trade-off — it gives the agents freedom to reason without display constraints, at the cost of less transparency for you.
The final answer
When the leader has received enough information from its sub-agents, it produces the final answer. That answer incorporates the research results found by the various agents, the tool calls made by any of them — web search, code execution — and the leader’s own structured synthesis.
Tool calls deserve special attention: they show up in the answer whether the leader or a sub-agent made them. It’s the only glimpse you get into the sub-agents’ work. If you want to check that a search actually hit the right sources, that’s where to look, and nowhere else.
What this means for your prompts
This architecture changes how you phrase a request. Since the leader handles the formatting, be precise about the deliverable you expect: a comparison table, a briefing note, a reasoned list — it needs to know what to build. Also define the scope of the research, because sub-agents need clear boundaries or they scatter; a vague request about “the AI market” will produce four divergent explorations that the leader then struggles to reconcile.
Two habits round this out. Ask explicitly for sources if you want them: the agents know how to cite, but they don’t do it every time. And give up on steering sub-agents from your prompt — writing “have agent 3 check the pricing” has no effect, since your only contact is the leader and the division of work is up to it.
Key takeaways
- The leader coordinates, supervises, and synthesizes — it’s your only contact
- The sub-agents do the research and analysis in parallel
- Only the leader’s answer and the tool calls are returned
- Sub-agent reasoning is encrypted and inaccessible
- Your prompts must target the leader with clear instructions about the deliverable