Agent Registry
Register AI agent wallets with USDC spending caps. Once registered, an agent calls agentPay() from its own wallet to send USDC autonomously — no manual approval per payment — as long as it stays within its cap.
Use cases
AI trading bots that pay fees autonomously. Subscription services billed by an agent. Autonomous payroll agents. DeFi bots that need to pay for gas or services. Any AI system that needs on-chain payment authority without a human in the loop.
How it works
The owner registers the agent wallet with a label and USDC budget cap, then deposits USDC into the contract treasury. The agent calls agentPay(recipient, amount) from its own wallet; the contract checks the agent is active and within its cumulative cap before releasing funds.
Owner-only actions
Register Agent and Fund Treasury require the contract deployer wallet — only the owner can whitelist agents or fund the treasury. Regular users can view registered agents but cannot modify them.
agentPay interface
modifier onlyActiveAgent() {
require(agents[msg.sender].active, "Flux: agent not registered");
_;
}
// Called by the agent's own wallet, not the owner.
function agentPay(address recipient, uint256 amount) external onlyActiveAgent {
Agent storage a = agents[msg.sender];
require(a.spent + amount <= a.budgetCap, "Flux: budget exceeded");
require(recipient != address(0), "Flux: zero recipient");
a.spent += amount;
// transfers amount from the contract's treasury to recipient
}Budget cap
The budget cap is cumulative — once an agent has spent its full cap, it cannot make further payments. The owner must register a new agent or raise the cap via updateAgent(). This is intentional: it limits blast radius if an agent is compromised.
Contract
Agents are handled by FluxSettlement.registerAgent(), updateAgent(), and agentPay(). Full ABI and events are in the Reference page.