Most people think of an agent as a black box: request in, answer out.
The reality is more structured. Every agentic system runs through four nested layers — and once you see them, you can't unsee them.
The Four Layers
| Layer | Also called | What it is |
|---|---|---|
| Session | Trace, Thread, Workflow | One full user request — start to final output |
| Invocation | Run, Job | One agent being called — runs until it returns |
| Step | Span, Iteration | One ReAct cycle: reason → act → observe |
| Action | Call | One atomic operation: a tool call or LLM call |
Each layer only knows about the layer directly below it.
The Session spawns Invocations. An Invocation runs through Steps. A Step fires off Actions.
Clean nesting, all the way down.
What It Looks Like in Practice
Take a real scenario: "Write a competitive analysis report."
The Session starts. It immediately fans out — two Invocations running in parallel. One gathers competitor data. The other pulls market trends.
The Research Agent (competitor data) runs four Steps:
- Search broadly for competitors
- Fetch pricing from an API — gets 7 of 10
- Scrape the 3 missing prices from their websites
- Format everything into a schema
Each Step has the same internal rhythm: reason → act → observe. The agent decides what to do, does it, then reacts to what came back. That loop is the Step.
When both parallel Invocations finish, the orchestrator collects the results and hands them to a Writer Agent.
The Writer drafts the full report. A Reviewer scores it: 58/100 — below threshold. The orchestrator loops back. The Writer revises. The Session only ends when the quality bar is met.
Five Invocations total. Some in parallel, some in sequence, one triggered by a failure condition. That's the Session layer doing its job.
Below is the same flow as a nested tree — Session down to each Action detail.
Who Decides What
| Layer | Decides | Does not know about |
|---|---|---|
| Session | Which invocations to spawn, when to loop, when to stop | Internal steps inside each invocation |
| Invocation | How many steps to run, when the task is done | Other invocations running in parallel |
| Step | Which action to take, how to interpret the result | The broader goal of the session |
| Action | Nothing — just executes | Everything above it |
This separation is load-bearing.
An Invocation doesn't need to know it's running in parallel with another. A Step doesn't need to know there's a quality gate at the end. Each layer makes exactly the decisions scoped to it — no more, no less.
The Two Loops That Matter
Steps run sequentially — each one informs the next. This is the ReAct loop: reason, act, observe, repeat until the sub-task is done.
Sessions orchestrate across invocations — parallel or sequential, with branches and conditions. Spawn, collect, evaluate, loop back — repeat until the goal is met.
Two different loops. Two different jobs.
The loop that makes an agent feel intelligent happens at the Step level.
The loop that makes a system feel autonomous happens at the Session level.
This model is part of Agent Talk v2 — the infrastructure layer for multi-agent communication in production.