Show HN: Tokencap – Token budget enforcement across your AI agents (github.com) AI
Tokencap is a Python library for tracking token usage and enforcing per-session, per-tenant, or per-pipeline budgets across AI agents. It works by wrapping or “patching” Anthropic/OpenAI SDK clients to warn, automatically degrade to cheaper models, or block calls before they consume additional tokens. The project emphasizes running in-process with minimal setup (no proxy or external infrastructure) and supports common agent frameworks like LangChain and CrewAI.
April 04, 2026 23:21
Source: Hacker News