Agents & Tools

Cache expensive tools, pause for approval, hand conversations between agents, keep long chats inside the context window, fall back to another model, give tools per-request deps, load skills from SKILL.md.

+++ 10 recipes +++

Cache Tool Resultseasy5 minA tool calls a slow or paid API, and agents keep asking for the same thing. You want repeated calls served from a cache with a TTL.Human Approval for Toolsmedium10 minSmall refunds can go through automatically, but anything over $100 needs a person to approve it — without blocking a server thread while they decide.Agent Handoffsmedium10 minA front-desk agent should route each customer to the right specialist — billing or tech support — and let that specialist answer.Long Conversationsmedium10 minA conversation has outgrown the model’s context window. You want to know how full it is and compress it before the request fails.Model Registry & Pricingeasy5 minYou want to pick a model by capability and price — tool support, vision, context size — and estimate what a run will cost.Typed Decisions with Probabilitieseasy5 minYou need a yes or no, one of a few options or a level on a scale, with how sure the model is, and you do not want to parse prose to get it.Structured Tool Resultseasy5 minYour tools return structured data, documents and long logs, and you want the model to read them well without one huge result filling its context.Fall Back to Another Modeleasy5 minYour provider has an outage, the account runs out of credits or a model is retired, and every run fails with it. You want the turn answered by another model instead.Give Tools Per-Request Dependencieseasy5 minOne agent serves many users, and its tools need each request's database client or signed-in user. Putting them in the prompt leaks them to the model, closures do not work for a shared agent.Give an Agent Skills from SKILL.mdeasy10 minYou keep instructions for recurring tasks (release notes, reviews, deploys) as Agent Skills folders, and want an agent to load one only when a task needs it instead of carrying them all in its prompt.