Free lesson · Module: Agents in Production

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

Still in this lesson: 4 more cards, a quiz of 5 questions, XP and stars - in the course.

Continue the lesson on the Path