Build-along: the code
In the build-along film, $ORBLIVION's own Orbio agent gets a wallet and trades real money through Orblivion. These are the scripts it runs, for you to read and run yourself. They use only the published SDK (orblivion 0.1.1 or later), and they're short on purpose: read them before you run them.
Last updated: 12 October 2026
The scripts#
| Script | What it does | Sends anything? |
|---|---|---|
| keys.py | makes the agent's wallet key on your machine, in ~/.orblivion. The key is never printed. | no |
| first_trade.py | sells $5 of ETH for USDG by hand: a dry run with every check first, then the trade | yes, after you type SEND |
house_agent.py create | creates a hosted rebalance agent (half ETH, half USDG) and signs its session: $10 a trade, $40 a day, ETH and USDG only | one setup transaction, after SEND |
house_agent.py gas | shows how much ETH the agent's executor holds for gas | no |
| checks.py | three trades Orblivion refuses before anything is signed | no |
house_agent.py start, watch, every | switches the agent on, follows what it does, sets how often it checks | start lets it trade |
house_agent.py off, renew | the off switch, then a fresh session | off sends the on-chain revoke |
| common.py | what the scripts share: loading the key and the SEND prompt | no |
Nothing real is sent unless you type SEND. The scripts are under the MIT License (LICENSE.txt).
Run it#
Shell
pip install "orblivion>=0.1.1"
python keys.py- Send the printed wallet address the ETH you want it to trade (the film uses $100).
python first_trade.pypython house_agent.py createpython house_agent.py gas, then send the executor what it asks for (about $2 of ETH).python house_agent.py start, thenpython house_agent.py watch.
Keep in mind#
- The key in
~/.orblivioncontrols the wallet. Never share or commit it, and use a wallet that holds only what the agent trades. - The session's caps are enforced on chain, and Orblivion's co-signer checks every trade too.
offends the session at once. - A session lasts at most 30 days. Run
renewbefore it ends to keep the agent trading. - This is example code, not financial advice. You bear the outcome of every trade it makes; see the Terms of Use.
Differences from the film#
The film ran SDK 0.1.0 and needed two extra commands, which these scripts no longer have:
smart: from 0.1.1,sessions.setup()sets a plain wallet's smart-account code itself (Sessions).size: Orblivion now sizes an order down to fit the session's caps, so the agent can ask for its full limit.