Skip to main content

What you built (and where to go next)

You started with a single idea — an LLM can think but can't act — and ended with a complete, running agent. Let's step back and see the whole thing, then look at where you can take it.

The journey

Each part of the series added one capability to ShopBot:

The whole picture

Here's everything you built, in one diagram:

You (customer)
│ message

┌───────────────────────────────────────────────┐
│ HARNESS │
│ conversation (memory) · system prompt │
│ validation · permissions · logging │
│ ┌─────────┐ tool request ┌───────────┐ │
│ │ MODEL │ ───────────────►│ run_tool │ │
│ │ (Claude)│ ◄───────────────│ │ │
│ └─────────┘ tool result └─────┬─────┘ │
└─────────────────────────────────────┼──────────┘
│ HTTP

┌────────────────────┐
│ ecommerce-store │
│ FastAPI + SQLite │
└────────────────────┘

Look back at the very first lesson's promise: a harness connects the model to the world and controls what it can do. Every piece above is one of those two words in action — tools connect; validation, permissions, and logging control.

The code

Two small projects, working together:

  • agent-harness/ — the harness itself: shopbot.py (the loop, system prompt, validation, approval, logging, chat) and tools.py (the tools).
  • ecommerce-store/ — the backend: db.py (SQLite) and main.py (the API).

That's a real, end-to-end agent in a few hundred lines — no framework required. You now know what every line does, which means you can read, debug, or rebuild any agent framework you meet, because they're all variations on this same loop.

Where to go next

The harness is complete, but a production system keeps going. Natural next steps:

  • More toolscancel_order, inventory checks, opening a support ticket. The loop doesn't change; you just add to the menu.
  • Streaming — show the model's reply as it's generated, so the chat feels instant instead of appearing all at once.
  • Parallel tool calls — the model can request several tools in one turn; run them concurrently instead of one by one.
  • Retries with backoff — automatically retry a tool that fails for a transient reason before giving up.
  • Trimming / summarising history — keep long conversations within the context window and the budget (the open question from multi-turn).
  • Testing and evals — automated tests for the harness, and evaluations that check the agent makes good decisions across many scenarios.
  • Deployment — put the store and the bot behind real infrastructure, with real authentication instead of a hardcoded customer.

Each of these slots onto the same foundation you just built. The loop stays the same — that's the whole point of understanding the harness.

Thanks for reading

If this helped, the best compliment is to build something with it. Add a tool, break it, watch the logs, fix it. That's how the ideas stick.