Lyra splits an agent into two layers that never trade places. The advisory layer (the AI) decides what to do. The control layer (deterministic code) decides whether it is allowed to happen. Every value-moving action crosses the same four gates before it touches the chain.
Every value-moving tool call (sui.send, cetus.swap, navi.supply / withdraw, scallop.*, walrus.store) goes through the same pipeline:
evaluatePolicy, pure and unit-tested): hard caps on native and coin amounts, recipient and coin-type allowlists, slippage caps, and an autonomy tier. A violation blocks the action; an in-cap but material-risk action is flagged for approval. No network, no model, fully auditable. The on-chain lyra::policy Move package, deployed on Sui mainnet, anchors these controls.dryRunTransactionBlock / devInspect before any gas is spent; a failure aborts with a decoded reason.strict. Fund controls in code, not in the model.A Bun + Biome monorepo:
packages/
core brain (OpenAI-compatible), local file memory + index,
permission service + approval floor, plugin host, identity
plugin-onchain the Sui limbs: policy engine, simulation, transfers,
DeepBook / Cetus / Turbos swaps (best-route), NAVI / Suilend /
Scallop lending, Walrus receipts, DeFiLlama discovery,
object/Move-call read/analysis
plugin-system OS-sandboxed shell / code / file / web / browser tools
plugin-telegram Telegram listener + inline-keyboard approvals
gateway long-running daemon (keeps Telegram online, routes approvals)
cli the `lyra` binary (init, chat, telegram, gateway, ...)
apps/
web Next.js console + docs site
gpt-4o-mini), swappable via environment variable.@mysten/sui (the Sui TypeScript SDK) for every read and write; zod tool schemas.The policy engine, approval floor, simulation guards, and the DeFiLlama discovery logic are covered by deterministic unit tests (no network, injected fetch), so the safety boundary is verifiable in CI.
https://fullnode.mainnet.sui.io:443 · explorer https://suiscan.xyzhttps://fullnode.testnet.sui.io:443 · explorer https://suiscan.xyz/testnetlyra::policy package is deployed on Sui mainnet.Read Identity next.
Source: README.md.
Source: README.md