# How to Access the Book's Prose Content in the AI Agent Book Repository

> Easily access AI Agent Book prose content from the bojieli/ai-agent-book repository. Learn how to retrieve Markdown files via GitHub URLs, local clones, or Python scripts.

- Repository: [Bojie Li/ai-agent-book](https://github.com/bojieli/ai-agent-book)
- Tags: getting-started
- Published: 2026-08-22

---

**The bojieli/ai-agent-book repository stores all prose content as plain-text Markdown files in language-specific directories like `book-en/`, accessible via direct GitHub URLs, local clone, or Python scripts.**

To access the book's prose content, navigate to the `book-en/` directory (or translated equivalents) within the bojieli/ai-agent-book repository. The project maintains narrative chapters as individual `.md` files, allowing readers to consume content directly through GitHub's interface or local Markdown viewers. This structure separates the English source text from Spanish, Korean, Chinese, and other localized versions organized in parallel folder hierarchies.

## Repository Structure for Prose Content

The repository organizes narrative content through a predictable directory layout that separates entry points, chapter sequences, and localization assets.

### Main Entry Point

The root-level **[`index.md`](https://github.com/bojieli/ai-agent-book/blob/main/index.md)** file serves as the primary navigation anchor and contains the book's front-matter, table of contents, and introductory prose. This file provides hyperlinks to individual chapters and outlines the overall structure of the AI Agent Book.

### English and Translated Chapters

Core narrative chapters reside in language-specific directories following a consistent naming convention:

- **English prose**: Stored in `book-en/` as [`chapter01.md`](https://github.com/bojieli/ai-agent-book/blob/main/chapter01.md), [`chapter02.md`](https://github.com/bojieli/ai-agent-book/blob/main/chapter02.md), and sequential files.
- **Spanish translation**: Located in `book-es/` (e.g., [`chapter01.es.md`](https://github.com/bojieli/ai-agent-book/blob/main/chapter01.es.md)).
- **Korean translation**: Located in `book-ko/` with corresponding chapter files.
- **Chinese translation**: Located in `book-zh/` with Mandarin prose content.

Each chapter file contains the full narrative text for that section in plain Markdown format, free of binary encoding or proprietary formatting.

### Supplementary Materials

Additional explanatory notes, code snippets, and experiment details reside in the **`extras/`** directory. This folder contains supporting assets such as [`site-nav-i18n.json`](https://github.com/bojieli/ai-agent-book/blob/main/site-nav-i18n.json) for internationalization metadata and other configuration files that support the book's presentation layer.

## Manual Access Methods

You can view the prose directly through GitHub's web interface or by cloning the repository for offline reading.

### Browsing on GitHub

Navigate to `https://github.com/bojieli/ai-agent-book` and open the `book-en/` folder. Click any `chapter*.md` file to render the Markdown directly in your browser. GitHub's interface displays the formatted prose without requiring local downloads.

### Local Clone and Reading

For offline access or editing, clone the repository and open files in any text editor or Markdown viewer:

```bash
git clone https://github.com/bojieli/ai-agent-book.git
cd ai-agent-book

```

Once cloned, open [`index.md`](https://github.com/bojieli/ai-agent-book/blob/main/index.md) or any file within `book-en/` using VS Code, Typora, or command-line tools like `less`. The plain-text format ensures compatibility with all standard reading applications.

## Programmatic Extraction of Book Text

To access the book's prose content for automated processing, LLM ingestion, or text analysis, enumerate the chapter files using Python's `pathlib` module:

```python
import pathlib

# Choose the language folder (e.g., "book-en")

root = pathlib.Path(__file__).parent / "book-en"

# Collect all chapter markdown files

chapters = sorted(root.glob("chapter*.md"))

# Concatenate the prose

book_text = "\n\n".join(ch.read_text(encoding="utf-8") for ch in chapters)

print(book_text[:500])   # preview the first 500 characters

```

This script targets the `book-en` directory, identifies all files matching the `chapter*.md` pattern, and concatenates their contents into a single string with UTF-8 encoding preserved. Modify the `root` path to `book-es`, `book-ko`, or `book-zh` to extract translated prose instead.

## Summary

- The prose content lives in **`book-en/`** (English) and parallel language directories (`book-es/`, `book-ko/`, `book-zh/`), not in a single monolithic file.
- **[`index.md`](https://github.com/bojieli/ai-agent-book/blob/main/index.md)** at the repository root provides the table of contents and entry point for navigation.
- All content uses **plain-text Markdown**, ensuring portability across reading applications and programming languages.
- The **`extras/`** directory contains supplementary metadata and internationalization assets, not primary narrative content.
- **Python scripts** can enumerate `chapter*.md` files via `pathlib.Path.glob()` to concatenate chapters for bulk text processing.

## Frequently Asked Questions

### Where is the English prose content located?

The English prose resides in the **`book-en/`** directory as sequentially named files like [`chapter01.md`](https://github.com/bojieli/ai-agent-book/blob/main/chapter01.md), [`chapter02.md`](https://github.com/bojieli/ai-agent-book/blob/main/chapter02.md), etc. The root [`index.md`](https://github.com/bojieli/ai-agent-book/blob/main/index.md) provides the entry point and navigation structure but does not contain the full chapter narratives.

### How do I access translated versions of the book?

Navigate to the language-specific folders at the repository root: **`book-es/`** for Spanish, **`book-ko/`** for Korean, and **`book-zh/`** for Chinese. Each follows the same chapter numbering convention as the English source, allowing you to read parallel content by switching directories.

### Can I read the book without cloning the repository?

Yes. GitHub's web interface renders Markdown files natively. Browse to `https://github.com/bojieli/ai-agent-book`, enter the `book-en/` directory, and click any chapter file to view the formatted prose directly in your browser without downloading anything.

### What file format stores the prose content?

All narrative content uses **Markdown (`.md`)** format. This plain-text encoding preserves the book's structure through simple syntax (headers, lists, emphasis) while remaining fully readable in raw text editors, ensuring maximum compatibility and longevity.