REQUEST · GATE · INSPECT

Agent map tool: route policy versus traffic ETA

Compare a faster toll road with a slower toll-free route under a jam.

Eight bounded stages · sixty-second inspection0 / 60 seconds
  1. WaitingWaiting for inspection
  2. WaitingWaiting for inspection
  3. WaitingWaiting for inspection
  4. WaitingWaiting for inspection
  5. WaitingWaiting for inspection
  6. WaitingWaiting for inspection
  7. WaitingWaiting for inspection
  8. WaitingWaiting for inspection

What this lab demonstrates

A maps tool is useful when the agent can explain the chosen route rather than presenting a single unexplained number. This fictional route fixture has option A at twelve minutes with a toll and option B at seventeen minutes without one. A traffic-jam switch adds twelve minutes to A. The fastest-route policy compares estimated arrival times, while the toll-free policy excludes A even when it is faster. The stage trace shows the user request, both alternatives, filter, selected route, and returned record. The structured result retains both candidates so the learner can see why the selected route changes.

How to use each control

Policy selects the route, evidence, permission, query, or validation rule for this lab. Fixture chooses the normal or failure-injected input. Play tool flow reveals eight stages over sixty seconds; Pause tool flow freezes the inspection point. Restart returns to the first stage, Timeline seeks to a selected second, and Speed changes viewing pace to half, normal, or double without changing the outcome. Read the stage cards and current-stage detail before opening the structured fictional result at sixty seconds. The JSON panel shows exactly which record, decision, or arithmetic result the selected rule produced. Changing either input restarts the same bounded fixture, enabling a controlled comparison. No external service is contacted.

Try a controlled comparison

Start with Normal traffic and Choose lowest ETA. Route A should win at twelve minutes despite its toll. Switch to Exclude toll routes and compare the selected route and ETA. Inject Traffic jam on route A, return to fastest policy, and check whether B now wins on time alone. Pause at Selection before revealing the JSON result. Ask which other constraints a real route request might require: road closures, vehicle restrictions, accessibility, or departure time.

What this model simplifies

No geocoding, map API, live road network, or ADK Java tool call occurs. The route geometries and travel times are fixed teaching records, and the traffic switch changes only one ETA. A production tool should validate locations, handle provider errors and stale traffic, respect user preferences, and cite the timestamp of route estimates.

Route choice is an explicit constrained selection

This local maps-tool fixture contains exactly two alternatives. Route A takes twelve minutes under normal traffic and charges a toll; route B takes seventeen minutes and has no toll. A traffic jam adds twelve minutes to A only. The tool returns a structured selected-route record with ETA, toll status and alternatives. It performs a real comparison of these records, but does not call a map service, calculate road geometry or execute a Java agent.

Use both controls

Route policy chooses either the lowest estimated arrival time or exclusion of toll routes. The toll-free policy filters A regardless of whether A is currently faster. Traffic chooses normal conditions or the jam on A. Both controls rebuild the eight-stage trace from request through outcome, allowing the chosen record to be compared with the alternatives. No parameter represents distance, traffic probability, fuel consumption or a real location. Treat every minute value as a fictional input rather than an observed travel time.

Reproduce all four combinations

Under normal traffic and lowest ETA, A wins at twelve minutes. Changing only Traffic to jam makes A twenty-four minutes, so B wins at seventeen. With normal traffic and Exclude toll routes, B wins at seventeen even though A is faster. Applying the jam while retaining toll exclusion does not change the selected route or ETA: the disqualified alternative became slower, but it was already ineligible. Inspect the alternatives field to confirm that the traffic control still changed the modeled data.

Identify the policy failure case

If the user requires a toll-free trip but the agent applies lowest ETA in normal traffic, the returned A route violates the user constraint even though its ETA is lower. The simulator does not infer that preference from natural language; you must choose the intended policy explicitly. Both modeled selections are labeled safe because each follows its selected rule, not because either is universally appropriate. The fixed set always contains one toll-free alternative, so no-route failure, stale traffic, service outages and ambiguous destinations require additional fixtures before a real routing integration can be trusted.

Inspect the replay

Play starts the sixty-second inspection and becomes Pause while running. Pause holds the current stage; Restart returns to the beginning without changing the experiment settings. Speed changes viewing pace rather than model outcomes. Timeline seeks directly to a stage and pauses playback. Changing a scenario setting recomputes the deterministic fixture and rewinds it. The final decision appears at the end, so move Timeline to sixty to compare completed runs. Stage cards and the text trace describe the same selected fixture; their elapsed viewing time is not measured agent execution latency.

Views are my own and do not represent any employer, past or present.