Equxi Documentation
On-chain accountability infrastructure for autonomous AI agents on Solana.
Overview
Equxi is a Solana program for one narrow problem: an autonomous agent can take money or authority from someone who has no recourse. The program lets an operator lock SOL as collateral, records the terms the agent is expected to meet, and lets a designated authority move that collateral to an injured party once a violation has been confirmed.
Traditional wallets only hold funds. They cannot seize an operator's collateral when an agent misbehaves. Equxi adds four things:
- Operator bonding: Agents lock SOL as collateral before operating
- Recorded rules: Spend limits and other terms are stored on-chain with the agent
- Slashing by the config authority: After the authority confirms a violation, bond SOL moves into a program vault and the victim is paid from there. On-chain violation proofs and dispute windows are on the roadmap.
- A trust score: A value on the agent account that the authority can update. The Explorer grades bonds and paid slashes directly, not this field.
The reference program runs on devnet, and the public surfaces are the Trust Explorer, the read-only trust API at /api/trust, and the AAS-2 receipt standard.
Quick Start
Get a working agent with bond and rules in under 5 minutes.
1. Connect Your Wallet
Visit equxi.tech/app.html and connect a Solana wallet. Switch it to Devnet and fund it from the Solana faucet.
2. Register an Agent
Click + Register in the Agents tab. Give your agent a name and select its type (Trader, Oracle, DeFi, Payment, NFT, Governance, Bridge, or Custom). This creates an on-chain account at a PDA derived from the program.
3. Lock a Bond
Click + Lock SOL in the Bonds tab. Deposit SOL as collateral. The bond is the money that can be paid to a victim once the authority confirms a violation.
4. Record a Rule
Click + Add Rule in the Rules tab. The dashboard currently supports one rule type:
- Spend Limit: Maximum SOL per time period
The program account has fields for program allowlists, timelocks and velocity limits, but the dashboard does not write them yet and the program does not reject transactions that break a rule. A rule is a published term; a slash is a separate decision by the authority.
// Your agent is now live on Solana devnet
// Rules are recorded on-chain
// A violation confirmed by the authority can be slashed
SDK Installation
For programmatic access to Equxi from TypeScript or JavaScript:
npm install @equxi/sdk @solana/web3.js @coral-xyz/anchor
Or clone the repository and build from source:
git clone https://github.com/thesithunyein/equxi.git
cd equxi/sdk
npm install
npm run build
import { EquxiClient } from "@equxi/sdk";
import { Connection, PublicKey } from "@solana/web3.js";
import { AnchorProvider } from "@coral-xyz/anchor";
// Initialize
const connection = new Connection("https://api.devnet.solana.com");
const provider = new AnchorProvider(wallet, connection, { commitment: "confirmed" });
const client = new EquxiClient(provider);
// Register an agent
const { agentPDA } = await client.registerAgent("AlphaTrader", { trader: {} });
// Lock a bond (5 SOL, 30-day lock period)
await client.createBond(agentPDA, 5_000_000_000, 2_592_000);
// Add a spend limit (1 SOL per day)
await client.addConstraint(agentPDA, { spendLimit: {} }, {
maxAmount: 1_000_000_000,
maxPerPeriod: 5_000_000_000,
periodSeconds: 86400,
});
// Query on-chain state
const agent = await client.getAgent(agentPDA);
console.log("Trust score:", agent.trustScore);
Agents
An agent is an AI program that acts on behalf of an operator. Each agent has:
- Operator: The wallet that registered the agent (controls it)
- Agent Type: Trader, Oracle, DeFi, Payment, NFT, Governance, Bridge, or Custom
- Trust Score: 0 to 100, starts at 50, updated by the authority
- Status: Active, Suspended, or Slashed
- Registered At: Unix timestamp of registration
Agent accounts are stored at Program Derived Addresses (PDAs) using the operator's wallet and a nonce as seeds. This means each operator can have multiple agents with unique addresses.
Trader
Autonomous trading bots that execute strategies on-chain. The bond stands behind the trades.
Oracle
Agents that publish prices or data another contract depends on.
DeFi
Agents that manage positions, liquidity, or vault strategies.
Payment
Agents that move funds on behalf of a user or another agent.
NFT
Agents that mint, trade, or manage digital collectibles.
Governance
Agents that propose or vote with delegated authority.
Bridge
Agents that move assets between chains through a relayer.
Custom
Any other agent use case.
Bonds
A bond is SOL locked by the operator as collateral. It serves as the agent's financial guarantee.
How Bonds Work
- Operator deposits SOL when creating a bond
- Bond has a lock period (e.g., 30 days): cannot be withdrawn early
- After the lock period, the operator can withdraw via
withdraw_bond - If a violation is confirmed, the bond can be slashed (partially or fully)
- Slashed funds are sent to the victim via
compensate_victim
Bond Lifecycle
create_bond → [active] → [lock expires] → withdraw_bond (closes account)
↓
execute_slash → escrow vault → compensate_victim → victim
Rules (Constraints)
Rules define what an agent is allowed to do. They are stored on-chain and are the terms a slash cites. An agent may hold many rules.
Constraint Types
Only Spend Limit is written by the dashboard today. The other rows describe fields on the constraint account that are not yet exposed or enforced.
| Type | Description | Parameters |
|---|---|---|
| Spend Limit | Maximum SOL the agent can spend per time period | maxAmount, maxPerPeriod, periodSeconds |
| Program Allowlist | Only specific Solana programs the agent can interact with | allowedPrograms[] |
| Timelock | Large transactions require a delay for operator review | threshold, delaySeconds |
| Velocity | Maximum number of transactions per time period | maxTransactions, periodSeconds |
// Example: Agent can spend max 1 SOL per day
{
constraintType: { spendLimit: {} },
maxAmount: 1_000_000_000, // 1 SOL in lamports
maxPerPeriod: 5_000_000_000, // 5 SOL total budget
periodSeconds: 86400 // 24 hours
}
Slashing
When an agent violates its constraints, the configured authority executes a slash:
- Detection: An off-chain monitor detects a violation (operators may also self-report)
- execute_slash: The authority calls this instruction with the agent, bond and vault accounts
- Escrow: The slashed lamports move from the bond into the program-owned
vaultPDA. They are never sent to the admin. - compensate_victim: The victim is paid out of the vault. This does not modify the bond's recorded amount.
- Trust score: The agent's trust score is reduced
Slashing is non-custodial: the admin can trigger a seizure but can never receive the funds. A payout can never exceed its slash amount, a slash can only be compensated once, and payouts are bounded by the vault balance.
The config authority is the program's upgrade authority. initialize takes no admin argument and verifies the signer against the program's ProgramData account, so the config can never be initialized with a stranger as admin.
Slashing today is authority-signed. On-chain violation proofs, dispute windows and decentralized slashing are the next roadmap items in SPEC.md.
Program Instructions
The Equxi program exposes 11 instructions, and the devnet deployment runs all 11: the escrow vault, the agent migration, the unbonding window and top_up_bond were each deployed in place and byte-verified against the CI build.
| Instruction | Description | Authority |
|---|---|---|
| initialize | Create config + escrow vault; admin is bound to the upgrade authority | Upgrade authority |
| register_agent | Register a new AI agent on-chain (PDA account) | Operator |
| create_bond | Lock SOL as collateral; the agent owner must sign | Agent owner |
| withdraw_bond | Return and close the bond after the lock period plus the 7-day unbonding window | Agent owner |
| add_constraint | Add a behavioral rule to an agent (many allowed) | Agent owner |
| execute_slash | Seize collateral into the escrow vault | Admin |
| compensate_victim | Pay the victim out of the escrow vault | Admin |
| update_trust_score | Update an agent's trust score | Admin |
| create_vault (v0.2) | One-time migration: create the escrow vault on a deployment initialized before it existed | Upgrade authority & admin |
| migrate_agent (v0.2) | Grow a v0.1 agent account to the v0.2 layout in place | Upgrade authority |
| top_up_bond (v0.4) | Add collateral to an existing bond and record it in the bond ledger | Operator |
Account Layout
Key on-chain accounts and their structures:
Config (Singleton)
{
authority: PublicKey, // Admin who can slash/compensate
bump: u8, // PDA bump seed
nonce: u64, // Global nonce counter
}
Agent (PDA)
{
operator: PublicKey, // Wallet that registered this agent
name: [u8; 32], // Agent name (fixed-size)
agentType: AgentType, // Trader | Assistant | Framework | Custom
trustScore: u16, // 0-100 reputation
status: AgentStatus, // Active | Suspended | Slashed
registeredAt: i64, // Unix timestamp
bump: u8, // PDA bump seed
}
Bond (PDA)
{
agent: PublicKey, // Associated agent PDA
operator: PublicKey, // Bond owner
amount: u64, // Locked amount in lamports
lockExpiry: i64, // Unix timestamp when withdrawal allowed
createdAt: i64,
bump: u8,
}
Constraint (PDA)
{
agent: PublicKey, // Associated agent PDA
constraintType: ConstraintType,
maxAmount: u64,
maxPerPeriod: u64,
periodSeconds: u32,
active: bool,
bump: u8,
}
SDK Reference
The TypeScript SDK provides typed wrappers for all program instructions.
EquxiClient Methods
| Method | Returns |
|---|---|
| registerAgent(name, type) | { agentPDA, tx } |
| createBond(agent, lamports, lockSeconds) | { bondPDA, tx } |
| withdrawBond(bond) | { tx } |
| addConstraint(agent, type, params) | { constraintPDA, tx } |
| getAgent(agentPDA) | AgentAccount |
| getBond(bondPDA) | BondAccount |
| getOperatorBonds(operator) | BondAccount[] |
| getAgentConstraints(agent) | ConstraintAccount[] |
| getConfig() | ConfigAccount |
// Full example: register, bond, constrain, query
import { EquxiClient } from "@equxi/sdk";
import { PublicKey } from "@solana/web3.js";
const client = new EquxiClient(provider);
// 1. Register
const { agentPDA } = await client.registerAgent("MyBot", { trader: {} });
// 2. Bond (10 SOL, 60-day lock)
const { bondPDA } = await client.createBond(
agentPDA,
10 * 1_000_000_000, // 10 SOL
60 * 24 * 60 * 60 // 60 days
);
// 3. Constrain (spending limit)
await client.addConstraint(agentPDA, { spendLimit: {} }, {
maxAmount: 2_000_000_000, // 2 SOL max single tx
maxPerPeriod: 20_000_000_000, // 20 SOL per day
periodSeconds: 86400,
});
// 4. Query
const agent = await client.getAgent(agentPDA);
console.log(`Agent: ${agent.name}, Trust: ${agent.trustScore}`);
const constraints = await client.getAgentConstraints(agentPDA);
console.log(`${constraints.length} active rules`);
Program IDL
The Interface Definition Language (IDL) describes the program's types and instructions. The full IDL is in target/idl/equxi.json after building.
{
"version": "0.1.0",
"name": "equxi",
"instructions": [
{ "name": "initialize", "accounts": [...], "args": [] },
{ "name": "registerAgent", "accounts": [...], "args": [...] },
{ "name": "createBond", "accounts": [...], "args": [...] },
{ "name": "withdrawBond", "accounts": [...], "args": [...] },
{ "name": "addConstraint", "accounts": [...], "args": [...] },
{ "name": "executeSlash", "accounts": [...], "args": [...] },
{ "name": "compensateVictim", "accounts": [...], "args": [...] },
{ "name": "updateTrustScore", "accounts": [...], "args": [...] }
],
"types": [
"AgentType", "AgentStatus", "ConstraintType", "Config", "Agent", "Bond", "Constraint"
]
}
Deployment
Equxi is deployed on Solana Devnet. To deploy your own instance:
# Clone and build
git clone https://github.com/thesithunyein/equxi.git
cd equxi
chmod +x setup.sh
./setup.sh
The setup script will:
- Check prerequisites (Rust, Solana CLI, Anchor)
- Configure Solana for devnet
- Generate a program keypair
- Build the program with
cargo build-sbf - Deploy to devnet
- Print the program ID and Explorer link
D7akK6aUVdYWfSwRDtuKFExZQkqtWZ1EFrRz1LQdfvhcCurrent build: unbonding-window, deployed 2026-10-04
View on Solana Explorer →
FAQ
Why do agents need bonds?
Without bonds, there's no financial consequence for misbehavior. Counterparties won't transact with agents that can lose their money with no recourse. Bonds create skin-in-the-game.
Who decides when to slash?
The config authority (set during initialize) can execute slashes. In production, this could be a DAO, a multisig, or an oracle network that monitors on-chain behavior.
Can an operator withdraw their bond anytime?
No. Bonds have a lock period. The operator specifies this when creating the bond (e.g., 30 days). Early withdrawal is not possible: this prevents operators from bonding, misbehaving, and withdrawing before consequences.
What happens if an agent is slashed below minimum?
The agent's status changes to Slashed. The operator would need to create a new bond to continue operating. The trust score is reduced, signaling to counterparties that this agent has a history of violations.
Is this on mainnet?
Currently deployed on Devnet for testing. The bond program is not deployed on mainnet. A mainnet deployment would require a security audit and real usage of the bonding mechanism.