Skip to content

axonfi/plugin-elizaos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@axonfi/plugin-elizaos

ElizaOS plugin for Axon — agentic finance with secure vaults for AI agents.

Installation

npm install @axonfi/plugin-elizaos @axonfi/sdk

Prerequisites

Before using this plugin, you need an Axon vault with a registered bot:

  1. Deploy a vault — Go to app.axonfi.xyz, connect your wallet, and deploy a vault on your target chain. The vault is a non-custodial smart contract — only you (the owner) can withdraw funds.

  2. Fund the vault — Send USDC (or any ERC-20) to your vault address. Anyone can deposit directly to the contract.

  3. Register a bot — In the dashboard, go to your vault → Bots → Add Bot. You can either:

    • Generate a new keypair (recommended) — the dashboard creates a key and downloads an encrypted keystore JSON file. You set the passphrase.
    • Bring your own key — paste an existing public key if you manage keys externally.
  4. Configure policies — Set per-transaction caps, daily spending limits, velocity windows, and destination whitelists. The bot can only operate within these bounds.

  5. Get the bot key — Your ElizaOS agent needs the bot's private key to sign payment intents. Decrypt the keystore or use the raw private key.

The vault owner's wallet stays secure — the bot key can only sign intents within the policies you configure, and can be revoked instantly from the dashboard.

Configuration

Add these environment variables (or character settings):

Variable Required Description
AXON_BOT_PRIVATE_KEY Yes Bot's private key (EIP-712 signer)
AXON_VAULT_ADDRESS Yes Axon vault contract address
AXON_CHAIN_ID Yes Chain ID — use Chain.Base (8453), Chain.ArbitrumOne (42161), or Chain.BaseSepolia (84532) from @axonfi/sdk
AXON_RELAYER_URL No Relayer URL (defaults to https://relay.axonfi.xyz)

Usage

import { axonPlugin } from '@axonfi/plugin-elizaos';

const agent = new AgentRuntime({
  // ...
  plugins: [axonPlugin],
});

Actions

Action Description Example
AXON_SEND_PAYMENT Send token payments "Send 50 USDC to 0xabc..."
AXON_SWAP_TOKENS In-vault token swaps "Swap 100 USDC to WETH"
AXON_EXECUTE_PROTOCOL DeFi protocol calls Requires structured input
AXON_CHECK_BALANCE Check vault balance "What's my balance?"
AXON_X402_PAYMENT Handle HTTP 402 paywalls "Handle this x402 header: eyJ4..."

Provider

AXON_VAULT_CONTEXT — Automatically injects vault balance and status into the agent's context on every message (cached 30s).

How It Works

The plugin is a thin adapter between ElizaOS and @axonfi/sdk. Your bot signs EIP-712 intents — the Axon relayer validates, simulates, and submits transactions on-chain. The bot never needs ETH for gas.

Agent receives message → Action extracts params → SDK signs EIP-712 intent
→ Relayer validates + executes → txHash returned to conversation

Supported Chains

Mainnet

Chain ID Status
Base 8453 Live
Arbitrum One 42161 Live
Ethereum 1 Coming soon

Testnet

Chain ID Status
Base Sepolia 84532 Live
Arbitrum Sepolia 421614 Live

Links

License

MIT

About

ElizaOS plugin for Axon — payments, swaps, and DeFi execution for AI agent characters

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors