11 What to Learn to Build AI Agents (Roadmap)
A practical, ordered learning path — the same order used in Python ka Chilla: Build AI Agents by Codanics. Free playlist: https://www.youtube.com/watch?v=UE3o-7KRNXs&list=PLaQmdklCcX40
11.1 Stage 0 — Python you actually need (2–3 weeks)
| Topic | Why it matters for agents | Used in this repo |
|---|---|---|
| Functions, modules, packages | Every tool is a function; every agent is a module | all tools.py, agents.py |
| Type hints & dataclasses / Pydantic | Structured outputs, validation | every BaseModel |
pathlib, JSON, CSV |
Saving outputs, memory, audit trails | main.py, memory.py |
Virtual environments (venv), pip, requirements.txt |
Reproducible installs | 02_agents_code/.venv |
Environment variables & .env |
Secrets (API keys) never in code | llm.py (python-dotenv) |
| Exceptions & retries | APIs fail; agents must not crash | tools.search_all |
HTTP with requests |
Calling research databases | tools.py |
CLI with typer, pretty output with rich |
Usable tools without a UI | every main.py |
| pandas / numpy basics | Data agents | Agent 3 |
11.2 Stage 1 — LLM fundamentals (1–2 weeks)
- How an LLM call works: system prompt, user message, tokens,
max_tokens, temperature vs. effort, streaming. - Prompting: role, task, constraints, examples, output format. Learn to write system prompts that define a persona and rules (see
CITE_RULEinagents.py). - Structured outputs: force JSON that matches a schema (Pydantic → JSON schema). This is the single most important skill for reliable agents.
- Context windows & cost: what to put in the prompt (only what is needed), prompt caching, choosing models (
claude-opus-5for quality,claude-sonnet-5for bulk). - Thinking/effort controls: adaptive thinking; low effort for screening, high for critique.
11.3 Stage 2 — Tools & agents (2–3 weeks)
- Tool use / function calling: give the model functions it can call; the tool-runner loop (call → execute → feed result back).
- The agent loop: Plan → Act (tool) → Observe → Repeat → Answer (ReAct).
- Pipelines vs. autonomous agents: this repo uses pipelines of small agents (predictable, testable). Fully autonomous loops come later.
- Multi-agent patterns: planner/worker, generator/critic, persona simulation (Agent 4), orchestrator (
main.py). - Memory: short-term (the prompt), long-term (files/DB), summaries (
context_summary()in Agent 5). - Retrieval (RAG): search → chunk → embed → retrieve → answer; citation grounding.
11.4 Stage 3 — Research-domain tools (1–2 weeks)
- Scholarly APIs: arXiv, PubMed E-utilities, Semantic Scholar, Crossref, OpenAlex.
- PDF text extraction (
pypdf, GROBID), reference formats (BibTeX/RIS), DOIs. - Systematic-review methodology (PRISMA), evidence tables, PICO.
- Basic statistics: t-tests, ANOVA, multiple-testing (FDR), effect sizes, cross-validation, leakage.
11.5 Stage 4 — Productising (3–4 weeks)
- Evaluation: golden sets, rubric grading, LLM-as-judge, regression tests for prompts.
- Web app: Streamlit (MVP) → FastAPI + React; background jobs; file uploads.
- Storage: SQLite/Postgres for papers, runs and memory; object storage for PDFs.
- Observability: logs of every prompt/response, token usage, cost per run.
- Safety & integrity: no citation without a source; AI-use disclosures; privacy (send summaries not raw data).
- Deployment: Docker, cloud VM/containers, scheduled runs, secrets management.
- Business: pricing, pilots, sales collateral (see
01_guides/07_go_to_market_and_pricing.md).
11.6 Stage 5 — Advanced (ongoing)
- Autonomous tool-runner agents with approval gates; sandboxed code execution.
- Managed / hosted agents with scheduled deployments; MCP servers for tools.
- Fine-tuning vs. prompting; embeddings & vector DBs; graph-based citation analysis.
- Multi-modal inputs (figures, PDFs, images) for extraction.
11.7 Suggested weekly plan (8 weeks)
| Week | Build |
|---|---|
| 1 | Python refresh; run agent_03 --demo --no-llm (no key needed) |
| 2 | Get an API key; run Agent 1 with --offline, then live |
| 3 | Modify tools.py: add OpenAlex; add a new field to Paper |
| 4 | Run Agent 2; edit evidence.csv; --from-evidence |
| 5 | Run Agent 3 on your own CSV; add a new test in analysis.py |
| 6 | Run Agent 4 on your notes; add a 4th reviewer persona |
| 7 | Run Agent 5 for 3 “weeks”; build a Streamlit status page |
| 8 | Write evals; pick one agent; make it a product (UI + pricing page) |
Codanics — Python ka Chilla: Build AI Agents
- Course: https://codanics.com/courses/python-ka-chilla-build-ai-agents/
- Website: https://codanics.com · YouTube: @codanics
- WhatsApp channel: https://whatsapp.com/channel/0029Va7nRDq3QxRzGqaQvS3r
- Complete free course: https://www.youtube.com/watch?v=UE3o-7KRNXs&list=PLaQmdklCcX40