Type: url

Original: https://simonwillison.net/guides/agentic-engineering-patterns/how-coding-agents-work/

Status: generated

Summary

A guide chapter explaining the machinery under a coding agent: the agent is a harness around a language model, extending it with invisible prompts and callable tools. It walks through tokens and pricing, the chat-templated prompt that simulates a conversation over a stateless completion engine, the cached-prefix pricing that makes agents avoid rewriting earlier conversation, how a tool call is expressed in the prompt and its result fed back, the hidden system prompt, and reasoning as spending extra tokens before replying — concluding that an agent is little more than a model, a system prompt and tools in a loop.

Generated pages