averagejoeslab

Building Agents — AI skill for Claude Code

AI community

Agent = Harness(Model).

How to install Building Agents

This entry records only its repository, not the path inside it, so there is no exact command to give. Open averagejoeslab/building-agents and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Building Agents does

Agent = Harness(Model). A hands-on course in harness engineering: build an AI agent from five primitives, harden it for production, and take apart real harnesses like Claude Code and Codex.

Alternatives in AI

  • Ante — Ghost in your shell 1.9k ★
  • Mancode — AI coding agent harness 358 ★
  • Claudecode Harness — Production-grade orchestration harness for Claude Code — Context discipline, subagents, and multi-model consen 223 ★

README

Building agents

By **[Chase Dovey](https://cdovey.dev/)** · [Average Joes Lab](https://github.com/averagejoeslab)

An agent has two parts: **a model** and **a harness**.

**Agent = Harness(Model)**

The model

A model predicts. Tokens go in, it returns the most probable next token, and that token is added to the input. It repeats until it predicts ``, the end-of-sequence token.

            ┌──────────── append ◄────────────┐
            ▼                                 │
TokensIn ─► Model ─► most probable next token ─┤
                                               │
                                     is it ? ── yes ─► TokensOut

**TokensOut = Model(TokensIn)**

That's all it does.

The harness

The harness is everything else. It's been called a framework, a scaffold, a runtime and an orchestration layer, and the industry has mostly settled on *harness*.

Think of the model as an engine. On its own, it just turns. The harness is the rest of the vehicle: it's what makes the engine go somewhere.

Every harness does five things. These are its primitives:

Primitive What it does
Input captures what comes in
Context assembles the minimum the model needs to act well on this input
Model interface requests a response from the model
Output handles the response: shows it, or runs it as a tool
Control flow decides what happens next: go again, hand back, or stop
┌──────────────────────── control flow ─────────────────────────┐
│                                                                │
│  input ─► context ─► model interface ─► output ─┬─► person     │
│    ▲                    (the model)              │             │
│    └────────────────── a tool's result ──────────┘             │
└────────────────────────────────────────────────────────────────┘

Building quark

A quark is one of the smallest particles there is. **quark** is the smallest agent: the five primiti