ByteByteGoFree Live Masterclass

· 1 hour · Live on Zoom

Don’t Build AI Agents Without Learning These Techniques

A practical guide to the engineering behind reliable AI agents, from the first tool call to the complete production harness.

Ali Aminian

Ali Aminian

Google, Bestselling Author

intentgrounded inputproposed actionapprovedresultacceptedTHE HARNESSUser GoalContext Builder1LLM2Policy Gate3Tools / Runtime4Verify5Accepted Result6tool resultfeedbackObservabilityConstraintsenforcelimit

Session Outline

  1. Part 1

    From LLM to Agent

    • What an LLM can and can't do on its own
    • Tool calling (tool definitions, tool calls, tool results)
    • The agent loop (ReAct, stopping when there are no tool calls)
    • Retrieval for answers grounded in your docs
    • Agent = model + harness
    Tool calling: the LLM calls get_order() to answer where an order is, and picks from a set of tools
  2. Part 2

    Agents in Production

    • What changes at scale (more tools, longer runs, bigger knowledge bases)
    • Why a demo harness fails in production
    • Design of a production harness (loop, tools, context, memory, retrieval)
    An agent in production: an LLM over a harness with an agent loop, tools, context, memory and retrieval, each labeled with how it breaks
  3. Part 3

    The Agent Loop

    • Prompt caching and exact prefix matching
    • Stable content before volatile content
    • Append-only updates
    A prompt ordered stable first: system prompt, tool definitions, project rules and session context lead; the conversation and new message trail
  4. Part 4

    Tools at Scale

    • Tool overload and ambiguity
    • Curated tool registries (merge, drop, rewrite descriptions)
    • Dynamic tool loading
    A tool registry that merges twins, drops unused tools and rewrites descriptions, giving a short list of tools with owners and versions
  5. Part 5

    Context Management

    • Bounding tool output (size caps, head-and-tail truncation)
    • Clearing stale tool results
    • Compaction (summarization vs. sliding window)
    Clearing old results: before and after views of a context, where old results become pointers and the latest results stay
  6. Part 6

    Agent Memory

    • Single-file memory and fact extraction
    • Dreaming: offline consolidation (merge, replace, expire)
    • From notes to a linked wiki
    • A small index loaded every session, with notes read on demand
    A wiki of linked notes, with a small index file that maps it
  7. Part 7

    Retrieval

    • One-shot RAG and where it fails
    • Agentic search inside the loop (just-in-time retrieval)
    Search inside the loop: the agent retrieves from the docs just in time, between tool calls, before it answers
  8. Part 8

    The Production Harness, End to End

    • The whole harness, in one picture
    • A tip for each part
    The whole harness in one picture: model, loop, context, tools, memory and retrieval around a small context
  9. Part 9

    Live Q&A

    Q and A

Meet Your Instructor

Ali Aminian

Ali Aminian

AI Engineer · Google, Adobe

Ali has built ML systems at Google and led Firefly work at Adobe as a tech lead. He built Comfo (acquired), facilitates courses at Stanford, and teaches AI Engineering Fundamentals on ByteByteGo Live.

Bestselling books

  • Best SellerCover of Machine Learning System Design Interview

    Machine Learning System Design Interview

    with Alex Xu

  • Best SellerCover of Generative AI System Design Interview

    Generative AI System Design Interview

    with Hao Sheng