Learn Agents from 0 to 1
Build the right mental model through short lessons, then use Pi to ship an evidence-first technical research agent.
For developers who know basic TypeScript but have not built an agent system end to end.
Start with lesson 1The final project is not a chat wrapper. It plans, researches, verifies evidence, resumes work, and produces cited reports.
See the map first
Separate Chat, Workflow, and Agent, then understand what each agent taxonomy is actually describing.
- 01 Chat, Workflow, or Agent? Choose the right control model by asking who decides the next step. Published
- 02 Agents Come in Different Shapes Understand the decision spectrum and run a constrained Agent Loop with Pi. Published
- 03 The Agent Architecture Map Put classical agents, LLM agents, and multi-agent systems into the right coordinate systems. Planned
Understand the LLM runtime
Understand model input and output before adding an agent loop.
- 04 What Actually Happens in an LLM Call Build a small but accurate model of requests, sampling, and responses. Planned
- 05 Messages, Roles, Tokens, and Context Windows See what the agent actually sends to the model on every turn. Planned
- 06 Build a Minimal Agent Loop with Pi Connect streaming, structured results, state, and stopping conditions. Planned
Give the agent hands
Tools define capability boundaries and introduce side effects and risk.
- 07 Tool Calling Is Not an Agent Separate a single function call from a loop that keeps observing results. Planned
- 08 How to Design a Good Tool Schema Reduce misuse with clear names, parameter boundaries, and result contracts. Planned
- 09 Tool Errors, Retries, Timeouts, and Result Semantics Make failures understandable to the model and reliable for the program. Planned
- 10 Side Effects, Idempotency, Approval, Parallelism, and Cancellation Put explicit engineering guardrails around real actions. Planned
Manage context and memory
A good agent does not remember everything; it receives the right information at the right step.
- 11 Prompt Engineering vs. Context Engineering Prompts define rules; context supplies what the current task needs. Planned
- 12 Sessions, Message History, and Context Compaction Keep long tasks moving without endlessly filling the context window. Planned
- 13 Should RAG Be a Tool or Automatic Context? Choose based on retrieval timing, visibility, and cost. Planned
- 14 Working, Episodic, Semantic, and Procedural Memory Separate four memory types through write, retrieval, and forgetting policies. Planned
Learn agent patterns
Patterns are control structures for different uncertainty, not levels in an upgrade tree.
- 15 ReAct: Observe, Then Act Again Reconsider the next step after every real tool result. Planned
- 16 Plan-and-Execute: Plan Before Acting Separate decomposition from execution while letting evidence revise the plan. Planned
- 17 Reflection and Evaluator-Optimizer Know when self-correction helps and when it only adds another model call. Planned
- 18 Router, Parallel, and Blackboard Patterns Compare routing, parallel work, and shared-state coordination. Planned
- 19 Supervisor, Handoff, and Multi-Agent Systems Add agents only when context isolation or real parallelism pays off. Planned
Move from demo to reliable system
Protocols, safety, observability, and evaluation determine whether an agent can ship.
- 20 MCP: Connect External Capabilities Understand the roles of tools, resources, prompts, and transports. Planned
- 21 Prompt Injection and Tool Injection Why external content must not automatically gain instruction or tool authority. Planned
- 22 Sandboxes, Permissions, Budgets, and Humans in the Loop Constrain the agent with system boundaries instead of polite prompt requests. Planned
- 23 Tracing, Observability, and Agent Evaluation Trace every step from the result and build a reusable regression set. Planned
Ship the complete agent project
Combine the earlier capabilities into a real project with explicit acceptance criteria.
- 24 Project Spec, Architecture, and Acceptance Criteria Define what complete research means before choosing an agent structure. Planned
- 25 Search, Reading, Normalization, and Citation Tools Make every important claim traceable to a real source. Planned
- 26 Planner, Researcher, and Task Recovery Decompose research questions and resume interrupted work from evidence state. Planned
- 27 Citations, Evaluation, Context, and Persistence Independently check source coverage, conclusion consistency, and context budgets. Planned
- 28 CLI, HTTP/SSE API, Evaluation Set, and Release Gates Finish with a runnable, testable, and demonstrable delivery. Planned
Reference baseline
These sources support the concepts and terminology. The articles use original explanations and Pi implementations.