Documentation
Only the address your code sends requests to changes. Here's how TokenHawk processes each one, and the four pillars that structure the product.
How a request is processed
Request received
Your agent sends its request to the TokenHawk URL, exactly as it would to OpenAI or another provider.
Access control
GovernanceIP whitelist, model whitelist, kill switch and time windows are checked before anything else — the policies you've set on this key.
Content protection
SecurityThroughput is capped and 20+ guardrails scan the messages to mask or block sensitive data.
Optimization
OptimizationSemantic cache, system prompt and history compression, deduplicated tools — within your tier's monthly quota.
Forwarded to the LLM provider
The optimized request is sent to the provider you designated (OpenAI, Anthropic, Gemini, Mistral), using your own keys.
Response and logging
ComplianceThe response returns to your agent while usage and any blocks are logged, ready for your compliance reviews.
The four pillars
Optimization
20–60% fewer tokens, without changing your agent.
Learn moreSecurity
20+ guardrails, encryption and access control, on every request.
Learn moreGovernance
Control all your AI usage in one place
Learn moreCompliance
Helps your AI agents stay compliant with the AI Act.
Learn moreTechnical guides
Tuning a semantic cache for an LLM proxy
How a semantic cache decides a new question is close enough to an old one to reuse its answer — and why the similarity threshold is the real lever.
Why a single per-token price lies on your bill
The token count a provider bills isn't a flat rate: cache reads, cache writes and reasoning each carry their own price. Skipping the breakdown overbills some usage by a factor of 10.
Multi-turn agents: where the tokens actually go
A ReAct agent looping over tool calls sees its context grow every turn. Without history compression, a 10-turn agent's cost grows quadratically, not linearly.