Skip to content

Multi-Agent Systems

Glossary

96 terms from Multi-Agent Systems, in plain words, each with the chapter that teaches it.

A

A2A (Agent2Agent protocol)
An open protocol that lets one agent work with another agent, possibly built by another company on another framework. The agents exchange messages and tasks without sharing their internals.
Added context
A failure where a handoff invents a detail nobody asked for. For example, triage added a "delivery location" to Marcus's question, and the writer passed it on.
AG2
A multi-agent framework in which agents talk over typed channels. Its older AutoGen-style GroupChat lives on as AG2 Classic.
Agent (class)
A Python class that describes one agent's role: a name, a system prompt and the list of tools it may use. It is only a description, so the same `Agent` can be run on many tasks, each in its own fresh conversation, by a function such as `work()`.
Agent Card
A JSON document that describes an agent to A2A clients: its name, skills, where to reach it and how. It is served at `/.well-known/agent-card.json`.
AGENT_MODE
An environment variable that sets how `ask()` gets replies: `auto` replays a saved reply or calls Claude and saves it, `live` always calls Claude, and `fake` uses a rule-based stand-in model. `AGENT_WAIT=0` makes replays instant.
Agents propose, code acts
A design rule where agents only suggest actions as structured data and plain code carries them out, with limits and approvals. No agent holds a tool that moves money.
anthropic (Python SDK)
The official Python package for calling Claude models through Anthropic's API. It provides a blocking client and a native async client, `AsyncAnthropic`.
Approver / pending case
In the project, the function that decides whether a refund over $20 per order may go ahead. Answering "wait" saves the case in the `pending` folder until Priya decides with `approve`.
ask() / aask()
A single wrapper function through which every model call is made, so calls can be replayed from saved replies, sent to Claude, or answered by a fake model depending on the mode. `aask()` is the awaitable version, which runs `ask()` in a thread so several calls can overlap.
asyncio
Python's built-in module for running coroutines together so that many waiting tasks, such as agents waiting on a model, overlap in time.
asyncio.gather
Runs several coroutines together and returns their results in the same order. With `return_exceptions=True`, a failed job comes back as an exception object instead of sinking the others.
asyncio.run
Starts the event loop and runs one coroutine to the end. It cannot be called from inside an already running loop, such as in Jupyter.
asyncio.Semaphore
A counter of free places that limits how many agents run at once. `async with gate:` waits for a free place and gives it back at the end of the block, which keeps you under the API's rate limits.
asyncio.to_thread
A Python function that runs an ordinary blocking function in a separate thread and lets you `await` its result. It allows blocking code, such as model or tool calls, to run in parallel inside asyncio programs.
asyncio.wait_for
Raises `TimeoutError` if a coroutine takes longer than the given number of seconds. With a thread, the waiting stops but the thread keeps running, so limits are also needed inside the agent.
await
`async def` defines a coroutine function, and `await x` runs `x` and waits for its result while other coroutines run. `await` only works inside `async def`.

B

Baseline
The simplest system a new design must beat. Here it is Priya's single agent, which the team is measured against.
Blackboard
A shared store of notes that agents read and write through tools. At Kettle & Crane it is a table in `shop.db` holding one case file for Bloom Café.
Budget
A limit on dollars and model calls, shared by a whole team or given to one worker. A child budget charges both itself and its parent; `check()` raises `OverBudget` when a limit is used up, and `work()` marks the run "over budget".

C

Cascading errors
A failure where one worker's wrong fact is used by every agent after it. It is why specialists recheck the source before acting.
Checkpointer (LangGraph)
LangGraph's store of the state after each step. It could save a case between nodes, so a case paused for approval survives a restart.
Claude Agent SDK
A framework whose subagents are started through the `Agent` tool, each with a fresh context. It limits depth, concurrency and spend.
Command (LangGraph)
A LangGraph node's return value that both updates the state and names the next node to run. This is how a handoff is written as a graph.
Context isolation
Each agent sees only its own conversation. The stock worker never sees the customer's email, so a worker with a short conversation makes fewer mistakes, but anything left out of its task is lost.
Context variable
A Python value, created with `contextvars.ContextVar`, that follows the code wherever it runs, including into threads started with `asyncio.to_thread`. It can hold the ID of the current span so that child spans link to their parent.
Coroutine
A function defined with `async def` that can pause while it waits so others can run. Calling it only creates a coroutine object; it runs when awaited or passed to `asyncio.run`.
Counter
A class from Python's `collections` module that counts how often each item appears. The vote uses it to tally decisions.
CrewAI
A framework built around crews of role-based agents working through tasks, with Flows for event-driven control.

D

dataclass
A Python decorator that writes `__init__` for a class from its fields, used for `Agent` and `TaskSpec`. `replace()` copies one with a field changed, such as an agent with a different tool list.
Debate
A check where agents argue opposite sides and a judge decides after reading both. It brings the strongest case for each option into view on close calls.
Delegation
When one agent hands a task to another. `delegate()` runs a sub-agent on a task spec with its own child budget and step limit.
Depth limit
A cap on how many agents deep delegation may go. At `MAX_DEPTH` the `as_tool()` function refuses to start another agent, which stops delegation loops.
Done-when rule (stopping rule)
The part of a task spec that says when a worker should stop, including what to do if stuck. The best one lets the worker answer "I can't", such as "needs a person", instead of guessing.

E

Error compounding
The effect that a chain of steps is right only as often as all its steps together. Four agents that are each right 90% of the time give a chain right about 66% of the time.
Evaluator-optimizer
A pattern where one agent produces something and another judges it against criteria, sending it back with reasons until it passes or a round limit is reached.
Event loop
The part of asyncio that switches between coroutines. `asyncio.run` starts it.

F

Fan-out
Running the same agent on many independent cases at once, as when notes are written on all of Priya's emails. Fan-in combines the results, ideally in plain code when a simple rule works.

G

Gate
A check in plain code between pipeline stages that the output must pass before it moves on. It is cheap, fast and always the same.
Google ADK
Google's agent framework, in which agents have sub-agents and can be used as tools.
group()
A function that makes a span with no model calls of its own to hold one case, so every agent started inside its `with` block becomes that span's child in the trace.
Groupthink
Agents agreeing because they saw each other's answers rather than judging for themselves. Votes and reviews help only if the agents are independent.
Guardrail
A limit or check that makes a team fail small and say so, such as a budget, step limit, depth limit, timeout, schema or approval.

H

Handoff
One agent passes a case, and control, to another agent, which then talks to the customer itself. The first agent is finished, unlike a worker called as a tool.
Handoff payload
The structured summary that one agent passes to the next in a handoff, such as customer, order ID, problem and what they want. The receiving agent knows only what the payload contains, so it should keep the customer's own words and be checked against the source before acting on it.
Handoff tool
A `transfer_to_` tool whose input is the handoff payload. Calling it ends the agent's turn and passes the case on to the target agent.
Hierarchical team
A team in which a worker is itself a lead with its own workers. It keeps each level's context small but multiplies calls, latency and places where details get lost.
Human checkpoint
A pause that saves a case's state and resumes with a person's decision. It is used where a mistake is expensive or hard to undo, such as a refund over $20.

I

Idempotent
An action that does no extra harm when repeated. `issue_refund` won't record the same refund twice, so a repeated write is safe.
Infinite delegation
A failure where agents keep passing work to each other, as when the orders and delivery agents ask each other a question neither can answer. A depth limit and a clear owner for each kind of question prevent it.
input_filter
An OpenAI Agents SDK option that trims the conversation history passed to the next agent in a handoff. By default, the full history is passed.

J

jsonschema
A Python library, and a format, for checking that data matches a described shape. The team uses it to check what a worker submits and sends an error back so the model can fix it.

L

Lambda
A one-line, unnamed Python function. In the project, the default approver is a lambda that always answers "wait".
LangGraph
A framework where agents are graph nodes. A node can return a `Command` to hand off, `Send` fans out workers, and a `recursion_limit` caps the steps.
Latency
How long a run takes. Stages that depend on each other run one after another, so parallel workers help only for the truly independent part of a job.
Lead agent
The agent that splits a job into tasks and combines the results. At Kettle & Crane it reads Sam's wholesale email and decides what to look up.
Least privilege
Give each agent only the tools its role needs. The front desk can't issue refunds, so a mistake there can't move money.
Lock
A tool that lets only one thread at a time run a block of code under `with self.lock:`. It stops two agents finishing at once from losing a budget update.
Lost context
A failure where a fact doesn't survive a handoff or delegation, like the missing Decaf price that left the checker unable to decide.
Lost update
A write that silently erases another agent's write, such as the stock line vanishing when the orders agent saved over it.

M

MCP (Model Context Protocol)
A protocol that connects an agent to tools, data and prompts through a server. Here a whole team is put behind one MCP tool, `review_customer_email`.
Message passing
Sharing information by sending a task in and a result out, with code carrying it to the next agent. It is the default in most teams and gives clear contracts, but a missing fact is lost.
Microsoft Agent Framework
A framework offering sequential, concurrent, group chat, handoff and "Magentic" orchestrations. It is the successor to AutoGen, which is in maintenance mode.
Multi-agent system
A program in which two or more agents, each with its own instructions, tools and conversation, work on one job and pass results between them.

O

Offered-tools table
The table of tools one agent was given, by name. A call to any tool not in it is refused with "Unknown tool", which makes each agent's tool list a real permission rather than a suggestion.
OpenAI Agents SDK
A framework that does handoffs as `transfer_to_<agent>` tools, passes full history unless trimmed by an `input_filter`, and offers `agent.as_tool()`.
OpenTelemetry
An open standard for traces, which record what happened during a program's run. Its generative AI conventions define span operations such as `invoke_agent` for running one agent and `invoke_workflow` for running several.
Optimistic concurrency
Not locking anything while agents think, but refusing a write that is based on stale data. The blackboard does this with version numbers.
Orchestrator-workers
A pattern where a lead plans tasks against a schema, workers run them in parallel, and the lead combines the results. The lead decides at run time how many tasks there are.
Outcome grading
Grading a system by what it changed in the database (refunds, tickets), plus unbacked claims and the reply, rather than by how it got there. The same grader is used for the single agent and the team.
Output schema
A JSON schema describing the shape of a worker's result, such as allowed words and maximum lengths. The worker hands it in through a submit tool and code checks it.

P

Parts and artifacts (A2A)
In A2A, messages carry parts (text, files or data), and finished work comes back as artifacts.
Pipeline
Fixed stages with one agent per stage, such as note, then draft, then send. Your code fixes the order, so it is easy to test.
Probe
A small test that tries something the system must refuse, run in plain code with scripted model replies. For example, it checks that a stock agent can't call `issue_refund`.
Protocol Buffers (protobuf)
Google's format for typed messages, which the A2A SDK's types use. `Parse` reads JSON into a typed message and refuses unknown fields.

R

Rate limit
The requests and tokens per minute your API account may use. Going over gives an HTTP 429 error, so fan-outs use a semaphore to stay under it.
recursion_limit
A LangGraph setting that caps graph steps, a built-in guard against handoff loops. Exceeding it raises `GraphRecursionError`.
Reviewer
An agent that checks a draft against the order data and policy before a customer sees it. It must be independent of the writer and see the evidence, and it can still raise false alarms or miss claims it can't check.
Router
An agent or rule that reads an incoming case and picks who handles it. Cheap, certain rules go first and a model handles the rest.

S

Self-consistency
Voting over several independent answers from the same model, taking the most common one.
Sender scoping
Letting a case reach only the orders of the customer who sent it. In the project, Marcus can't get Dana's order looked up, and a made-up ID looks the same as someone else's.
Span
A record of one agent's part in a team run: who ran, for what task, when, and with how many calls and dollars. `work()` adds one to `SPANS` for every agent.
Specialist
A worker with a narrow role, its own prompt and tools. The refunds agent is one, and it alone may issue refunds.
Submit tool
A tool whose input schema is the result you want, so the agent hands in structured data by calling it. Calling it ends the agent's turn, and an invalid result goes back as an error so the model can fix it.

T

Task (A2A)
A2A's unit of work, with a state that can change over time, such as `TASK_STATE_WORKING`, `TASK_STATE_INPUT_REQUIRED` or `TASK_STATE_COMPLETED`. This differs from an MCP tool call, which just returns a result.
Task spec
A delegation written down in full: goal, facts the worker can't look up, an output schema, a done-when rule and a budget. It is all the worker knows.
Thread
A separate line of execution in the same program. While one thread waits for Anthropic's reply, others can send their requests.
Timeout
A limit on how long a call may take, which protects against hung calls. `asyncio.wait_for` raises `TimeoutError` when it passes.
Tool annotations
Hints that tell MCP hosts what a tool does. `read_only_hint=True` says the tool changes nothing, which is true of `review_customer_email` because it only proposes.
Trace tree
Spans arranged by parent, showing which agent started which, when, and what each branch cost. It answers which agent was slow and which spent the money.
Trajectory
The tool calls an agent made, in order, graded from the spans. An example check is that the front desk never calls a refund tool.
Transaction (BEGIN IMMEDIATE)
A SQLite transaction that blocks other writers until it ends, so the version check and the write happen as one step. Without it, another agent could write between the check and the save.

V

Version (blackboard)
A number on each blackboard note that goes up by one on every write. A writer must say which version it read, and the write is refused if someone wrote since.
Voting
Asking several agents the same question independently and taking the most common answer. A split vote is information: unanimous votes can go ahead, and split ones go to a person.

W

Worker
An agent that does one task it was given and reports back, such as looking up one order.
Workers as tools
A way to wire a team where the lead runs its own loop and calls each worker as a tool, as often as it likes. It allows follow-up questions, but the lead's context grows and, by default, workers don't run in parallel.