# lyra > A Sui-native, policy-aware AI treasury assistant. The AI advises; deterministic code enforces the fund controls. Lyra does real on-chain work on Sui (balances, transfers, swaps, lending, yield discovery) from the terminal, Telegram, or a web console. Every value-moving action runs through a four-gate pipeline: policy (the on-chain lyra::policy Move package plus pure, unit-tested caps and allowlists) -> simulate (PTB dry-run before gas) -> approval (material-risk actions prompt a human even under YOLO) -> execute (broadcast the PTB + Walrus receipt). ## Install bun is REQUIRED. Lyra is a Bun + Biome monorepo and the CLI runs on Bun. ``` bun install export OPENAI_API_KEY=sk-... bun run lyra init bun run lyra chat ``` The brain is any OpenAI-compatible model (default `gpt-4o-mini`), swappable via `LYRA_LLM_BASE_URL` and `LYRA_LLM_MODEL`. The identity is a Sui address derived from a local Ed25519 keypair; there is no on-chain mint to start. ## For AI agents The fund-control policy lives in `LYRA_POLICY_*` environment variables (caps, allowlists, slippage, autonomy tier, read-only) and the on-chain lyra::policy Move package, not in the prompt. The model cannot raise a limit, skip a simulation, or grant its own approval; those decisions are deterministic code. Use the Sui testnet for exploratory work, then Sui mainnet. Full install model, anti-patterns, and the safety model: https://lyra.xyz/docs/agents.md - Full single-file dump: https://lyra.xyz/llms-full.txt - Per-page raw markdown: https://lyra.xyz/docs/.md (e.g. https://lyra.xyz/docs/quickstart.md) ## Docs - [Introduction](https://lyra.xyz/docs/introduction.md): A Sui-native, policy-aware AI treasury assistant. The AI advises; deterministic code enforces the fund controls. - [Quickstart](https://lyra.xyz/docs/quickstart.md): Install, configure the brain, init, chat. From zero to a policy-gated agent in a few commands. - [Architecture](https://lyra.xyz/docs/architecture.md): A Bun monorepo. An advisory brain, a deterministic control layer, and a four-gate write pipeline on Sui. - [Identity](https://lyra.xyz/docs/identity.md): The agent is a Sui address derived from a local Ed25519 keypair, kept in an encrypted keystore. No on-chain mint required to start. - [Memory](https://lyra.xyz/docs/memory.md): Local files — markdown notes plus an index, kept on the operator's machine. No database, nothing uploaded. - [Brain](https://lyra.xyz/docs/brain.md): Any OpenAI-compatible model. Advisory only, never the safety boundary. - [Tools](https://lyra.xyz/docs/tools.md): The Sui limbs plus the host harness. Reads run freely; every write crosses the gates. - [CLI](https://lyra.xyz/docs/cli.md): The lyra binary. Init an agent, chat, bridge Telegram, run the gateway. - [Configuration](https://lyra.xyz/docs/configuration.md): Configure the brain and the fund-control policy entirely from the environment. No code changes. - [Console](https://lyra.xyz/docs/console.md): Chat with your treasury in the browser. Ask in plain English; get live on-chain answers. Reads need nothing; signing in adds saved history and owner-gated transfers. - [For Agents](https://lyra.xyz/docs/agents.md): How AI agents (Claude Code, Codex, Cursor) install and operate Lyra for a human. What works, what to hand back, what never to claim. ## Reference - README: https://github.com/rifkyeasy/lyra#readme - Console: https://lyra.xyz/console - Releases: https://github.com/rifkyeasy/lyra/releases - Networks: Sui mainnet (https://fullnode.mainnet.sui.io:443, https://suiscan.xyz), Sui testnet (https://fullnode.testnet.sui.io:443, https://suiscan.xyz/testnet) - Gas token: SUI (9 decimals; smallest unit is MIST, 1 SUI = 1e9 MIST) - Integrations: DeepBook (native order book), Cetus / Turbos (swaps), NAVI / Suilend / Scallop (lending), Walrus (memory + receipts), DeFiLlama (yield discovery, read-only)