Home

Harness, Loop & Graph Engineering Labs

This site publishes the self-contained Python lab snapshots from prwani/harness-engineering-labs for building an agent harness from a bare model call through tool loops, planning, memory, observability, background agents, loop engineering, and graph orchestration.

Each lab is a standalone snapshot — copy or download any one independently and run its checks from inside its directory with pytest checks/. Snapshots do not import from one another.

Start with the track guide and Lab 0 — Setup, then work through the labs in order. From Lab 2A on, you use your harness to build and extend a small pet-store practice app, the same app as in the Claude Code track. See the full Lab Outline for the mental model, design principles, and detailed rationale behind the course.

Labs

# Lab Focus
0 Setup, dual API, and scorecard Entra configuration, dual model adapters, usage ledger, store simulator
1 Bare model call Stateless bare call, StoreHealthReport envelope, deterministic scorecard grading
2A Tool loop and unrestricted CLI tools Tool loop with file, test, Git, Azure CLI, and shell tools; build the practice app
2B Tool hooks and command policy Built-in policy, project hooks, scoped rules, paired denials
3 History and sessions Named, continued, resumed and forked JSONL sessions; harness sessions
4 Planning and todos Read-only plan mode, write_todos, human /execute switch
5 File memory and access User, project and local HARNESS.md memory; /memory, /init
6 Tool approval and safety gates Allow, ask and deny permission rules; --accept-edits; harness permissions
7 Observability and prompt caching JSONL trace events, harness trace timings, tokens, cache and cost
8 Agent skills and tool scaling On-demand SKILL.md skills; stdio MCP servers via harness mcp
9 Subagents and background agents .harness/agents subagents; harness ask --bg in git worktrees
10 Context and compaction /compact, /clear, --compact-at, ranged read_file
11 Loops with a stop condition stop hooks with bounded retries, --max-iterations
12 Graphs: routing between specialised agents harness route: classifier and tool-restricted specialists
13 Capstone: planner, generator, evaluator harness pge: plan, human gate, generate, fresh evaluator, revisions
14 Cross-harness comparison Same task in two harnesses; harness trace, harness features

Repository map