Production Hardening
Keeping costs in check
An agent without limits is an open faucet: one run stuck in a loop can drain a day’s budget. The minimum: caps on turns per task and tokens per session, plus a daily limit per person. Send simple steps to a cheaper model. And turn on prompt caching: the system prompt and tool descriptions repeat in every call and cost almost nothing from the cache.
Guardrails: permissions for tools
Sort tools by how much you trust them. Reading: free. Writing: only to allowed folders. Anything dangerous, like deleting, money, or emails to outsiders, happens only after a person says yes. A support agent has no business deleting database tables, however convenient. These rules live in code and hooks from the lesson “Harness & SDK,” not in a paragraph of the prompt.
More on Way of the Agent
- Course programThe first three modules are free: start in the browser or the app, no card needed.
- Daily drill casesReal situations from building agents - with the answer and why.
- Library: guides, skills and promptsReady prompt templates, grouped into collections.
- AI ChroniclesSourced stories from the history of AI.
- ConceptsPlain-language explainers of agent engineering.
- Learn AI agentsApps and courses for learning AI agents, compared honestly.
Still in this lesson: 4 more cards, a quiz of 5 questions, XP and stars - in the course.
Continue the lesson on the Path