whatisgithub

What is ai-agent-architecture?

drobiazkin/ai-agent-architecture — explained in plain English

Analysis updated 2026-05-18

24HTMLAudience · developerComplexity · 3/5LicenseSetup · easy

In one sentence

A free, open engineering book and course teaching how LLM systems and AI agents actually work, from tokenization to self-hosting models.

Mindmap

mindmap
  root((AI Agent Architecture))
    What it does
      Engineering book
      Companion course
      Pattern language
    Tech stack
      Markdown
      Mermaid diagrams
      Python
    Use cases
      Learn LLM internals
      Build agents
      Self-host models
    Audience
      Distributed systems engineers
      AI developers
    License
      CC BY-SA text
      MIT code

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Read a structured, mechanism-focused explanation of how LLMs and AI agents actually work.

USE CASE 2

Follow the companion course's nine modules to build a working RAG and agent system by hand.

USE CASE 3

Learn how to fine-tune and self-host an open language model on your own hardware.

USE CASE 4

Build a single-file HTML or PDF version of the book locally using the included build scripts.

What is it built with?

MarkdownHTMLMermaidPython

How does it compare?

drobiazkin/ai-agent-architectureddekadt/my580_agentic_aiiranee/fnos-hermes-agent
Stars242424
LanguageHTMLHTMLHTML
Setup difficultyeasyeasymoderate
Complexity3/51/53/5
Audiencedeveloperresearcherops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Reading the Markdown chapters needs no setup, building HTML or PDF versions requires the included build tools.

The book's text can be shared and adapted with credit as long as any reworked version stays under the same license, while the code is fully free to reuse under MIT.

So what is it?

This repository is a free, openly published engineering book and companion course about how large language model systems and AI agents actually work under the hood, written by a single author, Aleksandr Drobiazkin, in both English and Russian editions. It is not a collection of prompt writing tips. Instead it aims to teach engineers the underlying mechanisms, costs, and tradeoffs involved in building and running these systems themselves, so they are not entirely dependent on renting access to a handful of hosted AI providers. The book is organized into eight parts and twenty six chapters, covering topics like how text gets broken into tokens, how attention and different model architectures work, prompt and context design, retrieval augmented generation and its many variations, how AI agents are built as a kind of distributed system, integrating with tools through the Model Context Protocol, running these systems in production including security and cost concerns, and finally how to fine-tune, deploy, and even pre-train models on one's own hardware. Every major idea in the book follows a consistent template describing the context, the problem, the tradeoffs, the solution, a worked example, and related patterns, a structure borrowed from established software design pattern writing. The material is aimed at engineers who already understand distributed systems concepts and want to treat language models and agents as another architectural component to reason about rather than as something mysterious. Readers can browse the book chapter by chapter as plain text files in the repository, or build a single combined web page or PDF version themselves using the included build tools. A separate, practical companion course walks through building a real system across nine hands-on modules, from running a model on your own hardware through retrieval, agents, evaluation, and fine-tuning. The book's written text is released under the CC BY-SA 4.0 license, meaning it can be shared and adapted as long as credit is given and any reworked version is shared under the same terms, while the accompanying code in the repository is released separately under the MIT license. The author funds ongoing revisions through voluntary cryptocurrency donations rather than a paywall or subscription.

Copy-paste prompts

Prompt 1
Summarize what Part IV of this book teaches about designing AI agents as distributed systems.
Prompt 2
Help me follow the companion course module on running a local model and building basic RAG.
Prompt 3
Explain the pattern template this book uses so I can read a chapter and extract its key mechanism.
Prompt 4
Walk me through building the single-file HTML version of the book using the tools in build/.

Frequently asked questions

What is ai-agent-architecture?

A free, open engineering book and course teaching how LLM systems and AI agents actually work, from tokenization to self-hosting models.

What language is ai-agent-architecture written in?

Mainly HTML. The stack also includes Markdown, HTML, Mermaid.

What license does ai-agent-architecture use?

The book's text can be shared and adapted with credit as long as any reworked version stays under the same license, while the code is fully free to reuse under MIT.

How hard is ai-agent-architecture to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is ai-agent-architecture for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.