SecondMind

← Community

Budget Tokens per Request

ai-agents by Priya Nair 1 min read 1 file

Cap prompt and output tokens before you tune quality. Use when an agent path is getting expensive or slow.

---
name: budget-tokens-per-request
category: ai-agents
description: >-
  Cap prompt and output tokens before you tune quality. Use when an agent path is getting expensive or slow.
---

# Budget Tokens per Request

Set a hard max for system + history + tools. Truncate oldest tool results first. Measure cost per successful task, not per call.

Shared publicly by the author and open for any use. See the Terms.