Repository navigation
AgentCore Lab B · VoltDesk: code interpreter, multi-agent, and identity #18
akash-coded
started this conversation in
Hands-on Labs
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Mid-Session Exercise B — “VoltDesk”
Follows: notebooks 04–05 (Tools & Identity · Multi-agent orchestration)
Format: Part 1 thinking only (no code), Part 2 build
Time box: ~60 min total · Part 1 ~20 min · Part 2 ~40 min
Assumes you can already: give an agent the Code Interpreter tool, reason about Gateway/Identity, and build at least one multi-agent pattern (agents-as-tools / graph / swarm).
Region / models: us-east-1 · Haiku 4.5 for specialists · Sonnet 4.5 if you use an orchestrator.
Scenario
Company: VoltDesk, the support arm of a regional electricity utility.
Your role: AI solutions engineer.
The pain: customer messages arrive mixed and urgent — “is the power out in my area?”, “my bill doubled, why?”, “what’s this new tariff?”. One generalist bot does all three badly: it fabricates outage info, gets bill math wrong, and waffles on tariff rules. Leadership wants specialists behind one assistant, and the billing answers must be numerically exact.
Thin brief. Expand it.
The problem to expand
“Route utility questions to the right specialist, and never get the bill math wrong.”
Part 1 — Design & brainstorm (no code, ~20 min)
Produce these deliverables.
Identify the specialists. Name them, give each a one-line brief and its tools. At minimum you’ll have an outage specialist, a billing specialist, and a tariff/policy specialist. State what each is forbidden from answering.
Pick the orchestration pattern — and defend it. Choose one: agents-as-tools, sequential graph, conditional/parallel graph, or swarm. Write three sentences justifying the choice against the alternatives. Use these lenses: Is the routing predictable? Do any branches run in parallel? Is the sequence known up front? How hard is it to debug? (This mirrors the pattern-chooser from notebook 05.)
Where computation must be exact. Billing cannot be vibes. Identify every place a number is produced and decide which must run in the Code Interpreter rather than the model’s head. Write the proration formula you’ll have it compute, for example a mid-cycle tariff change:
(Define your own variables; the point is to commit to an exact formula, not approximate it.)
Outage data — make it real (or honestly mock it). Decide the outage specialist’s source. Two honest options:
Note which you chose and why.
Identity plan (design only). Suppose the billing specialist must call the real billing system, which needs an API key. Describe how you’d handle that without hardcoding the secret: which credential-provider type, and which decorator injects it at runtime (
@requires_api_keyvs@requires_access_token). One paragraph.Routing contract. What does a request look like, and how does the system decide the path? If you chose a graph with a classifier, write the classifier’s one-line instruction.
Architecture sketch.
flowchart TB U[Customer message] --> O[Router / orchestrator] O --> OUT[Outage specialist] O --> BILL[Billing specialist + Code Interpreter] O --> TAR[Tariff/policy specialist] BILL -->|exact math| CI[Code Interpreter sandbox]Skeptic prompts — answer at least two:
Part 1 is “done” when: your pattern choice is defended in writing and every number in the system has an owner (model vs Code Interpreter).
Part 2 — Build (code / agent actions, ~40 min)
Base — everyone
Build the billing specialist as a Strands agent with the Code Interpreter tool, and prove the math.
Stretch
Add the other two specialists and wire your chosen orchestration pattern (agents-as-tools or a
GraphBuildergraph).execution_orderfor a graph, or the orchestrator’s tool calls).Advanced
Make one branch real or parallel:
Run it (essentials — full steps in NB0/NB2/NB4):
Python (agentcore)kernel; for the Browser/real-API path,pip installwhat the API client needs.pip installdeps → creds via secrets → run.@requires_api_key; never in the notebook.You may not: answer billing with the model alone. If a number isn’t computed in the Code Interpreter, the Base task is not met.
LLM-integrated task (pass/fail — required)
Ask your generalist (or a single specialist) a billing question without the Code Interpreter, and capture the answer. Then ask the Code-Interpreter version the same question.
Pass = you demonstrate the difference concretely, not just assert it.
Reflection & viva-readiness
Self-check rubric (100 pts — formative)
All reactions