Chapter 12: Ship It β Your First Real Agent
Why This Matters
This is the last chapter, and it's different from the rest. There's no new concept here β you've learned them all. Instead, we're going to bring everything together into one complete agent, deployed and running, and then talk about what comes next. By the end, you'll have a blueprint for shipping a real agent, and a map for where to go from here.
The Agent You've Built
Let's take stock. Across twelve chapters, you've built:
That's a complete agent system. Not a toy β a real, production-ready architecture. The loop is the heart. The brain, tools, and memory are the body. Planning and RAG are the intelligence. LangChain is the wiring. Multi-agent is the scale. Guardrails are the brakes. Evals are the instrument panel. You built every piece.
The Deployment Checklist
Here's what "shipping" looks like, concretely. This is the checklist TomΓ‘s worked through before the agent went live in Rosa's shop:
A Minimal Web Deployment
Here's the simplest way to put your agent behind a web endpoint, using Flask. This is the bridge from "runs on my laptop" to "runs on the internet":
A simple HTML chat interface sends messages to /chat and
displays the response. You don't need anything fancy β a text input, a
send button, a div for the conversation. The agent does the work; the
web layer is just plumbing.
run_agent and returns the result.
What Comes Next
You've built a real agent. But the field doesn't stand still, and neither should you. Here's a map of where to go from here:
Go deeper on what you've learned
- LangGraph β for complex, stateful multi-agent workflows. If your agent needs to branch, loop, or maintain complex state across many steps, LangGraph models it as a graph. It's the natural next step after Chapter 9.
- Structured outputs β forcing the LLM to return valid JSON or a specific schema. This makes tool calls more reliable and output parsing trivial. Most providers now support this natively.
- Fine-tuning β when prompting isn't enough, you can fine-tune a model on your specific data. It's not always needed (RAG often suffices), but for specialised domains or consistent style, it's a powerful tool.
Explore the wider ecosystem
- CrewAI and AutoGen β alternative multi-agent frameworks with different philosophies. CrewAI focuses on role-based "crews"; AutoGen on conversational agents that talk to each other.
- Vector databases β Chroma is great for starting; Pinecone, Weaviate, and pgvector scale to production. The concepts from Chapter 7 are the same; the infrastructure grows.
- Observability platforms β LangSmith, Langfuse, Phoenix. If you're running agents in production, you need one of these. They turn the logging from Chapter 11 into a dashboard.
Build something real
The best way to cement what you've learned is to build an agent for a problem you actually have. Not a tutorial problem β a real one. Your email. Your notes. Your team's documentation. Your small business. Pick something annoying, something repetitive, something that would be better if a smart assistant could help. Build the agent. Ship it. Use it. Iterate.
The Closing Challenge
This isn't an exercise. It's an invitation.
Build an agent for something real. Not the bookshop β that was our shared example. Something from your life. A problem you have. A task you hate doing. A thing that would be better with a smart assistant that can act.
Use the loop. Give it tools. Give it memory. Give it knowledge with RAG. Wire it with LangChain if that helps. Add guardrails. Set up evals. Ship it behind a web endpoint. Use it. Watch it. Improve it.
Then tell someone: "I built an agent." Not "I used an agent." Not "I played with an agent." Built one. From the loop up. You know how it works β every piece, because you built each one yourself.
Chapter Summary
- You've built a complete agent system: the loop (Ch 3), brain (Ch 2), tools (Ch 4), memory (Ch 5), planning (Ch 6), RAG (Ch 7), LangChain wiring (Ch 8), multi-agent (Ch 9), guardrails (Ch 10), and evals (Ch 11). Every piece has a place.
- Shipping means working through a deployment checklist: the agent works, it's safe, it's measured, and it's deployed behind a web endpoint.
- A minimal web deployment is just an endpoint that calls
run_agentand returns the result. The agent does the work; the web layer is plumbing. - What comes next: LangGraph for complex workflows, structured outputs for reliability, fine-tuning for specialised domains, and the wider ecosystem of multi-agent frameworks, vector databases, and observability platforms.
- The most important habit: build a golden dataset early, run it after every change. Knowing whether you're improving is more valuable than any single technique.
- You're an agent builder now. The expertise comes from building real things, hitting real problems, and iterating. Go build something real.
Build an agent for something real in your life.
Not a tutorial. Not the bookshop. Something you need. An agent that reads your email and drafts replies. An agent that summarises your meeting notes. An agent that searches your team's docs and answers questions. An agent that tracks your tasks and reminds you. Anything β as long as it's real, and it's yours.
Use everything from this book. Build the loop. Add tools. Add memory. Add RAG if it needs knowledge. Add guardrails. Set up evals. Ship it behind a web endpoint. Use it. Improve it.
Then, when someone asks "what did you build?" β you'll have an answer. Not "I followed a tutorial." Not "I used a framework." You built an agent. From the loop up. And you know exactly how it works, because you built every piece yourself.
Now go build.