Five months on the part of agent building that demos skip: what the model may touch, when it stops, and what happens when a tool call fails halfway.
By the editors of the AI Agentic HandbookUpdated · 5 min read · Free, no sign-up
In brief
To become an agentic AI engineer, first master tool calling and structured output, then learn to build fixed workflows before open-ended agents. Add memory and MCP, then durability and human approval, and finish with agent security and trajectory evals. At 12–15 hours a week it takes about five months.
The first agent most people build works beautifully for about a week. It reads a support ticket, looks up the order, drafts a reply and sends it, and its author shows it round the team with some pride. Then the email service is slow one afternoon, the send tool times out, the model concludes the message probably didn't go, and one unlucky customer receives the same apology three times. Nothing in the demo was wrong. It had simply never met a slow network.
That gap is the job. An agentic AI engineer builds systems in which a model chooses the next action, and spends most of the working week on what surrounds that choice: which tools the model can see and how they describe themselves, when the loop must stop, what survives a crash, which actions wait for a person, and how you would show, a month later, that the agent took a sensible path rather than a lucky one. The reasoning gets the attention. The plumbing decides whether anyone lets it near production.
The chapters follow the order in which the risks appear. You start with a single tool call written by hand, because frameworks hide that round trip and so many later bugs live in it. Next come the fixed workflows that solve most problems more cheaply than any agent. Memory and MCP arrive once the loop is sound, durability and approvals once it touches things that matter, and security and path-level evals last, because they only make sense against an agent capable of doing damage.
Every chapter ends with a small system you build and then break on purpose: kill the process, feed it a poisoned document, retry a payment. Record what happened in the README. If a chapter's skip test describes something you have already shipped, move on.
How long
About 5 months at 12–15 hours a week
Where to start from
You can write Python and have called an LLM API at least once.
Work through the chapters in order. Tick each step when you've done it; your progress stays in this browser. Use the filters to see only articles, concepts or interview practice, and skip any chapter you already know.
Chapter 1 · Weeks 1–3
One tool call, written by hand
Every agent, however elaborate, is one exchange repeated. The model asks for a tool by name with some arguments, your code decides whether to run it, and the result goes back tagged with the id of the request. Frameworks wrap that exchange so thoroughly that plenty of people ship agents without ever having looked at it. Then the model asks for two tools in a single turn, and a loop that assumed one call at a time hands the wrong result to the wrong request.
So write it yourself first, against a raw API. The usual mistake in this chapter is treating a tool failure as an exception. A lookup that found nothing is information the model can act on; send it back as a result and let it try again. Save the crashes for your own bugs.
By the end of this chapter You can explain and hand-code the full tool-call round trip, including parallel calls and errors returned to the model.
Already there? You've written a tool-call loop against a raw model API, without a framework.
Most tasks people hand to an agent have a shape you could write down in advance: read the email, find the account, check one rule, draft a reply. When the steps are known, a fixed sequence of model calls with ordinary code between them is cheaper, faster and far easier to debug. An agent earns its place only when the next step depends on what the last one turned up, over and over.
This chapter is short, and it changes how you read the rest. The common error is to see the patterns as a ladder that ends, properly, at a fully autonomous agent. Treat them as a menu instead. Plenty of sound production systems are a cheap router in front of a few fixed chains, with one bounded agent behind a single route.
By the end of this chapter You can pick the simplest pattern that works — chain, router, orchestrator–worker or a full agent — and say why.
Already there? You can name the five common workflow patterns and when each beats an agent.
Now build the real thing: a model that decides, acts, reads what happened and decides again. The loop itself is a dozen lines. The time goes into everything that makes it safe to leave running, and the two things that matter most are seldom the ones beginners work on.
The first is stopping. A run should end because the task is done or because it hit a cap on steps, time or spend, and either way it should record which. The second is the tools. When an agent picks the wrong one, or keeps calling one that fails, the instinct is to rewrite the prompt. More often the tool has a vague name, an error that says only “400”, or a search that pours four thousand rows into the context.
By the end of this chapter You can build an agent that plans, recovers from bad tool results and always stops.
Already there? Your agents have explicit stop conditions and tools designed for a model, not copied from your API.
Sketch one full pass with real message shapes: the request, the tool call, the result going back. You'll want that picture whenever a trace looks wrong.
An agent re-sends its whole history on every turn, so each tool result it reads stays with it, and is paid for, until the run ends. Long tasks fail here in a recognisable way: the context fills with stale search results, the instructions drift out of focus, and the agent starts repeating itself. Deciding what goes in each turn, and what gets written down to be looked up later, is design work in its own right.
The second half is MCP, which lets a tool you write once be used by any application that speaks the protocol. Most people learn it from a tutorial and stop there. Read the specification too, because the split between tools, resources and prompts is about who decides to use each one, and that has consequences for cost and for security.
By the end of this chapter You can decide what goes into the context window each turn, persist what matters, and expose tools over MCP.
Already there? You've built an MCP server and an agent that keeps useful memory across sessions.
A demo agent lives in one process for half a minute. A working one, say an expense-claims agent, checks the receipts, calls the payments system and then waits two days for a manager to sign off. Somewhere in those two days the process will be redeployed. What matters is whether the run starts again from the top, paying twice, or picks up at the step where it stopped.
Three habits decide that: save progress after every step, make every action safe to repeat, and treat waiting for a person as a stored state rather than a sleeping thread. This chapter also covers splitting a task across several agents, which people reach for too early. Each extra context multiplies the token bill, so split only when one agent genuinely can't hold the job.
By the end of this chapter You can run long tasks that survive crashes, pause for human approval and split work across agents only when it pays off.
Already there? You've run an agent that resumes after a restart and waits for approval before risky actions.
Look hard at the cost line: roughly fifteen times the tokens of a chat. The pattern pays for broad, parallel research, much less for tightly linked work.
A model that only talks can say something wrong. An agent that reads email and calls APIs turns wrong text into wrong actions, and any text it reads, whether a web page, a ticket or another tool's output, may carry instructions. No filter fully fixes this. The workable stance is to assume the model will sometimes be fooled and arrange things so that, when it is, very little happens: narrow permissions, a sandbox, and no single agent that holds private data, reads untrusted content and can send things out.
Evaluation changes for the same reason. An agent can reach the right answer by a route that deleted something along the way, or that cost ten times what it should. Grade the path as well as the result, and report cost per successful task beside accuracy.
By the end of this chapter You can defend an agent against prompt injection, cap its spend and grade both its answers and its path.
Already there? You've red-teamed an agent and run trajectory evals in CI.
The defining security problem for agents. Give most of your attention to the indirect kind, where the instructions arrive inside something the agent fetched.
Several agents talking to each other multiply cost and failure points. Start with one agent and split only when a single context can't hold the job.
No stop conditions
An agent without step, time and spend limits will eventually loop. Write the limits before the first tool, and log which one fired.
Trusting tool output
Anything a tool returns, whether a web page, an email or a file, can carry instructions. Treat it as data and scope each tool's permissions tightly.
Grading only the final answer
An agent can reach the right answer the wrong way, deleting things on the way. Score the path too, with checks on which tools ran and in what order.
A last word
By the end you will have five working projects and a capstone: a tool loop with no framework, a task solved two ways with costs compared, an agent with hard limits, a server other apps can call, a run that resumes after you kill it, and an eval suite that grades the path as well as the answer. More valuable than any of them is the reflex of asking what happens on the retry, the crash and the poisoned document before asking what the model can do.
The roadmaps below take that reflex elsewhere: back to the broader AI engineering foundations if you skipped them, out to client deployments, and down into the platform that keeps models running.
Take this roadmap with you
Copy every step as a Markdown checklist for Notion, GitHub Issues or your notes, or send someone the link.
An agentic AI engineer builds systems where a language model chooses and calls tools to complete multi-step tasks, and makes those systems bounded, recoverable, secure and measurable in production.
How is agentic AI different from generative AI?
Generative AI produces content in response to a prompt. Agentic AI uses a model in a loop that takes actions — searching, calling APIs, editing files — until a goal is met or a limit is hit.
Which framework should I learn: LangGraph, CrewAI or an SDK?
Hand-code one tool loop first so you understand what any framework does. Then pick one graph-based framework and learn it well; the concepts — state, checkpoints, tools, handoffs — carry over.
Do I need to learn RAG before agents?
Learn the basics of retrieval first. Most production agents use retrieval as one of their tools, and agentic RAG is one of the most common patterns.
How long does this roadmap take?
About five months at 12–15 hours a week, assuming you can already write Python. Each milestone has a skip test so you can move faster through what you know.
Is MCP worth learning?
Yes. MCP is the common protocol for connecting models to tools and data across clients, so an MCP server you build once works in many places.