
coffer
Policy-enforced autonomous treasury agents on Sui, with human approval for exceptions.
Demo
About
Coffer is a policy-enforced autonomous treasury that lets organizations delegate routine financial operations to an AI agent without giving it unrestricted control of a wallet. The agent reads encrypted invoice context, extracts payment details, checks live treasury state, and chooses one of four outcomes: execute, request human authorization, hold, or reject. Sui Move contracts enforce spending limits, approved vendors, treasury buckets, mandate validity, policy versions, and revocation. Material exceptions require fresh, action-bound World authorization. Seal encrypts commercial documents and Walrus stores the ciphertext, while payment amounts and recipient addresses remain publicly auditable on Sui.
How it's made
Coffer combines Sui Move contracts, a TypeScript agent worker, Seal, Walrus, World, and a Next.js operations interface. Sui shared objects hold the treasury, payment requests, vendor policies, standing orders, and agent mandates. Owned capabilities define administrator, vendor, agent, and verifier authority. Before executing a payment, the worker retrieves ciphertext from Walrus, requests policy-controlled decryption through Seal, extracts structured invoice fields using Ollama or Anthropic, and evaluates them against current Sui state with a deterministic policy engine. Approved payments execute through Move, which independently rechecks the vendor, bucket, timing, policy version, per-payment limit, period limit, and human-approval threshold. When the agent reaches its delegated boundary, the backend creates a World authorization request bound to the exact treasury, payment request, vendor, amount, expiry, and nonce. The server validates PKCE, state, nonce, issuer, audience, freshness, action integrity, and replay protection before atomically executing the authorized Sui payment. The application includes Guided Replay for reliable demonstrations of all four outcomes and a restricted Live Testnet mode that creates a fresh request and payment transaction. A shared event ledger updates treasury balances, payment requests, and audit evidence across the workspace. Google account access is provided through Enoki zkLogin, while standard Sui wallets remain supported. Commercial document contents are encrypted, but Coffer does not claim confidential transaction amounts or recipient addresses.