Home / Case studies / 03 of 03

Agents · In production

A multi-agent planning and knowledge assistant

Built for an Indigenous pastoral business programme in northern Australia. It answers questions about each cattle station from cited sources, and on every planning turn three agents work together to help the station team write a ten-year business plan.

My role
Architect and sole engineer
Built at
Think Digital, with the company's CEO as product owner
Client type
An Indigenous pastoral business programme and its station partners
Status
In production

The problem

Station teams in the programme need a business plan and a case study they can stand behind, and plain answers about their own country, history and operations. A ten-year plan is slow to write, and a chatbot that guesses is worse than none.

Two rules shaped everything. The first was trust: answer only from sourced material, never invent cultural, sacred, historical or property detail, and send cultural questions to the right person at the station. The second was structure: the plan follows a fixed eight-section template, with set points in each section, in the order the product owner asked for.

Who it serves

  • Station teams, who ask questions and build their plan by text or voice
  • Domain experts, an agricultural adviser and station people, whose recorded talks are the source material

What I built

I architected and built the whole assistant as its only engineer, and all 365 of its commits are mine. I shaped it with the product owner and the domain experts, and I designed the agent harness at its centre.

  • The agent harness: on every planning turn it runs a speaking agent, a note-taking agent and a checking agent, and a coverage check decides what to ask next
  • The knowledge chat: grounded answers from curated, cited source files, routed to each station's own avatar on Atlas AI, with a local fallback
  • The plan store on DynamoDB, with an audit row on every change, a printed plan and a case study builder
  • Voice: Amazon Transcribe in Australian English, ElevenLabs out, and Amazon Polly as the fallback voice
  • Sign-in by passcode or a 15-minute magic link, with HMAC-signed sessions
  • The deployment: a Next.js app on ECS Fargate (ARM64), behind a load balancer and CloudFront
  • The evaluation suites, from unit tests to live-model soaks
Planning assistant architecture After sign-in, a knowledge question goes to each station's avatar on Atlas AI, with a local cited fallback, and gets up to three source credits. A planning message runs three agents: a speaker, a note-taker that must call a save tool, and a checker. Code guards clean each note before the plan store saves it with an audit row, and a gap check picks the next question. Sign in Passcode or 15-minute link, signed session 01 KNOWLEDGE CHAT Question about the station A short follow-up joins the earlier question 02 Atlas AI avatar One for each station Gate and guardrails 03 Local fallback Cited source files with prompt caching 04 Source credits Up to 3, by rare words the answer shares None on a "do not know" answer 05 PLANNING TURN: THE AGENT HARNESS Planning message Text or voice: Transcribe in, ElevenLabs out 06 Speaker Short reply, streamed 07 Note-taker Must call save_text Checker Flags what is still missing Code guards Keep numbers, drop noise, mark points to confirm 08 Plan store on DynamoDB Eight sections, an audit row on each save Gap check Must call open_points on fixed point IDs Picks the next question or the case study 09
Fig. 03 · The knowledge chat and the planning harness. Lime marks the agent harness, amber the fallback path.

Architecture

Two chats, one set of sources

The knowledge chat answers questions. The planning chat runs the agent harness. Both work from the same curated source files, and both cite them.

  1. Sign in. A passcode or a 15-minute magic link starts a session. Middleware checks an HMAC-signed session cookie on every API call.
  2. Question. A short follow-up joins the earlier question, so it keeps its subject.
  3. Station avatar. The app maps the station to its own avatar on Atlas AI and sends the turn over a WebSocket. Atlas AI runs its Gate, guardrails, knowledge bases and answer model. The app allows 10 seconds to connect and 20 seconds for each turn, with one retry when the Gate is busy.
  4. Local fallback. If Atlas AI fails before its first word, Claude Sonnet 4.6 answers from the local source files, passed as cited document blocks with prompt caching.
  5. Source credits. The app ranks up to three source credits by the rare words that the answer and each file share. A "do not know" answer gets no credit, so a non-answer never looks sourced.
  6. Planning message. The station team types or speaks. Speech goes through Amazon Transcribe in Australian English.
  7. Three agents. A speaking agent streams a short reply. A note-taking agent must call save_text with a field from a fixed list and a status, filled or to confirm. A checking agent flags what is still missing.
  8. Code guards and save. Code keeps numbers, drops noise, marks points to confirm, and drops any number that is not in the plan. The plan store saves the note to DynamoDB with an audit row.
  9. Gap check. A coverage check must call open_points with IDs from a fixed list. It decides the next question, and when the plan is ready for a case study.

Key decisions and trade-offs

  • Forced tool calls on fixed listsThe note-taker cannot answer in prose. It must call save_text with a field from a fixed enum and a status, and the gap check must call open_points with point IDs from another enum. A model cannot invent a section that does not exist, and code can check every note before it is saved. The cost is flexibility, which a fixed plan template does not need.
  • Three agents with one job eachOne prompt that tries to speak, take notes and check coverage at once has to trade each job against the others. Split apart, the speaker stays short and quick, while the note-taker and checker run on a stronger model, Claude Sonnet 5, where accuracy matters more than speed.
  • Pick each model by measurementI benchmarked models for each role. The speaker runs on Claude Sonnet 4.6, with a first word in 0.68 s. Claude Haiku 4.5 answered in 0.85 s but missed most answers, so it runs no role at all.
  • No vector store, on purposeThe source set is small and curated, so every station and programme file goes to the model as a cited document block, with prompt caching on the system text and the last document. Retrieval cannot miss a file, and every answer can cite its source. A much larger corpus would need retrieval, and the station avatars on Atlas AI already have it.
  • Curated sources, marked for trustPeople clean each talk transcript into markdown with front matter for source, speaker, status, visibility and topic. A file marked as a placeholder never counts as the station's own words.
  • Code checks the modelGuards in code keep numbers, drop noise and mark points to confirm, and a fact check drops any number that does not appear in the plan.
  • Fail to a cited answer, not to an errorIf Atlas AI fails before its first word, the local fallback answers from the same cited files. One setting switches the model provider between the Anthropic API and Amazon Bedrock, with written rollback steps.

Evaluation and quality

An agent harness is only as good as its evaluation, so evaluation was part of delivery, with the pass rules written in code.

  • 642 unit tests in 90 files, and 60 browser tests in 25 Playwright specs
  • 18 live-model test files that call the real models, including replays of the product owner's real chats for confirmations and gaps
  • A nine-persona soak. Claude Sonnet 5 plays each of nine personas for 12 turns, then judges each transcript against 12 rules. The pass rule lives in code: total breaks must not exceed the number of personas
  • A knowledge bar: the station knowledge suite must pass 19 of 20
  • A turn log with one JSON line for each step of each turn, so a bad answer traces back to the agent that caused it
  • A model benchmark for each role, so each agent's model is chosen on latency and accuracy together

Safety, privacy and failure handling

  • Grounding outranks warmth. The speaking agent answers only from the source documents, and never invents cultural, sacred, historical or property detail
  • Cultural questions go to people, not the model: the assistant refers them to the right person at the station
  • Crisis cards are spoken once, through the platform's safety path
  • Bounded waits: 10 seconds to connect to Atlas AI, 20 seconds for each turn, one retry when the Gate is busy, then a cited local fallback
  • Saves that survive a slow store: each save tries twice, and the speaker waits up to five seconds for a slow save
  • An audit row on every plan change, and signed sessions with short-lived magic links
  • A local preview never writes to the live table
  • A closed edge: the load balancer accepts traffic only through CloudFront

Results

365
commits, all of them mine
702
automated tests: 642 unit tests and 60 browser tests
18
live-model test files, plus a nine-persona soak
3
agents on every planning turn, with forced tool calls
8
plan sections, read by a coverage check that decides the next question
0.68 s
to the speaking agent's first word, in the role benchmark

Stack

  • Claude Sonnet 4.6
  • Claude Sonnet 5
  • Amazon Bedrock Converse
  • Anthropic API
  • Tool use
  • Citations
  • Prompt caching
  • Next.js
  • TypeScript
  • DynamoDB
  • ECS Fargate
  • CloudFront
  • Amazon Transcribe
  • ElevenLabs
  • Amazon Polly
  • Playwright
  • Atlas AI

More case studies