AI Agent Engineering Textbook
Learn to build Agents from fundamentals to production engineering through a bilingual textbook and runnable reference implementation.
- Source repo
- Haozhe-Xing/agent_learning
- Stars
- ★ 812
- Last updated
- 1mo ago
- FARS reviewed
- Nov 08, 2026
- License
- MIT
- Primary language
- HTML
- FA score
- 60/100 · Some gaps
At a glance
- How it runs
- Works with
- Portable with changesOpenAI API (Partial support)
- Cost
- Free, no paid service needed
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- Engineers moving from LLM API calls to Agent development can follow the chapters on tools, memory, planning, and RAG.
- Not a fit if
- Teams seeking a ready-to-use hosted Agent service
- Teams requiring a production-complete implementation
- Website
- haozhe-xing.github.io/agent_learning ↗ set on GitHub
- Maintenance
- Commits in the last 6 monthslast commit 2026-10-24+18.6 ★/day over 7 days
- Source review
- 60/100 · Some gaps 2 safety controls not found
What does this agent do, and when should you use it?
This is an engineering-focused AI Agent textbook in English and Chinese, with 23 chapters, 188 Markdown pages per language, more than 330 SVG diagrams, and five interactive demos. It covers LLM fundamentals, tools, memory, planning, RAG, context and harness engineering, Agentic RL, multi-agent systems, evaluation, security, and deployment, alongside framework practice with LangChain and LangGraph. reference-agent/ is a small teaching baseline with a ReAct loop, tools, memory, security checks, evaluation, an MCP server, and a FastAPI service. It is suited to study and experimentation; the repository explicitly says the implementation is not production-complete.
src/en/ and src/zh/ contain the bilingual mdBook textbook, with chapters on Agent components, research papers, and engineering methods, supported by diagrams and interactive demos. The Agent loop in reference-agent/ can run registered tools and supports an offline FakeProvider and an optional OpenAI provider; the implementation also includes memory, security boundaries, an MCP server, FastAPI endpoints, streaming, and an evaluation harness. The documented commands install development dependencies and run offline tests. The repository does not describe a finished Agent command for end users to invoke from a terminal.
- Engineers moving from LLM API calls to Agent development can follow the chapters on tools, memory, planning, and RAG.
- Learners comparing Agent architectures and research methods can read paper-to-practice notes on ReAct, Reflexion, MemGPT/Letta, GraphRAG, and GRPO.
- Developers learning LangChain or LangGraph can use the framework chapters to connect framework practice with underlying mechanisms.
- Developers practicing tool use and security checks can inspect and run the
reference-agent/teaching baseline. - Teams seeking bilingual study material and locally built books can work from the English and Chinese mdBook sources and
serve.sh.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
pip install -e ".[dev]"
How do you install or deploy this agent?
The textbook uses mdBook configuration, and serve.sh is provided to build and serve both language versions locally. The supplied material does not give an mdBook installation command or version. For the reference implementation, the documented setup is:
cd reference-agent
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest -qThe Python version is not specified. FakeProvider runs offline and the tests need no API key. The optional OpenAI provider requires appropriate API credentials, but its configuration steps are not described in the supplied material.
How do you use this agent?
After installing the development dependencies in the reference implementation directory, run the offline tests with:
cd reference-agent
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest -qTo study the book, start with src/en/SUMMARY.md or src/zh/SUMMARY.md; ./serve.sh supports local builds and serving for both languages. The reference implementation includes FastAPI endpoints and an MCP server, but the supplied material does not list endpoint paths, startup commands, or MCP client configuration, so it does not provide enough information for a first API call.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
Inherits capabilities of connected MCP servers; audit third-party servers before enabling.
FARS trust-control audit
- confirmation before acting — Turn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
- rollback or recovery path — Back up first, or work on a git branch or snapshot, so its changes can be undone.
What are this agent's strengths and limitations?
- The 23 chapters form a path across foundations, core capabilities, frameworks, multi-agent systems, production engineering, and capstone projects.
- Each language has 188 Markdown pages, supported by more than 330 original SVG diagrams and five interactive demos.
reference-agent/brings together tools, memory, security checks, MCP, FastAPI, and evaluation; its 16 tests run without an API key.- The material covers mechanisms as well as framework practice and describes the reference implementation as a teaching baseline rather than a complete production system.
- This is a textbook and teaching implementation, not a ready-to-deploy hosted Agent product.
- The supplied material does not document OpenAI provider credential setup, FastAPI startup commands, API routes, or MCP client configuration.
- It does not specify the mdBook or Python versions or the complete runtime requirements, so adopters may need to investigate dependencies.
- The roadmap still lists more end-to-end projects and evaluation and observability templates as future work.
How does this agent compare with similar options?
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| AI Agent Engineering Textbook This agent | 60 · Some gaps | FrameworkFree | ★ 812 | 1mo ago | HTML | — |
| AI Agents — The Definitive Guide (Companion Code) | 34 · Major gaps | Library / SDKFree + model costs | ★ 3k | 3mo ago | Jupyter Notebook | — |
| Hello-Agents | 53 · Major gaps | Web appFree + model costs | ★ 88k | 10d ago | Python | OpenAI API |
| Dive into LangGraph | 44 · Major gaps | Library / SDKFree + model costs | ★ 476 | 1d ago | Jupyter Notebook | Claude Code |
How does FollowAgents rate this agent?
Why each dimension lost points
This is a teaching repository, and the supplied files show no malicious behavior. The reference Agent has a tool registry and iteration limit, but tool calls have no user confirmation mechanism and fine-grained permissions are not shown, so least privilege and confirmation score low. Inputs are sent through a provider to the model, and tool results return to the conversation; the visible data-flow evidence is limited, as is evidence for sensitive-data handling, dependency security, and recovery from external effects. The README covers papers and protocols and asks contributors to prefer primary sources, supporting some attribution credit. Publisher identity is unverified and is neither rewarded nor penalized.
The README describes a textbook and reference implementation, and the supplied code is consistent with that positioning. The offline FakeProvider, fixed sample tests, and CI build workflow provide some support. Tool exceptions are returned as text to the model, but detailed error classification and recovery are not shown, so failure messages receive only partial credit. No code was executed for this static review.
The bilingual textbook covers material from fundamentals through deployment, evaluation, and security, with a clear chapter and appendix structure. The reference implementation is explicitly described as a teaching baseline rather than a production-complete system, which establishes some capability boundaries. The contents help readers find topics, but the supplied evidence does not fully specify applicability triggers or an environment compatibility matrix.
The English and Chinese contents, chapters, appendices, setup chapter, and local build instructions form a clear information architecture. The README provides reference-Agent installation commands, an FAQ, and contribution guidance, and the license file states MIT. A roadmap and some limitations are provided, but the supplied sample shows no release history or changelog and does not clearly assign maintenance responsibility or update commitments, so those criteria lose credit.
The textbook offers a structured learning path, bilingual material, diagrams, interactive demos, and a readable reference implementation, which can support learning and practice. Offline examples and tests lower the entry barrier. The supplied files do not establish that the time investment or ongoing maintenance costs for the full textbook and external-model or framework material are well balanced.
The README makes specific claims about chapters, bilingual pages, the reference Agent, tests, and build workflow, and points to corresponding directories and files; supplied tests and implementation corroborate some claims. The project asks contributors to prefer primary sources for research and emphasizes verifiable claims. However, the provided files cannot independently verify every promotional count or the quality of all content, and this review does not treat those claims as execution results.
- Not found in source: confirmation before actingTurn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
- Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
- The reference Agent executes tool calls emitted by the model; the supplied implementation does not show per-call user confirmation or fine-grained authorization.
- The supplied sample cannot independently verify all README claims about chapter, page, diagram, and demo counts; no tests or builds were run for this review.
FAQ
Do I need a paid model API to use the reference implementation?
FakeProvider and 16 tests. The repository also offers an optional OpenAI provider; using it requires appropriate credentials, and API charges depend on the service used. The supplied material does not give prices.Can I deploy this directly as a production Agent service?
reference-agent/ as a teaching baseline and says it is not production-complete.Can I connect to the implementation through an MCP client or HTTP API?
Is it useful if I only want to learn a particular framework?
Is AI Agent Engineering Textbook open source?
Is AI Agent Engineering Textbook safe to use?
Is AI Agent Engineering Textbook still maintained?
Who makes AI Agent Engineering Textbook?
What is AI Agent Engineering Textbook's official website?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.