Kestrel docs
Kestrel gives AI agents their own keys to a wallet you own, with limits the contract enforces on every call.
Overview
A Kestrel account is a small contract you own. You fund it and add agents. Each agent is an address with its own policy: a daily HYPE budget, daily budgets for up to eight tokens, the list of contracts it may call, and an end date. You can pause one agent, all agents, or revoke a key at any time.
How limits are enforced
An agent acts only through agentCall(target, value, data). The account checks, in order:
- the caller is an active agent, not past its end date, and the account isn't paused;
- the target is on that agent's list and isn't the account itself;
- if the call is an approval (
approve,increaseAllowance,setApprovalForAll, Permit2approve), the spender is on the agent's list too.
Then it reads the account's HYPE and every budgeted token, makes the call, and reads them again. The net outflow is added to that day's spend; if it goes over the budget, the whole call reverts. Days start at 00:00 UTC.
Because spend is measured by balances, the account doesn't need to understand each protocol: a swap counts what left, not what came back in, and a call that drains funds stops at the budget.
Connecting an agent (MCP)
Download kestrel-mcp.mjs, run npm i viem in its folder and add it to your MCP client:
{
"mcpServers": {
"kestrel": {
"command": "node",
"args": ["/full/path/kestrel-mcp.mjs"],
"env": { "KESTREL_ACCOUNT": "0x…", "KESTREL_AGENT_KEY": "0x…" }
}
}
}Tools: kestrel_status (budgets left, balances, expiry), kestrel_send_hype, kestrel_send_token and kestrel_call (any contract on the list, by Solidity signature and arguments). Refusals come back in words: over budget, not on the list, paused, expired.
The agent pays its own gas; 0.05 HYPE covers hundreds of calls. The app can generate the agent key in your browser and show it once.
Fees
| What | Fee |
|---|---|
| Creating an account | 0.05 HYPE to the treasury |
| Anything an agent spends | none |
| Fee cap | 1 HYPE, written in the factory |
Safety and risks
- A leaked agent key can spend at most that agent's budget for the day, only to listed contracts. Revoke it from the app.
- Contracts you list are trusted with what the agent can send them. A malicious listed contract can take what you allow it.
- Tokens without a budget aren't measured. Don't list a token contract as a target unless you also give it a budget.
- The owner key controls everything: keep it in a hardware wallet or a Safe.
- No external audit yet. Tests cover budgets, fuzzed spending, approval checks, expiry, pause and drain attempts.
Contracts
Elysium mainnet, chain 99901.
| Contract | Address | What it does |
|---|---|---|
| Kestrel factory | deployed at launch | Creates accounts (minimal clones). Has no power over them. |
Token
$KSTRL. Every fee the contracts collect goes to the treasury, which buys $KSTRL back and burns it.
