No. 410 of 500 No. 49 in Generative AI & LLMs

Build an AI Agent (From Scratch)

Agents that reason, plan, and act autonomously

By Jungjun Hur and Younghee Song

Published
August 18, 2026
Print length
336 pages
Reading level
Intermediate
ISBN-13
978-1633434615
Publisher
Manning Publications
Written for
Python developers who want to understand agent internals before adopting or building agent frameworks.

Synopsis

Jungjun Hur and Younghee Song walk Python developers through building an autonomous research agent without relying on agent frameworks. The running project targets GAIA, a benchmark of multi-step assistant tasks, so each chapter adds a capability the agent needs to perform better. Early chapters separate developer-scripted workflows from loops in which the language model decides the next step, then cover stateless API calls, structured outputs with Pydantic and tool calling. The book then adds web search, local file exploration and vector-based retrieval, long-term memory, the Model Context Protocol, planning and reflection, and sandboxed code execution.

Later chapters coordinate several agents through the A2A protocol and evaluate them with LLM-as-a-judge pipelines traced through OpenTelemetry. A recurring theme is context engineering: deciding what information enters the model's window so that long tasks do not degrade. Because every component is written by hand, readers see why agents loop, hallucinate or lose track, which makes later work with commercial frameworks easier to debug. The examples use the OpenAI API, and the book assumes working Python and some machine learning background. Reviewer Nicolas Fränkel judged the evaluation chapter the one area that needs more depth.

Scorecard

Editorial score

How it scored

Editorial score: 66.5 / 1005 weighted criteria

  • Influence30%

    13.5/30
  • Authority25%

    15.0/25
  • Practical value20%

    17.0/20
  • Currency15%

    13.5/15
  • Readability10%

    7.5/10
  • Editorial score

    66.5/100

How the rank was computed

Rank No. 410 of 500 comes from a composite of 49.6: observable signals 19.5 of 55 points plus editorial review 30.1 of 45 points.

All 11 inputs
InputPoints
Observable signals19.5/55
Reach (Amazon ratings volume)5.9/16.5
Consensus across best-of lists2.8/13.8
Awards and bestseller evidence0.0/8.3
Reader rating, sample-adjusted6.3/8.3
Amazon sales rank1.7/5.5
Recency2.8/2.8
Editorial review30.1/45
Author authority6.8/11.3
Influence6.1/13.5
Practical value7.7/9.0
Readability3.4/4.5
Currency6.1/6.8

Each criterion is scored from 1 to 10 and weighted, and the points add up to the editorial score. The rank combines observable signals (55 percent) with this score (45 percent). Read the methodology.

Verdict

A methodical, framework-free tutorial that teaches how agent loops, tools, memory and evaluation work by building one in Python.

Strengths

  • Builds every component without framework abstractions
  • Covers MCP, A2A and agent evaluation
  • Clear diagrams and a coherent running project

Keep in mind

Assumes comfort with Python and some machine learning; examples use the OpenAI API, and the evaluation chapter is thinner than the rest.

Key takeaways

  1. Distinguish fixed, developer-defined workflows from true agents, in which the language model chooses actions inside a loop; the choice affects reliability, cost and debugging.
  2. Context engineering, structuring what enters the model's window, prevents the context rot and lost-in-the-middle failures that degrade long, multi-step tasks.
  3. Memory, planning with reflection and sandboxed code execution each address specific agent failures, such as repeating past mistakes, looping and hallucinated results.
  4. Agents need systematic evaluation: benchmark tasks like GAIA and LLM-as-a-judge pipelines with tracing reveal where an agent fails before it reaches users.

Notable facts

  • Lead author Jungjun Hur's earlier book, Practical AI Application Development Using LLMs (Onlybook, 2024), was a bestseller in Korea. Source (opens in a new tab)
  • Developer advocate Nicolas Fränkel wrote that the book belongs in any engineer's library for understanding what happens inside AI agents. Source (opens in a new tab)

About the author

Jungjun Hur and Younghee Song

Jungjun Hur is an independent AI consultant, engineer and educator in South Korea who builds LLM applications and agentic systems, including for e-commerce. He wrote Practical AI Application Development Using LLMs (2024), a bestseller in Korea. Co-author Younghee Song is an AI consultant at PwC, where she helps organizations plan and carry out practical AI strategies.

Questions

What is Build an AI Agent (From Scratch) about?
It is a hands-on Manning book in which readers build an autonomous research agent in plain Python, without agent frameworks. Chapters add tool calling, retrieval-augmented generation, memory, the Model Context Protocol, planning and reflection, sandboxed code execution, multi-agent coordination and evaluation. The agent is tested on tasks from the GAIA benchmark, which gives the project a measurable goal.
Who should read Build an AI Agent (From Scratch)?
Python developers with some machine learning background who want to understand how agents work beneath framework abstractions. It suits engineers preparing to put agents into production, technical leads evaluating agent platforms and students who learn best by building. Readers without programming experience, or executives seeking strategy rather than code, will be better served by a nontechnical guide.
Is Build an AI Agent (From Scratch) current in 2026?
Yes. Published by Manning in 2026, it covers the Model Context Protocol, the A2A agent-to-agent protocol, context engineering and LLM-as-a-judge evaluation, which reflect current agent practice. Specific APIs and model names will change, but the book's focus on underlying mechanics, such as the agent loop, tool calling and memory, keeps its lessons useful as libraries evolve.

Sources

As an Amazon Associate, Best AI Books earns from qualifying purchases. Best AI Books is sponsored by Iternal.ai, whose founder and CEO, John Byron Hanby IV, wrote The AI Strategy Blueprint, our #1 ranked book. How we rank books.