> ## Documentation Index
> Fetch the complete documentation index at: https://agent-harness101.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Build an agent harness

> Understand the system around the model, one question at a time.

A language model can reason about a task. To work on a real codebase, it also needs tools, context, a plan, and a way to decide what happens next. That surrounding system is the **agent harness**.

This open-source guide builds an architecture through questions and answers. Each topic starts with a limitation, weighs the trade-offs, and introduces a component only when the simpler design breaks.

> [!NOTE]
>
> This is a system-design exercise inspired by Claude Code, **not** a description of its confirmed internals. Published figures retain their sources and caveats; worked examples are labelled illustrative.

## Start learning

> [card] [Start the walkthrough](https://agent-harness101.com/tools/repository-access.md)
>
> Why isn't a user and a model enough? Begin with repository access.

> [card] [Explore the learning path](https://agent-harness101.com/learning-path.md)
>
> Fourteen topics covering tools, context, cost, planning, subagents, and synthesis.

## Tool design deep dive

[Essential tools](https://agent-harness101.com/tools/essential-tools.md) answers which tools a basic coding agent needs, and compares them with Claude Code and Grok Build. [Reading large files](https://agent-harness101.com/advanced/reading-large-files.md) shows how an agent can inspect files that are too large for its context, with a proposed read contract and a worked investigation.

## The mental model

Tools let the model act. The harness coordinates context, execution, and the next decision.

```mermaid theme={null}
flowchart TD
  Request["User request"] --> Loop["Agent loop"]
  Context["Context + task state"] --> Loop
  Loop --> Model["Language model"]
  Model --> Control["Authorization + sandbox"]
  Control --> Tools["Read / edit / run"]
  Tools --> Observation["Observe the result"]
  Observation --> Loop
```

## How the guide works

**1. Ask a question**

Start with the limitation of the current design.

**2. Understand the trade-off**

Read the explanation and diagram. Keep source-specific numbers and caveats in context.

**3. Add the next component**

Close with a concrete design decision, then follow the next question.

## Check the evidence

The [sources page](https://agent-harness101.com/sources.md) distinguishes documented features, observations, third-party results, and illustrative reasoning. Preserve those distinctions when reusing or contributing to the guide.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.