@humbleaf/eliza-plugin
v0.1.0
Published
Bounded authority for autonomous agents. Policy-gated actions with receipts and approval-aware behavior for ElizaOS.
Downloads
152
Maintainers
Readme
@humbleaf/eliza-plugin
Give Eliza agents bounded authority for rewards, payments, and other risky actions.
Let ElizaOS agents issue rewards, refunds, or other risky actions with policy gates, receipts, and approval-aware behavior. Your agent knows its spending limits and communicates them to users.
Quick Start (5 minutes to first blocked action)
1. Install
pnpm add @humbleaf/eliza-plugin @humbleaf/agentchain-sdk2. Add plugin to your agent
import { agentchainPlugin } from '@humbleaf/eliza-plugin';
const agent = {
plugins: [agentchainPlugin],
settings: {
AGENTCHAIN_API_KEY: process.env.AGENTCHAIN_API_KEY,
AGENTCHAIN_AGENT_ID: process.env.AGENTCHAIN_AGENT_ID,
},
};3. Run reward — small amount → Released ✓
User: "Send 50 USDC reward to 0xAlice for the bug fix"
Agent: ✓ Reward of 50 USDC sent to 0xAlic…lice. Receipt: rcpt_abc123 Settlement: Released
4. Run reward — large amount → Pending Approval ⏳
User: "Send 5,000 USDC reward to 0xBob for the integration"
Agent: ⏳ I can't send 5,000 USDC directly — my policy limit is 500 USDC per action.
I've submitted an approval request. A human operator can approve it here: https://dashboard.agentchain.xyz/approve/rcpt_def456
Alternatively, I can issue a smaller reward up to 500 USDC without approval.
5. Run reward — duplicate → Denied ✗
User: "Send 50 USDC reward to 0xAlice for the bug fix"
Agent: ✗ I can't issue that reward. Reason: A similar reward was already issued recently.
No value was moved. This prevents accidental double-payments.
6. Open dashboard → See all receipts
All three results appear as verifiable receipts in your AgentChain dashboard.
What's Included
| Component | Description |
|---|---|
| settledRewardAction | Policy-gated reward/payment action with human-readable responses |
| budgetProvider | Injects spending limits into agent context ("I can offer up to $500") |
| receiptProvider | Injects agent identity and receipt awareness |
Budget-Aware Agent
The budgetProvider injects spending limits directly into the agent's context, so it can proactively communicate its authority:
Agent: "I can offer up to $500 without approval. For larger amounts, I'll submit an approval request."
This feels like bounded authority — not simple rejection.
Human-Readable Refusals
When actions are denied, the agent explains why and suggests alternatives:
| Denial Reason | Agent Response | |---|---| | Unknown wallet | "The recipient wallet needs to be added to the approved list first." | | Budget exhausted | "The campaign budget is exhausted. Ask an operator to allocate more." | | Duplicate action | "A similar reward was already issued recently." | | Over limit | "Try a smaller amount or request approval." |
Example Character
See characters/reward-agent.json for a complete example character configuration.
License
MIT
