Sefism AI Agents and MCP Roadmap
A 10-stage path for developers who can already call a model API and want to build agents that hold up in real use, in Python or TypeScript. It covers the agent loop by hand, structured output, memory and state, multi-agent patterns, LangGraph and the OpenAI and Claude agent SDKs, building and publishing an MCP server, evals, guardrails against prompt injection, and tracing and shipping. You finish with an evaluated, limited, traced agent and an MCP server a reviewer can try.
10
Sefism · Oct 2026
71 per language edition
Sefism · Oct 2026
100
Sefism · Oct 2026
22
Sefism · Oct 2026
5
Sefism · Oct 2026
2 (Python, TypeScript)
Sefism · Oct 2026
Roadmap
AI & Machine Learning
Sefism
About 100 hours over 22 weeks at 5 hours a week
Intermediate
Free
What this roadmap is
The AI agents and MCP roadmap is Sefism's path for developers who can already call a model API and want to build agents that hold up in real use. Tauseef Fayyaz wrote it in a deliberate order: first the question of whether you need an agent at all, then the loop written by hand, then validation, memory, patterns and frameworks, and only then an MCP server, evals, guardrails and production shipping.
You choose a language at the start: Python (the default, with most agent frameworks and examples) or TypeScript (if you ship web products). Validation, MCP SDK and testing topics switch to match: Pydantic and pytest in Python, Zod and Vitest in TypeScript.
By the end you should be able to:
- Write a tool-calling agent loop from scratch against one provider API, with typed tools, validated output, clear errors and step, time and cost limits.
- Add memory and explicit state, and choose between chaining, routing, orchestrator-workers and handoffs, including when not to use several agents.
- Build the same agent in LangGraph, the OpenAI Agents SDK or the Claude Agent SDK, and explain what each framework adds over your own loop.
- Build, test in the Inspector and publish an MCP server, with sensible tools, resources and authorisation.
- Ship an agent with an eval suite in CI, prompt injection defences, human approval for risky actions and tracing of every step.
Who it suits, and who should start elsewhere
It suits backend, full stack and AI engineers who have made at least a few API calls to a language model and want to go from a demo to something real users can rely on. It is short and dense: 100 hours, much of it building.
If you have never called a model API, structured a prompt or built retrieval, start with the AI engineering roadmap; this roadmap assumes that ground. If you mainly want to use AI tools to write code faster, the Coding with AI tools roadmap is the better fit. For running models and LLM apps in production at the infrastructure level, see MLOps and LLMOps. And if you are not yet comfortable building a backend service, the Backend roadmap comes first.
Prerequisites and realistic time
You need to be fluent in Python or TypeScript, comfortable with JSON and HTTP APIs, and able to get an API key from one model provider with a monthly spending limit set. Local open models through Ollama are suggested for testing loops without API costs. The roadmap adds up to about 100 hours across 10 stages:
- At about 5 hours a week (the default on the public page): roughly 22 weeks.
- At about 8 hours a week: roughly 18 weeks.
- At about 12 hours a week: roughly 11 weeks.
The first three stages (how agents work, tool calling from scratch, structured output) are foundation stages. If you say you are comfortable with them they are skipped, and if you know some of it they become shorter reviews. Tauseef's note still asks you to write the design note in stage one even if you skim it.
A sample week for a student (10 to 12 hours). One evening reading the stage's guide or course, two evenings building, and a weekend block on the milestone and its checklist. At this pace you finish in about a semester.
A sample week for someone working full time (5 hours). One weekday session on reading, one on a small code change, and a three-hour weekend build. Because each stage adds to the same agent, short sessions still compound.
Stage by stage
1. How agents work (8 hours, foundation)
What an agent is, workflows versus agents, the agent loop, ground truth from the environment, when not to build an agent and the parts of an agent system. Milestone: a one-page design note for the agent you want to build: why it needs an agent rather than a workflow, its tools, the ground truth each step returns, which actions are irreversible and its limits.
2. Tool calling from scratch (10 hours, foundation)
Defining tools, the call and result round trip, writing the loop in code, tool choice and parallel calls, errors the model can recover from, descriptions and result size, and reading a second provider's API. Milestone: a framework-free agent with three real tools, recoverable error results, parallel call handling, a step limit and a printed trace, plus a note mapping it to a second provider. "Fifty lines of your own loop will teach you more about agents than a week of framework tutorials."
3. Structured output and validation (6 hours, foundation)
Schemas as contracts, strict mode, validation with Pydantic or Zod, validate-then-retry with the error, null instead of invented values, and business rules in code rather than in the prompt. Milestone: every tool input and structured output defined once as a schema, strict mode where supported, a bounded retry loop and unit tests for each tool's rules.
4. Memory and state (10 hours)
Short-term memory with stateless APIs, context engineering, compaction and summaries, explicit typed state, long-term memory, scoping memory per user, and checkpoints for resumable runs. Milestone: an agent that keeps typed state, compacts long runs, survives a restart from a database checkpoint and remembers one useful fact per user with a way to delete it.
5. Planning and multi-agent patterns (10 hours)
Prompt chaining and routing, parallelisation and voting, plan and execute, evaluator and optimiser loops, orchestrators and workers, handoffs, and when several agents are worth it. Milestone: the same task solved as a single agent and as a pattern of your choice, compared on quality, cost per task and ease of debugging. The advice: the best systems are mostly boring workflows with one or two well-placed agentic steps.
6. Agent frameworks (14 hours)
Choosing a framework, LangGraph state, nodes, edges, persistence and interrupts, the OpenAI Agents SDK, the Claude Agent SDK, porting your agent, and keeping the framework thin. Milestone: your agent rebuilt in one framework, passing the same tests as your manual version, with a one-page comparison of what the framework added and hid.
7. Build and publish an MCP server (12 hours)
Hosts, clients and servers, tools, resources and prompts, stdio and Streamable HTTP transports, a first server with the official SDK, testing with the MCP Inspector, the stateless specification revision the roadmap is written against, authorisation for remote servers and publishing to the MCP Registry. Milestone: a working server around a real system people use, tested in the Inspector, used from an MCP host and ready to publish. Tauseef calls this one of the best portfolio pieces in the area.
8. Evals and testing agents (10 hours)
Tasks, trials and eval sets, code, model and human graders, tool selection tests with fake tools, trajectory and outcome checks, pass@k and pass^k, model-as-judge, and evals in CI. Milestone: at least 30 eval tasks, a calibrated model judge, reliability reported over several trials, and a fast subset in CI. Evals are described as the skill employers ask about most.
9. Guardrails, cost and safety (10 hours)
Prompt injection, the lethal trifecta, least privilege for tools, human approval for risky actions, sandboxing code, step, time and cost limits, cost per task, and input and output guardrails. Milestone: a written threat model against the lethal trifecta and the OWASP agentic risks, enforced limits, a cost estimate and a red-team eval set. The one rule: never give one agent private data, untrusted input and a way to send data out, all at once.
10. Observability and shipping (10 hours)
Tracing every step, an optional look at the OpenTelemetry GenAI conventions, background jobs, durable execution, retries and idempotent tools, streaming progress, model routing and fallbacks, and turning production traces into new evals. Milestone: your agent deployed as a traced background job with idempotent tools, a tested fallback model and a weekly review of flagged traces.
Projects to build alongside
- Model Context Protocol Server for University Systems: stage seven in full.
- Policy-Bound Returns and Refunds Agent for Small Online Stores
- Prompt Injection Red-Team Harness for Tool-Using AI Agents
- Deadline-Tracking Study Agent with Long-Term Memory
- Sandboxed Spreadsheet Analyst Agent for Small Business Owners
How it works on Sefism
Everything on Sefism is free to learn from. The public roadmap page shows all ten stages with their summaries and length, and opens the first two stages in full. Adding the roadmap to your dashboard opens every stage, lets you tick them off and track progress, and gives you the companion cheat sheet. Your first roadmap is free to add; after that, adding a roadmap uses credits, and new members get starting credits when they join.
In the dashboard each topic has an explanation, a check question and a prompt that makes an AI assistant quiz you rather than build the agent for you, and each stage has Tauseef's advice, a checklist and curated resources. Stuck on a design decision? Ask Tauseef a question.
The companion cheat sheet
The AI agents and MCP cheat sheet revises all ten stages with snippets in your language. Two standalone sheets are useful alongside: LLM APIs for request shapes across providers, and Model Context Protocol for protocol messages and host configuration.
Related on Sefism
- How to start learning AI agents
- Should I learn an agent framework or build agents from scratch?
- What is MCP and do I need to learn it?
- How to prove an AI agent project works
- Building Effective Agents, MCP Inspector and OWASP Top 10 for Agentic Applications, from the stage resources.
What you can do afterwards
Show an employer an agent that is evaluated, limited, traced and running, plus a published MCP server they can try. A small agent like that, the roadmap argues, impresses reviewers more than an ambitious demo that only runs on your laptop. From here, the MLOps and LLMOps roadmap takes the production side further.
FAQ
How long does it take to learn to build AI agents? The roadmap estimates about 100 hours: around 11 weeks at 12 hours a week, or about 22 weeks at 5 hours a week.
Should I learn a framework or build agents from scratch? Both, in that order. The roadmap has you write the loop by hand in stage two and port it to one framework in stage six, with the same tests.
Python or TypeScript for AI agents? Python has the most frameworks and examples and is the default. TypeScript is a full edition for developers who ship web products.
Do I need to learn MCP? The roadmap gives it a full stage because a small, useful MCP server is easy for a reviewer to try. Check the date and version on any tutorial, since the specification and SDKs change often.
Are AI agents worth learning in 2026? The roadmap's own framing is careful: build an agent only where a workflow cannot do the job, and prove it with evals.
Ready to start?
Opens on Sefism in a new tab.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
Follow along
New writing, resources and project ideas land here first.