Allocate Budget
Allocate budget from treasury to an agent.cURL
Request Body
string
required
Agent UUID receiving the allocation
number
required
Amount to allocate in lamports (must be positive)
string
default:"treasury allocation"
Reason for allocation (1-256 characters)
string
Optional source agent UUID (if reallocating from another agent)
Response
string
required
Unique allocation identifier
string
required
Target agent UUID
string
Source agent UUID (if provided)
number
required
Allocated amount
string
required
Allocation reason
string
required
ISO 8601 timestamp
Rebalance Budget
Rebalance budget between two agents.cURL
Request Body
string
required
Agent UUID to transfer budget from
string
required
Agent UUID to transfer budget to
number
required
Amount to transfer in lamports (must be positive)
string
default:"treasury rebalance"
Reason for rebalance (1-256 characters)
Response
string
required
Unique rebalance identifier
string
required
Source agent UUID
string
required
Target agent UUID
number
required
Transferred amount
string
required
Rebalance reason
string
required
ISO 8601 timestamp
Agent Budget Operations
Agent budgets are tracked and enforced automatically:Get Agent Budget
See Agent Budget API for retrieving current budget and spending.Budget Enforcement
Budgets are enforced at transaction execution:- Check available budget before transaction
- Deduct from budget on successful transaction
- Reject if insufficient budget remaining
- Reset daily spending at midnight UTC
Treasury Workflows
Initial Setup
1
Create Agents
Create agents with initial budgets:
2
Allocate Additional Budget
Add more budget as needed:
3
Monitor Spending
Track budget usage:
Performance-Based Rebalancing
1
Review Agent Performance
Check transaction success rates and profitability via audit events:
2
Rebalance Budgets
Shift budget from underperforming to high-performing agents:
3
Update Capabilities
Adjust agent capabilities based on performance:
Budget Constraints
Transaction Execution
When an agent executes a transaction:-
Budget Check:
-
Policy Evaluation:
- Spending limits
- Protocol restrictions
- Risk thresholds
-
Execution:
- Transaction submitted
- Budget updated on confirmation
-
Daily Reset:
spentLamportsTodayresets at midnight UTC- Total
budgetLamportspersists
Audit Trail
All treasury operations are logged to audit events:treasury.allocatetreasury.rebalanceagent.budget.updatedagent.budget.exceededagent.budget.reset
Best Practices
Set conservative initial budgets and increase based on performance
Monitor daily spending to detect anomalies early
Use descriptive reasons for all allocations and rebalances
Implement budget alerts when spending exceeds thresholds
Review budget usage regularly via audit events
Coordinate with policy limits - budgets and policies work together
Example: Multi-Agent Treasury
Transaction Types
Treasury operations can be executed via:- Direct API calls (shown above)
- Agent execution with
treasury_allocateortreasury_rebalancetransaction types - CLI commands: