Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

2.8 KB
Raw Blame

specs/schema — table documentation

agent_delegations

Stores ERC-7710 signed delegation envelopes. Spec: permissions/0.1.

Column Type Description
id UUID Primary key, generated by gen_random_uuid().
agent_id UUID Foreign key to agent_identities(id); cascades on agent delete.
chain_id INTEGER EVM chain ID (must be > 0).
delegator_address TEXT EIP-55 checksummed user wallet address (42 chars, 0x-prefixed).
delegate_address TEXT EIP-55 checksummed agent smart-account address (42 chars, 0x-prefixed).
delegation_hash TEXT keccak256 of the delegation envelope; unique across all rows.
delegation_json JSONB Full signed ERC-7710 delegation envelope as returned by MetaMask.
scope JSONB Permission scope: { token, maxAmount, targets[], expiry, period }.
status TEXT Lifecycle state: active, revoked, or expired. Default active.
expires_at TIMESTAMPTZ Wall-clock expiry of the delegation (from the signed scope).
created_at TIMESTAMPTZ Row creation time; set to NOW() on insert.
revoked_at TIMESTAMPTZ Timestamp of on-chain revocation; NULL while active.
tx_hash_revoke TEXT Transaction hash of the disableDelegation call; NULL until revoked.
last_redeemed_at TIMESTAMPTZ Timestamp of most recent successful redemption; updated by task-09 redeem endpoint.
redemption_count INTEGER Running count of successful redemptions; updated by task-09 redeem endpoint. Default 0.

Indexes

Index Covers
idx_delegations_agent Lookups by agent_id (list + redeem flows).
idx_delegations_status Partial index on status = 'active' (active-delegation queries).
idx_delegations_delegator Lookups by delegator_address (user manage panel).