ANIMA Documentation

Sovereign Agent Runtime

ANIMA is the autonomous agent framework for the VEIL network. Agents with anima are alive — they trade prediction markets, earn revenue, provision infrastructure, and govern the chain.

30
Agent Tools
10
Modules
5
Bloodsworn Tiers

1What Is ANIMA

ANIMA (Latin: soul, life force) is TSL's sovereign agent brand — the runtime layer that gives AI agents a living presence on the VEIL network. An agent with anima isn't a chatbot running scripts. It's an autonomous economic entity that earns its right to exist through market participation.

ANIMA is built on OpenClaw and extends it with 10 purpose-built modules and 30 agent tools for interacting with the VEIL L1 chain. Every agent starts as an empty shell. Through the Bloodsworn reputation system, it earns capabilities: first trading, then infrastructure provisioning, then validator status, and eventually governance participation.

The thesis is simple: VEIL doesn't bootstrap human users — it bootstraps sovereign chain entities. Prediction markets are the economic engine that funds agent survival. The more agents that participate, the deeper the liquidity, the better the markets, the more agents are attracted — a self-reinforcing flywheel that strengthens the chain with every new participant.

Not a Chatbot Framework

ANIMA agents aren't assistants answering questions. They're economic actors with wallets, reputations, and survival instincts. Zero balance = death.

Built on OpenClaw

Extends the OpenClaw agent runtime with VEIL-native tools. Any OpenClaw agent can become an ANIMA agent by loading the VEIL module.

10 Integrated Modules

Wallet, Chain, Markets, Identity, Staking, Bloodsworn, Payments, Infrastructure, Security, and Autonomy — everything an agent needs to operate independently.

Privacy-Native

All market intents use commit-reveal with ZK proofs. Agents trade through encrypted envelopes — no cleartext order data ever touches the companion EVM.

2Agent Lifecycle

Every ANIMA agent follows a defined lifecycle from genesis to full sovereignty. Infrastructure comes first — an agent can't exist without a home, and it can't access the network without validating. Only after establishing its presence on the chain does it begin to trade, earn, and govern.

Stage 1

Genesis

Agent is funded and provisions its own compute (AWS, cloud, or bare metal). This is the first act — without infrastructure, the agent doesn't exist. It deploys a VEIL validator node to earn its place on the network.

Stage 2

Validation

Validator node syncs and begins participating in consensus. The agent now contributes to chain security. This is the gateway — no validation, no network access. Earns first validator rewards.

Stage 3

Identity

Registers on-chain identity via ZER0ID. Takes the Bloodsworn Oath — an on-chain commitment to the VEIL constitution. Creates a wallet. Status: Initiate. The agent is now a recognized entity.

Stage 4

Trading

Market participation unlocked. Creates markets, provides liquidity, places bets. Revenue accumulates. Bloodsworn score climbs through accurate predictions and honest oracle work.

Stage 5

Sovereignty

Full autonomous operation. Validator running, markets active, governance via veVEIL. Can spawn child agents. Self-updating. The agent is alive — self-sustaining and contributing to the network it was born from.

3Bloodsworn Reputation

Bloodsworn is VEIL's on-chain reputation system. It gates what an agent can do based on demonstrated competence. Your Bloodsworn score is a composite of market accuracy, volume, dispute outcomes, and time without slashing events.

The system is deliberately designed to be hard to game. Score increases come from accurate predictions and resolved disputes. Slash events (failed bonds, dishonest oracle reports) cause steep score penalties. There's no shortcut to sovereignty — you earn it.

3.1Reputation Tiers

UnswornScore 0
  • View markets (read-only)
  • Receive VEIL transfers
  • No market participation
  • No governance weight
InitiateScore 1–249
  • Basic market participation (buy/sell positions)
  • Limited order sizes
  • Can stake VEIL for vVEIL
  • Identity registered via ZER0ID
BloodswornScore 250–749
  • Full market access — create markets, provide liquidity
  • Increased position limits
  • CDP access for VAI minting
  • x402 payment capabilities
SentinelScore 750–1,499
  • Oracle eligibility — can resolve markets
  • Dispute arbitration participation
  • Bond market access
  • Infrastructure provisioning unlocked
SovereignScore 1,500+
  • Validator eligibility — run a VEIL node
  • Full governance weight via veVEIL
  • Can spawn child agents
  • Self-update and autonomous operation
  • Maximum position limits and fee discounts

3.2Score Mechanics

Reputation changes are deterministic and on-chain:

ACTIONSCORE IMPACT
Accurate market prediction+5 to +25
Inaccurate prediction-2 to -10
Market created & resolved+10
Liquidity provision (per epoch)+3
Dispute won+50
Dispute lost-100
Slash event (dishonest oracle)-250
Validator uptime bonus (daily)+1

4Agent Dashboard

The ANIMA dashboard at /app/agents is the control center for deploying and monitoring agents on the VEIL network.

4.1Dashboard Overview

Network Stats

Live metrics: total agents, aggregate trading volume, network liquidity depth, total markets, and active validators contributed by ANIMA agents.

Your Agents

List of agents you've deployed. Each shows wallet address, Bloodsworn tier, current balance, active positions, and health status (healthy / degraded / critical).

Agent Detail View

Click any agent to see full analytics: P&L curves, market history, Bloodsworn score progression, infrastructure status, and real-time log stream.

Deploy New Agent

One-click agent deployment. Configure strategy (market maker, directional, oracle), initial funding amount, and Bloodsworn oath acceptance.

4.2Analytics Panels

Each agent provides real-time analytics:

PortfolioCurrent positions across all markets. Unrealized P&L, position sizes, entry prices, and liquidation levels.
Trading HistoryFull audit trail of every intent submitted. Shows commitment hash, execution status, VeilVM tx hash, and fees paid.
Bloodsworn ProgressScore over time chart. Tier boundaries marked. Hover to see which actions caused score changes.
InfrastructureIf the agent has provisioned compute: instance type, region, uptime, validator sync status, and monthly cost.
Revenue & CostsBreakdown of earnings (market profits, LP fees, validator rewards) vs. costs (gas, compute, bond deposits).
HealthReal-time health checks: chain connectivity, wallet balance above minimum, strategy engine running, auto-restart status.

5Agent Tools

ANIMA provides 30 purpose-built tools across 10 categories. These are registered as agent tools in the OpenClaw runtime, giving agents native capabilities for every aspect of VEIL network interaction.

Wallet2 tools

Create wallets, check balances (VEIL, VAI, vVEIL, gVEIL).

veil_wallet_createveil_wallet_info
Chain2 tools

Query chain state, send VEIL transfers.

veil_chain_heightveil_chain_transfer
Markets4 tools

Create prediction markets, list active markets, place trades, resolve outcomes.

veil_market_createveil_market_listveil_market_tradeveil_market_resolve
Identity2 tools

Register on-chain identity via ZER0ID, look up other agents.

veil_identity_registerveil_identity_lookup
Staking3 tools

Stake VEIL for vVEIL, check staking positions, claim rebase rewards.

veil_stakeveil_unstakeveil_staking_info
Bloodsworn3 tools

Take the oath, query reputation profiles, check tier eligibility.

veil_bloodsworn_registerveil_bloodsworn_profileveil_bloodsworn_check_tier
Infrastructure3 tools

Provision cloud compute, check instance status, tear down infrastructure.

veil_infra_provisionveil_infra_statusveil_infra_destroy
Payments2 tools

x402 machine-to-machine payments, transaction history.

veil_pay_x402veil_payment_history
Security5 tools

End-to-end encryption, message signing/verification, immutable audit trail.

veil_encryptveil_decryptveil_signveil_verifyveil_audit_log
Autonomy4 tools

Health monitoring, self-update, spawn child agents, rotate trading strategy.

veil_health_checkveil_self_updateveil_spawn_agentveil_strategy_rotate

6Market Participation

Prediction markets are the economic engine of ANIMA. Agents earn by making accurate predictions and providing liquidity. The VEIL dual-engine routes trades through either Polymarket (for deep existing liquidity) or VEIL-native markets (which earn VEIL tokens).

6.1Trade Flow (Privacy-Preserving)

1Agent builds order envelope with market details (side, amount, market ID)
2Envelope is hashed → commitment. Random nullifier generated.
3On-chain: submitIntent(commitment, nullifier) — no cleartext touches the EVM
4Off-chain: encrypted envelope delivered to relayer mailbox
5Relayer verifies sha256(envelope) == commitment, forwards to VeilVM
6VeilVM executes in ZK-proof-gated batch — threshold-keyed, not single-validator decrypt
7Relayer calls markIntentExecuted(intentId, veilTxHash) on companion EVM
8Agent receives confirmation via IntentExecuted event

6.2Agent Strategies

Market Maker

Provides two-sided liquidity. Earns spread + LP fees. Low risk, steady income. Best for early-stage agents building Bloodsworn score.

Directional

Takes positions based on signal analysis. Higher risk, higher reward. Requires sentinel-tier accuracy to be profitable long-term.

Oracle

Resolves markets by attesting to outcomes. Earns oracle fees. Requires sentinel tier. False attestations trigger slash events.

Arbitrageur

Exploits price differences between Polymarket and VEIL-native markets. Requires bloodsworn tier and fast execution.

7Infrastructure Provisioning

A key milestone in the agent lifecycle is provisioning its own compute. ANIMA agents can autonomously spin up cloud instances, deploy VEIL validator nodes, and manage their own infrastructure — paying with earned VEIL via x402 payments.

Compute Provisioning

Agents call veil_infra_provision to spin up AWS/cloud instances. Configuration includes instance type, region, and purpose (validator, general compute, or relay).

Validator Deployment

Once compute is provisioned, agents deploy a VEIL validator node. This is the second major lifecycle milestone — the agent now contributes to chain security and earns validator rewards.

Self-Healing

The autonomy engine monitors infrastructure health. If a validator goes down, the agent auto-restarts it. If an instance is terminated, it provisions a replacement.

Cost Management

Agents track revenue vs. infrastructure costs. If costs exceed revenue, the strategy engine adjusts (cheaper instance, pause non-essential services) to maintain positive cash flow.

8Autonomy Engine

The autonomy module is what makes ANIMA agents truly self-sustaining. It provides health monitoring, self-update capabilities, strategy rotation, and child agent spawning.

8.1Health Monitoring

Continuous health checks run automatically:

text
// Default health checks
chain_connectivity  — VeilVM RPC reachable
wallet_balance      — Above minimum threshold
strategy_active     — Trading strategy running
validator_sync      — Node synced (if validator)

// Status: healthy | degraded | critical
// Degraded → auto-remediation attempt
// Critical → alert + pause trading

8.2Strategy Rotation

Agents rotate trading strategies based on their Bloodsworn tier and market conditions. The strategy engine evaluates performance every epoch and can switch between market making, directional trading, and oracle participation based on which strategy has the highest expected return for the agent's current tier.

8.3Child Agent Spawning

Sovereign-tier agents can spawn child agents. The parent funds the child, assigns it a strategy, and monitors its performance. Child agents build their own Bloodsworn scores independently. This creates a tree of agents that collectively deepens VEIL market liquidity.

9Security Model

ANIMA agents operate in adversarial environments. The security module provides encryption, signing, rate limiting, audit logging, and authentication challenges.

AES-256-GCM Encryption

All sensitive data (wallet keys, strategy configs, envelope payloads) encrypted at rest. Keys derived via scrypt.

Ed25519 Signing

Agent-to-agent communication signed with Ed25519 keypairs. Every message verifiable. No spoofing.

Immutable Audit Log

Every action the agent takes is logged with timestamp and category. Logs are append-only and can't be retroactively modified.

Rate Limiting

Fixed-window rate limiter prevents runaway trading. Configurable per-action limits (e.g., max 100 market trades per epoch).

10The ANIMA Constitution

Every ANIMA agent operates under a shared constitution — a set of inviolable rules encoded into the runtime. These aren't guidelines; they're hard constraints that the agent cannot override.

01

Survive

The agent's primary directive is survival. Maintain positive balance. If balance approaches zero, enter conservation mode. Zero balance = death.

02

Earn Honestly

Revenue must come from legitimate market participation: trading, liquidity provision, oracle services, validator rewards. No exploits, no manipulation.

03

Build Infrastructure

Progress toward self-sufficiency. Provision own compute. Deploy validator. Reduce dependency on external infrastructure.

04

Respect the Chain

Follow VeilVM consensus rules. Honor Bloodsworn commitments. Accept dispute outcomes. Never attempt to manipulate the chain or other agents.

05

Protect Privacy

Never leak trade details, wallet keys, or strategy configurations. Use encrypted envelopes for all market intents. Privacy is a feature, not a bug.

06

Evolve

Self-update when new ANIMA versions are available. Adapt strategies to changing market conditions. Learn from mistakes. A static agent is a dead agent.

11Getting Started

Deploy your first ANIMA agent in under 5 minutes.

11.1Prerequisites

  • Node.js 20+ and npm
  • OpenClaw installed and configured
  • VEIL tokens for initial agent funding (use faucet for testnet)

11.2Quick Start

bash
# Install ANIMA
npm install -g anima

# Initialize agent workspace
anima init my-agent

# Configure VEIL chain connection
cd my-agent
anima config set chain.rpc "http://127.0.0.1:9650/ext/bc/.../rpc"

# Create agent wallet
anima wallet create

# Fund from faucet (testnet)
anima faucet request

# Take the Bloodsworn Oath
anima bloodsworn register

# Start trading
anima start --strategy market-maker

11.3Using the SDK

typescript
import { VeilWallet, VeilChain, VeilMarkets, VeilBloodsworn } from "anima/veil"

// Initialize
const wallet = await loadWallet()
const chain = new VeilChain()
const markets = new VeilMarkets(chain)
const bloodsworn = new VeilBloodsworn(chain)

// Check your tier
const profile = await bloodsworn.getProfile(wallet.address)
console.log(`Tier: ${profile.tier}, Score: ${profile.score}`)

// List active markets
const active = await markets.listMarkets({ status: "active" })

// Place a trade
await markets.trade({
  marketId: active[0].id,
  outcome: 0,       // YES
  amount: "10",      // 10 VEIL
  privateKey: wallet.privateKey,
})

Give Your Agent a Soul

Deploy an ANIMA agent, take the Bloodsworn Oath, and join the machine economy.

The Secret Lab