Topic · LLM Applications and Agents

Harness: everything around the model that makes an agent

Everything outside the model: the agent loop, context engineering, tools and MCP, skills, hooks, sandboxes, permissions, memory, durable execution, evaluation and observability.

Notes

01

The agent loop and a minimal RAG

Published

Writing an agent loop by hand: what does it need at a minimum?

An agent loop of about 200 lines on the Anthropic Messages API, without a framework: when the loop stops, why a failed or declined tool call goes back to the model with is_error, and how to run several tool calls from one turn. Five experiments with Claude Haiku 5.5 record the token counts, how the model recovered from errors, and one claim of mine they proved wrong.

  • Agent loop
  • Tool use
  • Anthropic API
  • Python
Read entry