Developers · Example workflow
Fare-quote agent demo
A minimal agent that answers taxi fare questions end-to-end. Type a pickup and dropoff (and an optional natural-language question); the model decides to call the estimate_fare tool, receives the structured result, and writes a plain-English answer.
How it works
- 1. Request. The browser POSTs the form to
/api/agent/fare-quote. - 2. Model call. The server sends the question plus the
estimate_faretool schema to Lovable AI (google/gemini-2.5-flash). - 3. Tool call. The model returns a tool call. The server runs the same
estimatePublicFarefunction that powers the public MCP tool — geocoding + Argyll & Bute tariff engine — and appends the JSON result to the conversation. - 4. Final answer. The model reads the tool result and writes a plain-English answer citing the fare, distance, drive time, and any surcharges.