By Abhijith N M · Reviewed 24 October 2026 · Editorial standards
Waypoint is an LLM copilot for a freight exception desk. When a shipment misses its window — a container held at a rail ramp, a reefer temperature excursion, a connection the carrier abandoned — an exception record lands on the desk. The human agent has minutes to understand the carrier's obligations, tell the customer something true, and decide whether to reroute the load or refund the service. Waypoint does the reading and the drafting. The human keeps the authority to spend money.
That last sentence is the whole course in miniature. Waypoint is not a chatbot that answers questions about logistics. It is a production service with typed inputs, a model call, retrieved policy, tool calls, a human approval gate, telemetry and a release process. By step 37 you will have built and reviewed all of it. Nothing in this path requires a paid API key: a deterministic WaypointModel stands in for the hosted provider, so every structural lesson runs on a laptop and in CI.
You need Python 3.11 or newer — the code uses modern typing and dataclasses, and the current FastAPI releases support it. Pick uv if you have it; pip works identically. In Colab, use the %pip form in a cell. The dependencies are deliberately small: a web framework, a schema library, an HTTP client and a test runner.
# Recommended: uv creates the project environment and pins versions.
uv add fastapi uvicorn pydantic httpx pytest
# The same environment with pip:
python -m venv .venv
source .venv/bin/activate # Windows: .venv/Scripts/activate
pip install "fastapi>=0.115" "uvicorn[standard]" "pydantic>=2" httpx pytest
# Colab: install inside the notebook cell.
# %pip install -q fastapi uvicorn pydantic httpx pytest| Package | What Waypoint uses it for |
|---|---|
fastapi + uvicorn | The single HTTP boundary every caller uses; later it becomes the /v1/assist endpoint. |
pydantic | Request and response schemas, so a malformed exception fails at the edge instead of inside the model call. |
httpx | Provider and carrier-policy calls, plus the ASGI test client used by the acceptance tests. |
pytest | The deterministic evaluation harness and the gateway tests that run in CI. |
| Python 3.11+ | Dataclasses, modern type hints and asyncio timeout helpers used throughout the path. |
The WaypointModel below is a deterministic stand-in for a hosted chat model. It exposes the same seam a real client will expose later — build a message, receive a typed result with text and token usage — but its output is canned. That is not a shortcut around the interesting parts; it is how you make the interesting parts testable. Deterministic output lets you assert on schemas, traces, gates and budgets before a non-deterministic model is anywhere in the picture.
from dataclasses import dataclass
@dataclass(frozen=True)
class WaypointModel:
"""Deterministic stand-in for a hosted chat model.
Same call shape as the real client used from step 5 onward; only the
answer is canned. No key, no network, no billing.
"""
model_id: str = "waypoint-sim-1"
def draft_update(self, exception_id: str) -> dict:
return {
"text": f"Update queued for {exception_id}: carrier notified, ETA under review.",
"usage": {"input_tokens": 38, "output_tokens": 12},
}
model = WaypointModel()
reply = model.draft_update("EXC-4821")
print(model.model_id)
print(reply["text"])
print(reply["usage"]["output_tokens"])Key takeaways
Waypoint is a freight-exception copilot whose chargeable actions always wait for human approval.
Every lesson adds one production concern to the same five-moment flow.
The deterministic WaypointModel is the no-key seam: same call shape as the real client, canned output.
Install FastAPI, Pydantic, HTTPX and pytest on Python 3.11+; nothing else is required.
Written and edited by the nexGenCoders team. Spotted a mistake? Tell us and we will fix it.
Don't lose this lesson
Create a free account to save your progress, keep your streak, and work toward a shareable certificate.