explaingit

tvytlx/ai-agent-deep-dive

5,693PythonAudience · researcherComplexity · 2/5Setup · easy

TLDR

A collection of research PDFs (written in Chinese) that analyze the internal architecture of production AI agents like Claude Code, plus a minimal Python teaching agent that shows the core agent loop in as few lines as possible.

Mindmap

mindmap
  root((ai-agent-deep-dive))
    Research PDFs
      Claude Code analysis
      Hermes Agent analysis
      Written in Chinese
    Teaching agent
      Minimal Python agent
      Fake model stub
      Skill discovery
    Core concepts
      Agent loop
      Tool calling
      CLI interface
    Setup
      Poetry install
      Command-line run
Click or tap to explore — scroll the page freely

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

Things people build with this

USE CASE 1

Study how production AI agents like Claude Code are structured internally by reading the analysis PDF reports

USE CASE 2

Use the minimal Python teaching agent to understand the core agent loop before writing your own

USE CASE 3

Swap a real LLM API call into the fake model stub to extend the teaching agent with actual AI responses

USE CASE 4

Learn the tool discovery and skill-calling pattern for AI agents from a deliberately simple working example

Tech stack

PythonPoetry

Getting it running

Difficulty · easy Time to first run · 30min

The PDF reports are written in Chinese, the teaching agent uses a fake model stub rather than a real LLM connection.

In plain English

AI Agent Deep Dive is a repository containing written research reports that analyze the source code of AI agent systems in depth. The main deliverable is a series of PDF documents that walk through how specific agents are built under the hood, including an analysis of Claude Code and a separate deep-dive on the Hermes Agent. The reports are written in Chinese and targeted at developers who want to understand the internals of production-grade AI agents, not just use them as black boxes. Alongside the PDF reports, the repository also includes a small teaching project: a minimal Python AI agent built for learning purposes. The goal of this teaching agent is to show, in as few lines of code as possible, what the core structure of an AI agent looks like. It covers the main agent loop, a skills discovery mechanism that lets the agent find and call tools, and a command-line interface. The code deliberately avoids engineering complexity so the structure stays readable. The current teaching implementation uses a fake stand-in for an AI model rather than connecting to a real one. Whatever text the user types in, the fake model echoes back a test response. This design makes it straightforward to later swap in a real model API call without rewriting the rest of the agent. Instructions in the README walk through installing dependencies with Poetry and running the agent from the command line. The repository is framed as educational material. It does not provide the original source code of the agents it analyzes, only the analysis documents themselves.

Copy-paste prompts

Prompt 1
Using the ai-agent-deep-dive teaching agent as a starting point, help me replace the fake model stub with a real Anthropic API call.
Prompt 2
How does the skills discovery mechanism work in the ai-agent-deep-dive teaching agent? Show me the relevant code.
Prompt 3
I want to build my own AI agent based on the ai-agent-deep-dive pattern. What is the minimal structure I need for a working agent loop in Python?
Prompt 4
Walk me through what the ai-agent-deep-dive Claude Code analysis PDF identifies as the key components of Claude Code's agent loop.
Open on GitHub → Explain another repo

← tvytlx on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.