It's expensive and time consuming to change, tune, and retrain an LLM to modify an agent’s behavior. Self-Improving Agents: How to engineer adaptive agent harnesses shows you how to design AI agents that measurably get better in production without fine-tuning, weight updates, or waiting for the next model release. Written by Micheal Lanham, author of AI Agents in Action, this hands-on book equips you with techniques to transform your agent’s harness—context, memory, metacognition, tools, and code—into a measured, versioned, auditable improvement loop that adapts and improves as it runs.
As you go, you’ll build HelixAgent, a RAG general-knowledge agent that starts static and gains a new self-improvement layer in every chapter. By the final chapter, your agent will ship with drift detection, rollout controls, and a reward-hacking runbook. Along the way, you’ll build a portfolio of self-improving agents: a data-analyst agent scored by exact ground truth, a helpdesk agent with four-tier memory that learns from its own traffic, a Karpathy-style hill-climbing research agent, and coding agents whose skill files, tool descriptions, and planner code become the artifact under search.
Throughout, the Helix Observatory web dashboard lets you replay lineage trees, diff candidate contexts, inspect judge verdicts, and stream a live search as it runs. You’ll gradually work your way up to HyperAgents—a cutting-edge research pattern that improves the agent and also the harness self-modification process. By the time you’re done, you’ll have agents running under one improvement loop, applied layer by layer up the agent harness, held to production standards of auditability, human gates, and honest costs.
Build AI agents that do more than respond. Give them tools, connect them to knowledge, coordinate their work, and evaluate how well they perform.
AI Agents in Action, Second Edition teaches you how to design, build, evaluate, and deploy AI agents through working Python examples. You’ll progress from a simple agent to tool-using assistants, coordinated multi-agent workflows, and deployable systems. Along the way, you’ll learn how the pieces fit together and where to look when an agent needs improvement.
What’s new and included in the second edition?
In AI Agents in Action, you’ll learn how to build production-ready assistants, multi-agent systems, and behavioral agents. You’ll master the essential parts of an agent, including retrieval-augmented knowledge and memory, while you create multi-agent applications that can use software tools, plan tasks autonomously, and learn from experience. As you explore the many interesting examples, you’ll work with state-of-the-art tools like OpenAI Assistants API, GPT Nexus, LangChain, Prompt Flow, AutoGen, and CrewAI.
Evolutionary Deep Learning introduces evolutionary computation (EC) and gives you a toolbox of techniques you can apply throughout the deep learning pipeline. Discover genetic algorithms and EC approaches to network topology, generative modeling, reinforcement learning, and more! Interactive Colab notebooks give you an opportunity to experiment as you explore.