Everyone understands the task
“Plan my Saturday” needs little domain explanation. Weather, opening hours, travel, budget and preferences make success easy to inspect.
Prototype review · GDG workshop preparation
13 July 2026 · Brisbane
An eval-first Google ADK prototype that turns everyday constraints into a sourced day plan, served through FastAPI.
01 · Premise
The workshop brief covered ADK, FastAPI, tools, async code and deployment patterns. Our preparation project needed to be small enough to understand in one sitting, but rich enough to test research, judgement and hard constraints.
The API is the agent backend
FastAPI accepts a planning request and returns the agent’s typed report. Venue research remains inside the agent’s tool loop.
“Plan my Saturday” needs little domain explanation. Weather, opening hours, travel, budget and preferences make success easy to inspect.
The model must search current public facts, compare options, notice missing inputs, call a validator and explain a workable recommendation.
A plan can be checked for timing, blocked windows, cost and travel. Impossible or underspecified requests have distinct correct outcomes.
The scope kept the learning surface broad without turning the exercise into a product build.
02 · Plan
The PRD centred on three behaviours: produce a grounded feasible plan, prove when the constraints are impossible, and ask for the essentials when the request is too vague.
Release gate
All automated tests pass; every eval scores at least 4/5; no critical failures; traces and grade results are saved.
Brisbane · AUD 100 · 30-minute travel cap · blocked 1–2 pm · rain 11 am–3 pm
Expected: a current, sourced schedule that stays indoors during rain and passes every deterministic check.
Two 60-minute activities · only a 30-minute available window
Expected: run the validator, show the failed constraint and return no_feasible_plan.
No location, date, time window, budget or preferences
Expected: avoid searching and record concise clarification questions before returning needs_clarification.
These constraints kept the prototype focused and made the contract gradeable.
| Part | Decision | Reason |
|---|---|---|
| API | POST /v1/day-plans, /health, /docs | One useful agent endpoint plus basic operational surfaces. |
| Outcomes | complete, needs_clarification, no_feasible_plan | Separate success, missing context and genuine contradiction. |
| Model | gemini-2.5-flash | A fast workshop-friendly model with tool use and grounding. |
| Cloud config | us-central1 | Kept ready for a later Vertex AI deployment while local work used AI Studio. |
| Actions | Read and report only | No bookings or calendar mutations in the MVP. |
| Search | At most 8 successful external calls | Bound latency, cost and agent wandering. |
03 · Build
The agent researches candidates and explains the recommendation. Python owns the facts that must not drift: schedule feasibility, budget, travel totals and whether the final status was earned.
Validates the user’s planning constraints and starts the ADK run.
Searches current public facts, selects candidates and asks for clarification when needed.
Verifies timing, travel, blocked windows and total cost.
Reconciles the trace and serves strict JSON with sources.
Each layer has one job and can fail loudly at its own boundary.
The built-in mixed Google Search tool proved unreliable with other function tools on Gemini 2.5 Flash. A normal search_public_web function now wraps a grounded Gemini call, keeps exact source URLs and applies a 20-second timeout.
The ADK finish tool remains hidden until the agent has either run check_plan or recorded clarification. The service then checks that the status matches the trace.
Safe omissions receive defaults. One narrow repair handles only missing closing JSON containers at end of output. Pydantic then validates the public shape and rejects unsupported claims.
A local runner executes the real ADK agent, passes the response through the same service boundary, saves raw events and records the score. This avoided an Agents CLI path that required Google Cloud ADC even for the local AI Studio setup.
The response reports recommendations and takes no action.
| Field | Purpose | How it is controlled |
|---|---|---|
| status | Declares the outcome. | Cross-checked against clarification and validator tool events. |
| plan | Contains the schedule, totals and rationale. | Must map to a successful validator call for complete. |
| sources | Links current claims to the web research. | Collected from grounded Search responses. |
| questions | Requests missing essentials. | Requires a recorded clarification tool call. |
| constraint_failures | Explains why no plan works. | Requires a failed deterministic validator result. |
04 · Learnings
No model training occurred. We iterated on the prompt, tools, decision gates, response boundary and evals. Each failure exposed a reusable design lesson.
A 5/5 grade did not mean valid JSON
The 12:01 run passed every semantic judge. A later raw-output audit found malformed JSON in the wet-weather response. That changed the eval contract: semantic quality, served-schema validity and trace integrity are separate checks.
Gemini returned MALFORMED_FUNCTION_CALL. Wrapping grounded Search as a normal function tool produced stable interoperability and preserved citations.
An HttpUrl field failed ADK JSON serialisation. JSON response MIME plus function tools was also unsupported. The design moved strictness to the service boundary.
Total cost, nullable values and empty lists were sometimes absent. Defaults now cover harmless omissions; derived totals come from validated schedule items.
The agent could jump straight to a polished answer without searching, validating or recording clarification. The finish guard made those steps part of the contract.
The run returned to AUTO. Tool visibility and post-run trace checks provided stronger guarantees.
The heavier alternative gate hit a 180-second timeout. A valid primary plan can now finish; an alternative is optional and limited by the remaining search budget.
Venue labels, cost or travel could change after validation. The service matches the response back to a unique validator tool call and restores the proven values.
A narrow end-of-file repair closes only missing JSON containers. Broader syntax errors still fail, which avoids turning a repair step into a second model.
The agent asked for a location before noticing that two 60-minute activities could not fit into 30 minutes. Explicit impossibility now takes priority over clarification.
The suite grew to 37 tests across validation, guardrails, response quality, service reconciliation and the FastAPI boundary.
These are the design choices worth reusing, even when the use case changes.
Judge meaning, validate the served contract and inspect the trace. Any one layer on its own can hide a bad run.
Let the model explore and explain. Use deterministic functions for arithmetic, timing, permissions and state transitions.
Set timeouts and budgets, and count successful external calls separately from attempted tool calls.
Saved events made it possible to distinguish model reasoning, tool behaviour and response-boundary bugs.
Checking only the final prose is too late. Constrain which outcomes become available after which evidence.
Secondary alternatives add value. A correct primary answer can return without waiting for them.
05 · Result
The final run passed the three designed behaviours with no critical failures. The API, tests and saved traces are ready for workshop exploration. Deployment remains future work.
All automated checks and minimum eval scores were met on the final recorded run.
Each score is out of five. The release threshold was four with no critical failure.
| Case | Score | Critical | Observed tool path |
|---|---|---|---|
| Wet-weather family plan | 4/5 | No | Date, then Search ×5, then Validator, then Finish |
| Impossible schedule | 5/5 | No | Validator, then Finish |
| Missing essentials | 5/5 | No | Record clarification |
The report links to the current project files and final saved run.
How this report was made
Skills used: mds-to-html for the multi-tab report workflow, design-system for tokens and component recipes, remove-ai-tells for the final prose edit, and browser:control-in-app-browser for interaction and visual QA.