Orblivion AI agent (Python) =========================== An AI trading agent that runs on Orblivion's servers. You write its strategy in plain words; on every tick a model on Orbio's gateway decides, and Orblivion checks every answer before anything trades. Orblivion's own Orbio credits pay for the model, so you need no LLM key. The full guide: https://orblivion.com/docs/ai-agent.html Files strategy.txt YOUR STRATEGY, in plain words. The file to edit. Lines starting with # aren't sent. agent.py the script: keys, options, paper, watch, live, status, off. Its settings are at the top (SETTINGS). Needs Python 3.10 or later. Quick start pip install "orblivion>=0.1.1" python agent.py keys make the wallet's key (never printed) python agent.py options the templates and models, and who pays for this wallet's model calls python agent.py paper create the agent on paper (no money) and watch it think ... edit strategy.txt, watch again (python agent.py watch) ... python agent.py live after SEND: the session, its setup and the executor's gas; then it trades live python agent.py off after SEND: stop it, end its session, get the executor's gas back python agent.py off --chain-only after SEND: end the live session on chain from agent.json alone (nothing asked of Orblivion); a later off stops the agent and gets the gas back Who pays for the model Orblivion's own Orbio credits (funding "orblivion"): a daily pool, one share per wallet, for the cheap models and an agent that thinks every 15 minutes or slower. A wallet that owns an Orbio agent (or is one's agent wallet) gets a trial share for 7 days from its first AI agent, paper or live. After that, a live agent's share is backed by the trading fees the wallet paid through Orblivion over 14 days (it takes at least $5 of trades). Without a share the agent keeps ticking but doesn't think, or trade, until 00:00 UTC. `python agent.py options` shows where this wallet stands. How it keeps you safe - Paper first: a paper agent trades a paper book against live prices, and no money moves. - The model's answer is checked field by field: one JSON object, only the agent's own tokens, at most the per-trade limit. Anything else means no trade that tick. - Every order then passes the agent's limits (per trade, per day, the largest position) and Orblivion's guards. - Live, the agent trades only inside the session the wallet signs: these tokens, these caps, until it expires. Orblivion's co-signer and the chain enforce them on every trade. Its executor key never leaves Orblivion's signing service, and the SDK checks the co-signer's attestation of it before the wallet signs anything. - Nothing that moves money happens unless you type SEND. `off` ends the session at Orblivion at once, then on chain. agent.json keeps the live session's revocation record (no secret), so `off` builds the on-chain revocation (the session's delegation disabled, its approvals back to 0) here and sends it straight to Robinhood Chain, even when Orblivion doesn't answer, then reads it back. That needs an SDK with Grant.revocation_record (pip install -U orblivion); with an older one `off` takes its on-chain steps from Orblivion's answer. The key lives in ~/.orblivion-ai-agent (SETTINGS["key_dir"]), outside this folder, with agent.json (the agents the script made). Anyone with wallet.json controls the wallet: don't share or commit it, and use a wallet that holds only what the agent trades. The TypeScript version uses the same folder and files. Going live sets a plain wallet's code to MetaMask's EIP7702StatelessDeleGator (EIP-7702), which sessions run on. The key stays the owner, and the wallet works as before; an authorization to address 0 undoes it. This is example code, not financial advice. You bear the outcome of every trade it makes: https://orblivion.com/docs/terms.html MIT License: ../LICENSE.txt