Kick off your book project in 2 hours, get started with GhostAI in 2 hours, or do both! Free live workshops, on Zoom. You’ll leave with a real book project and a clear plan to keep going. Saturday, June 27, 2026.

Leanpub Header

Skip to main content

The Agentic Engineer

Durable Principles for Building Production Systems with LLMs in the Loop

A leader at a company opens Slack one morning. The brief their virtual employee wrote looks normal: same headers, same prose voice, same cadence as every other brief that week. The last line ends mid-sentence. The API returned `stop_reason: "max_tokens"`. The system shipped it anyway. No exception. No log line. No retry.

That bug doesn't look like the normal kind. This book is about why, and what to build instead.

Minimum price

$14.99

$29.00

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

Buying multiple copies for your team? See below for a discount!

PDF
EPUB
About

About

About the Book

AI/LLM books rot fast. This one bets on what doesn't. They teach the model that's hot this quarter, the SDK with the cleanest tutorial, the prompt that worked on a demo. Six versions later, none of it survives.

This book is the opposite bet. It teaches mental models, decision frameworks, and named failure patterns for systems that have large language models in load-bearing paths: the kind of knowledge that outlives any specific model, vendor, or framework.

It's written for working engineers and tech leads who are shipping agentic systems in production. Not researchers. Not prompt-engineering hobbyists. People who have to operate this stuff at 3am when it breaks, and need a vocabulary for what they're looking at.

The evidence base is real production war stories. A virtual employee that shipped a brief ending mid-sentence because the API returned `stop_reason: "max_tokens"` and nothing in the system raised. A prompt-cache flag the SDK accepted but the provider silently no-op'd. An MCP tool surface that lied about resource lifecycle. An agentic reviewer that swept the wrong directory and called the work done. Every named principle is anchored to an incident that actually happened in a shipped system.

What's inside:

  • A reading vocabulary for probabilistic-inside-deterministic systems
  • Context, tool surfaces, and eval loops as engineering primitives, not afterthoughts
  • A catalog of named failure modes you'll recognize the next time you see them
  • Orchestration patterns and observability disciplines for production agentic systems
  • A decision framework for when to use an agent vs. a script vs. a human
  • A structural playbook for building teams around agentic work

What's NOT in this book: model comparisons, framework tutorials, "future of work" speculation, prompt cookbooks, or any sentence that depends on which API version was current the week the book shipped. Those live in the book's online appendix, versioned and dated.

If you've ever debugged an LLM-in-the-loop system at 3am and felt that your normal engineering instincts were the wrong tools for the job, this book is for you.

Team Discounts

Team Discounts

Get a team discount on this book!

  • Up to 3 members

    Minimum price
    $37.00
    Suggested price
    $72.00
  • Up to 5 members

    Minimum price
    $59.00
    Suggested price
    $116
  • Up to 10 members

    Minimum price
    $104
    Suggested price
    $203
  • Up to 15 members

    Minimum price
    $149
    Suggested price
    $290
  • Up to 25 members

    Minimum price
    $224
    Suggested price
    $435

Author

About the Author

Victor Velazquez

Victor Velazquez is Chief Operating Officer and a working engineer at MagmaLabs. He builds Forge and the MCP-based tools that put agentic systems into production. The principles in this book are drawn from systems he has built, broken, and shipped himself.

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub