Goal
Design a minimal system that uses an LLM-based AI Agent to collect missing details from a user (User Info, Vehicle Info, ZIP) and then return a price quote once the required data is complete.
You are not expected to build a full pricing engine. Use a simple deterministic pricing stub.
Part 1 — Agent Prompt The agent must:
* Accept partial input in any order.
* Ask only for missing required fields.
* Validate basic formats (ZIP = 5 digits; year reasonable; mileage numeric).
* Produce strict JSON output every turn (no extra text).
Required fields to collect:
* userInfo: fullName (required), contact (required)
* vehicleInfo: year, make, model, trim (optional), mileage (required), condition (required: one of excellent|good|fair|poor)
* zipCode (required)
When all required fields are present and valid, return status="READY_FOR_PRICING" with the normalized payload. When you have all the details you can generate a random price
Otherwise return status="NEED_MORE_INFO" and include nextQuestion.
Part 2 — REST API Design + Pseudo Code
Design a RESTful service that:
1. Receives user messages / partial input.
2. Calls the agent with session context.
3. Either returns the agent’s next question OR returns a final price quote.