Build your own AI agent harness
The loop that turns a chat model into an agent that uses tools, safely.
Every coding assistant, support bot and “agent” product runs a loop like this: Claude Code, Cursor, ChatGPT with tools. The model only writes text; the harness is what actually runs the tools and keeps it on a leash.
About 100 minutes across 5 stages. Skills: Parsing model output, Tool dispatch, Input validation, Budgets and loop detection.
The guides are part of licode Club.
Stages
- Turn each model reply into a structured call or answer.
- Run each tool and stop at the answer.
- Validate arguments against each tool’s schema.
- Cap the number of tool calls.
- Detect a stuck model and print a run report.