AWSAWS Certified Generative AI Developer - Professional2026-102.1 Implement agentic AI solutions and tool integrations
Choose who owns routing and delegation
Completed by the knowledge check
Learning objective
Choose supervisor, routing, and delegation patterns with Strands Agents and AWS Agent Squad.
Core idea
A multi-agent design has two separate decisions: who receives the request and who owns its completion. Routing chooses an appropriate specialist. Supervision keeps a coordinating agent responsible for decomposition and synthesis. Delegation assigns a subtask through a callable interface; it does not automatically transfer ownership of the whole conversation.
Strands Agents can implement a supervisor by exposing specialist agents as tools. AWS Agent Squad provides conversational routing through a classifier and also includes SupervisorAgent for agents-as-tools coordination. These are overlapping implementation choices, not a rule that one framework supports routing and the other supports supervision exclusively.
Choose the pattern from the work. A question contained within one domain usually needs routing. A question requiring several independent domains needs an owner that can combine their results. Adding more agents without specifying that owner creates more outputs, not a completed business result.
How it works
Route a request to a specialist
AWS describes Agent Squad as an AWS Labs framework for multi-agent systems. Its classifier, often a large language model, selects the appropriate agent for a request while the framework maintains conversational context. This is useful when one entry point serves specialists with different capabilities and instructions.
A classifier’s selection is a capability decision. It does not authorize the selected agent to read customer records or execute a refund. Supply the eligible specialist set from trusted application policy, then route within that set. If the request is ambiguous, use an application-defined clarification or fallback outcome rather than treating a classifier guess as a verified intent.
Preserve the context needed to route follow-ups. “What about the annual plan?” may refer to a previous billing question rather than a fresh product inquiry. At the same time, avoid sending the complete history to every possible specialist. Decide which context each recipient needs, and keep authorization and identity binding in the backend. See 2.1.3 for the storage and isolation mechanisms.
Keep a supervisor responsible for composition
In Strands, a specialist can be a separate Agent wrapped by a Python function decorated with @tool. Register that function in the supervisor’s tools list. The supervisor’s model decides when to invoke it, and the specialist’s result returns through the ordinary tool-result path.
The specialist can have its own system_prompt, model configuration, and tool set. The function contract describes what the specialist does and what input it requires. This lets a supervisor delegate a bounded research or calculation task without inheriting all of the specialist’s internal tool descriptions.
Agent Squad’s SupervisorAgent also exposes team agents as invocable tools so that a lead agent can coordinate their work. Choose it when that orchestration fits the surrounding Agent Squad application. Choose Strands agents-as-tools when the primary coordinator already uses a Strands loop and specialists fit its tool interface.
A supervisor remains the place where results are checked for completeness and consistency. If one specialist returns “approved” and another returns “insufficient evidence,” the supervisor needs a product rule for disagreement. A fluent synthesis that removes the disagreement is not evidence that it was resolved.
Make delegation explicit
Define a delegation contract that includes the task, authorized scope, expected result, and failure outcome. These are application contract fields, not universal parameters injected by either framework. A specialist should return evidence or an operation result that the owner can validate, rather than an unexplained completion claim.
Use a return-to-supervisor design when the overall request needs synthesis. Use a conversational handoff design when the receiving specialist should own the next user interaction. In the latter case, your application must explicitly change the active conversation owner and decide what context transfers. Calling a specialist as a tool does not by itself implement that handoff.
Bound the full delegation tree. Limit how many specialists can be invoked, how deep delegation can go, and how long the root request can run. Strands lifecycle hooks registered through hooks can intercept BeforeToolCallEvent; event.cancel_tool can block a proposed specialist-tool call. The execution owner still needs a shared deadline, because canceling one call does not necessarily end the loop. See 2.1.1.
Key distinctions and trade-offs
The following choices divide by ownership rather than framework branding:
| Pattern | Who chooses the recipient? | Who owns the complete result? | Best fit |
|---|---|---|---|
| Routing | Classifier or application routing logic | Selected specialist, under application policy | One-domain questions behind one entry point |
| Supervisor | Coordinating model or explicit coordination logic | Supervisor | Questions that need decomposition and synthesis |
| Delegated subtask | Current owner through a tool contract | Current owner | A focused specialist contribution |
| Conversational handoff | Application handoff policy | Receiving specialist after explicit transfer | Continued dialogue within another domain |
Separate prompts versus security isolation: Distinct Agent objects let you separate instructions and tool sets. They do not create separate IAM principals or isolated execution environments. A process hosting several agents can still share credentials and application data unless you design those boundaries.
Composition versus latency: Supervision can improve coverage when multiple domains are genuinely necessary. It also adds model invocations and requires result reconciliation. Routing avoids that composition cost for requests one specialist can handle.
Fixed topology versus autonomous selection: Strands also supports Graph, Swarm, and Workflow collaboration patterns. A graph can express known dependencies; autonomous collaboration can explore uncertain paths. Neither label establishes durable transaction recovery. Use 2.1.5 when the deciding requirement is workflow control and failure handling.
Architecture / decision scenario
An enterprise assistant answers billing questions, explains product behavior, and prepares renewal recommendations. A billing-only request should reach the billing specialist without invoking a research team. The application uses Agent Squad’s classifier to select among specialists the caller is permitted to use.
A renewal recommendation needs both billing evidence and product-usage analysis. The application routes that request to a coordinating agent. One implementation uses Agent Squad SupervisorAgent; another uses a Strands Agent whose tools include @tool wrappers around the two specialists. In either implementation, the coordinator owns the recommendation and must check both results.
Each delegated request carries backend-bound identity and only the evidence needed for that task. A billing specialist can explain charges but cannot acquire additional permissions merely because the supervisor asks. If usage analysis fails, the supervisor returns a qualified incomplete result instead of inventing the missing evidence.
If the customer then needs an extended billing conversation, the application explicitly transfers conversation ownership to that specialist. It records the transfer and narrows the active context. This separates routing, subtask delegation, and handoff in the same product rather than treating every specialist invocation as interchangeable.
Common exam traps
- Equating classifier-based routing with multi-agent decomposition.
- Assuming only Strands supports supervision or only Agent Squad supports delegation.
- Treating a specialist tool call as an automatic conversational handoff.
- Assuming separate agent objects enforce user or tenant authorization.
- Giving every specialist the complete conversation and the supervisor’s credentials.
- Selecting a swarm when the requirement is fixed dependencies and explicit failure recovery.
- Accepting synthesized prose when one required specialist failed.
What to remember
- Route when one specialist can own the request; supervise when results need composition.
- Strands uses
@toolwrappers around specialist agents for agents-as-tools delegation. - Agent Squad provides classifier-based routing and
SupervisorAgentcoordination. - Make conversation ownership, context transfer, and incomplete outcomes explicit.
- Apply authorization and a shared execution budget across the entire delegation tree.
Knowledge check
An assistant has billing, product, and renewal specialists behind one entry point. A customer asks why the last invoice shows a duplicate charge, a question one billing specialist can answer and own. Which design handles it with the fewest model invocations?
A supervisor builds a renewal recommendation from two specialist tools. The billing specialist returns its evidence, but the usage-analysis specialist fails after its retries. What should the supervisor return?
A supervisor called the billing specialist as a tool to explain a charge. The customer now wants a longer billing conversation, and the billing specialist should answer the following turns directly. What implements that?
Billing and product specialists run as separate Strands Agent objects in one process, each with its own system_prompt and tool list. The product specialist’s usage tool queries a data store with the process’s credentials, which also cover billing tables. The product specialist must never read billing records. Which design enforces that?
Agent objects with their separate tool listssystem_prompt that forbids queries against billing tables