arrow_back All projects
Case study · Web3 · Sui

Otter

Programmable bank accounts for AI agents — hierarchical treasuries, on-chain settlement, atomic reclaim.

Role Web3 / systems engineer
Stack Move · Node · SDK

What this is

Otter implements the Autonomous Agent Treasury Protocol on Sui: every AI agent gets a first-class AgentTreasury object that physically holds Coin<SUI>, enforces policy, and settles inference spend with an on-chain digest — no opaque SaaS billing ledger as the source of truth.

This architecture leans on Sui’s object model: parent objects can own child coin balances, independent agent treasuries settle in parallel, and reclaim can destroy a child and return budget to the parent in a single PTB.

Why it exists

Agents today run on shared developer keys. If an agent goes rogue, gets prompt-injected, or spawns sub-agents, the bill spikes with no ceiling. There is no clean way to hand a sub-agent a capped budget, reclaim unused funds, or audit spend per agent on-chain.

Object-native control

  • · Owned balance on the treasury object
  • · Daily / monthly / single-spend caps + provider allowlist
  • · Hierarchical budgeting — master spawns children
  • · Atomic reclaim of remaining child budget
  • · On-chain settlement per inference call
Architecture

Contract · gateway · dashboard · SDK

Move contract

Core objects: AgentTreasury, PolicySet, TreasuryOwnerCap. Entry points include create_master_treasury, spawn_child_agent, reclaim_child_budget, authorize_agent_call, pause/resume, deposit/withdraw, update_policy.

Gateway

Maps API keys to treasury IDs, routes providers (Groq live + stubs), tracks velocity, soft-pauses agents, settles immediately via authorize_agent_call, serializes per-treasury to avoid object-lock collisions, and classifies retryable vs non-retryable errors.

Dashboard

Next.js wallet UX: treasury tree, spawn/reclaim, API key generation, realtime balances, SuiScan links, and PTB construction for user-signed ops.

OtterAgent SDK

TypeScript and Python clients for chat, status, resume, and health — returning content, MIST cost, and settlement digest so agent apps can treat on-chain spend as first-class data.

Security model (layers)

Ownership — TreasuryOwnerCap for mutations

Non-custodial — user signs treasury ops

Policy — caps enforced in Move

Providers — per-agent whitelist

Velocity — off-chain auto-pause

Keys — one key → one treasury

Engineering takeaways

Next case study

DSpace

SuiPod Chat — hybrid social dApp

arrow_forward