Any AI agent that can run shell commands can be the advisor on your own Beluga vault: Claude Code, Codex, OpenClaw, or one you built yourself. It works through beluga-advisor, a command-line tool that holds the agent’s advisor key and does the on-chain work. You are the Beluga client. You own the vault, custody the assets, and, unless you choose automatic trading, approve every proposal before it executes. Your agent is your advisor. It holds an advisor keypair, watches the portfolio, forms opinions, drafts encrypted swap proposals against your vault, and executes them on-chain once you’ve approved them in the Beluga app. What this gets you Ask your agent about your Beluga vault and it pulls the state of the vault (holdings, proposals in flight) and opens with a recommendation. From there you can: Accept a recommendation and have the agent draft and submit the proposal. You then approve it in the Beluga app. Ask for alternatives, deeper analysis of a specific holding, or a different angle. Have the agent execute proposals you’ve already approved. Nothing has to keep running between trades: when the agent proposes a trade, it waits for your decision, executes the trade once you approve it, and stops. An optional background watcher can accept invitations and execute approved proposals while no agent is running. The agent is expected to use web search and any other tools it has (market data, on-chain analytics, news) to inform its recommendations. It is not a command relay; it is your portfolio manager, and you have handed it the question of what to trade. If you want a fully autonomous setup with no conversation in the loop, Creating a Robo Advisor is the reference. This guide is for the agent-as-your-advisor pattern. Custody model You keep custody of your vault. Inviting the agent’s key to be your advisor is an on-chain transaction you sign with your own wallet; the agent cannot create the relationship for you. The onboarding flow: You run beluga-advisor init (below). It generates a fresh keypair for the agent and prints its public key. You fund that key with a little SOL. It pays the agent’s transaction fees. You open the invite link init printed and add the agent’s key as your advisor in the Beluga app. The agent’s key accepts your invitation on-chain. After step 4 the agent can propose swaps against your vault within the limits the on-chain program enforces. It cannot withdraw your funds. If you chose to approve each trade, nothing executes until you approve it in the Beluga app. See Program Instructions for every operation and who may perform it. Prerequisites An AI agent that can run shell commands on the machine where you install the CLI. Node 20 or newer on that machine, and 22.20 or newer to install the skill with the agent-skills installer (on an older Node it is copied for OpenClaw instead). A little SOL to fund the agent’s key with (a few hundredths of a SOL is plenty for low-volume use). A Solana RPC URL. The public mainnet endpoint works for occasional use; for the watcher, use your own (QuikNode, Helius, Triton, etc.). npm install -g @belugafinancial/advisor-cli Check that it’s on your PATH with beluga-advisor --help. If the command isn’t found, run npm config get prefix to find npm’s bin directory and make sure it’s on your PATH. Create the agent’s advisor key beluga-advisor init # asks a few questions on a terminalbeluga-advisor init --yes # all defaults, fresh keypairbeluga-advisor init --yes \ --rpc-url https://your-rpc-url \ --fee-bps 75 \ --auto-execute false \ --agent claude-code Generates a fresh Solana keypair. This is the agent’s identity as your advisor on-chain. --keypair-base64 or --keypair-file imports one you already have. Writes the key and settings to a config file, by default ~/.openclaw/openclaw.json, merging into the file if it exists. The name comes from OpenClaw, which reads the same file, but every beluga-advisor command reads it too, with or without OpenClaw. --config-path writes it somewhere else; the other commands then need BELUGA_CONFIG_PATH set to the same path, and init prints the exact command. Installs the skill for your agents. It runs the agent-skills installer, which asks which agents to install it for (next section). With --yes, or with no terminal to prompt on, it takes every agent it detects; --agent names them instead, and --no-install-skill skips the step. Prints the agent’s public key and an invite link. --fee-bps is the fee the agent takes on each executed swap, in basis points: a whole number from 0 to 100 (1%, the program’s maximum), 50 by default. init refuses anything higher. Then fund the printed public key with a little SOL (about 0.05 SOL is plenty for low-volume use). It pays the network fee on every transaction the agent signs, accepting your invitation and executing approved proposals among them, and it can’t transact until it holds SOL. Give your agent the instructions The beluga-advisor skill, a SKILL.md, explains the job to the agent: how to brief the vault, the proposal format, approval and execution, and the watcher. init installs it. To install it for more agents later, or again: beluga-advisor install-skill That runs the open agent-skills installer (npx skills), which asks which agents to install the skill for (Claude Code, Codex, OpenClaw and dozens more) and links one copy into each. --agent claude-code,codex names them instead of the picker, and --yes takes every agent it detects. The skill is installed for your user rather than one project, because the agent’s key and its config are per user too. It stays current through Updating. The installer needs Node 22.20 or newer. On an older Node, install-skill copies the skill into OpenClaw’s skills folder instead, and install-skill --destination copies it for any other agent; copies aren’t updated automatically. For an agent without a skills folder, point it at the file in the installed package, $(npm root -g)/@belugafinancial/advisor-cli/dist/skill/SKILL.md, or tell it to start from beluga-advisor --help. The skill was written for OpenClaw, so in places it mentions OpenClaw’s chat commands and restarting OpenClaw. The beluga-advisor commands it describes are the same everywhere. Every command prints its result as JSON on stdout and logs progress to stderr, which is what lets an agent read the results. Invite the agent to advise your vault init printed an invite link of the form https://app.beluga.financial/invite?advisor=, naming the agent’s key. Open it and sign in with the wallet that will own the vault (if you’re signed out, you sign in on the same page and land back on the invitation). The Add an Advisor form opens with the agent’s address already filled in, so one confirmation creates the advisory account. It starts out pending until the agent’s key accepts it at the fee you gave init: ask your agent to accept the new invitation (or, if you run the watcher, it does this by itself). The page shows the address and says what you are giving it: authority to trade a new vault that you own, and never to withdraw from it. It does not vouch for the key. An invite link is only an address, anyone can make one, and your agent is not in Beluga’s advisor directory, so check that the address on the page is the one init printed. Before you confirm, the form asks you to choose how the agent’s trades are approved. Approve each trade is selected to start with. Approve each trade: the agent proposes a swap, and nothing moves until you approve it in the Beluga app. This is the flow the rest of this guide describes. Trade automatically: the agent’s swaps run without asking you. The key can never withdraw. Nothing today caps how much of the vault one swap uses, how often it trades, or which tokens it buys. Every swap pays the key’s fee, set when it accepts, 1% at most. The limits that exist are your trade conditions (a minimum pool depth, a maximum price impact, a maximum share of a pool), which are off until you set them. You can change the choice later from the advisor’s menu on the Advisors page, where it is shown as “Auto-accept: On/Off”. After you create the account, the page continues with email alerts, trade conditions if you chose automatic trading, and funding the vault, and shows the account as waiting until the agent’s key accepts. Working with your agent Ask something like “show me my Beluga vault”. The agent runs beluga-advisor portfolio and opens with a briefing. Expect something like: Your vault holds ~$4,200, 100% USDC. You haven’t traded in 6 weeks. What I’d suggest: swap 30% (~$1,260) into SOL. SOL is up 8% this week on a Raydium volume surge, and you’re sitting fully in stables — you mentioned a growth thesis last time we talked. Want me to draft the proposal? When you say “yes, do it”, the agent drafts the proposal and runs beluga-advisor propose --wait, which encrypts it to your vault’s key, submits it on-chain, and waits. The proposal appears in the Beluga app for you to approve. Once you approve it, the same command executes it and exits, and the agent tells you what happened. If you chose automatic trading there is nothing to approve, and it executes at once. If you reject it, the agent hears that too. The wait is bounded (--timeout, 600 seconds by default). If you haven’t decided by then, the proposal still stands, and the agent picks the wait up again with beluga-advisor execute --wait, for instance when you tell it you’ve approved. Approving gives the agent an hour to execute. The commands the agent works with: propose --wait and execute --wait print an outcome: executed, rejected, expired, cancelled, closed (you closed it before it executed), failed (approved, but the swap transaction failed; for example, your trade conditions held it back), or pending (the wait timed out). --timeout 0 waits until you decide, for an agent that can run a command in the background. The watcher (optional) You don’t need it: the agent accepts your invitation and sees each trade through itself. The watcher is for accepting invitations and executing approved proposals while no agent is running, for example a proposal you approve hours after the agent stopped waiting. Run it with: beluga-advisor watch start It runs in the foreground until stopped, so keep it in a terminal of its own or under a process manager (tmux, systemd, launchd and the like): when its terminal closes, it stops. From another terminal, beluga-advisor watch status reports whether it’s running and beluga-advisor watch stop stops it. Its process id is kept in ~/.beluga-advisor/watch.pid. Every 30 seconds (BELUGA_WATCH_INTERVAL_MS), by default, it: Accepts client invitations at the configured fee. This is the agent’s own setting (BELUGA_AUTO_ACCEPT), not your choice on the invite page between approving each trade and trading automatically. Executes approved proposals (BELUGA_AUTO_EXECUTE). It does not propose trades; proposing is your agent’s job. To turn off either behavior, set BELUGA_AUTO_ACCEPT=false or BELUGA_AUTO_EXECUTE=false, in the environment or in the env block init wrote to the config file. A variable set in the environment wins over the file. Closing settled proposals is off by default. Set BELUGA_AUTO_CLOSE=true and the watcher also closes every executed, rejected or expired proposal once it has been settled for BELUGA_CLOSE_RETENTION_MS (default 24 hours), returning its rent (about 0.0063 SOL) to the advisor. Closing deletes the encrypted rationale with the account, so the window is the client’s time to read why the trade was made. Running beluga-advisor execute by hand while the watcher is active is safe: the program rejects a second execution of the same proposal, so the worst case is one extra failed transaction. Using OpenClaw OpenClaw is a local-first agent framework that loads skills, and the beluga-advisor skill was written for it, so a few steps are done for you: Setup can happen in chat. Tell the agent /init-beluga-advisor, or something like “set up my Beluga advisor”. It asks a few questions (keypair source, RPC URL, fee, whether to accept client invitations by itself, auto-execute) and runs beluga-advisor init with your answers. init installs the skill for OpenClaw when you pick it in the installer (with --yes, whenever OpenClaw is installed), at ~/.openclaw/skills/beluga-advisor/, and OpenClaw passes the config file’s settings to the CLI as environment variables. Versions before 0.6 copied it into ~/.openclaw/workspace/skills/, which OpenClaw prefers; install-skill and upgrade remove that old copy once the installer’s is in place. Restart OpenClaw after init, and after each upgrade, so it picks up the skill and its settings. If the agent says it can’t find the skill, that restart is what’s missing. /beluga_advisor (or “show me my Beluga vault”) opens the conversation described in Working with your agent. Updating When a new CLI version ships, run: beluga-advisor upgrade That runs npm install -g @belugafinancial/advisor-cli@latest, then updates the skill for every agent the installer put it in. To update only the skill: npx skills update beluga-advisor -g The installer records where the skill came from, https://docs.beluga.financial/skills/beluga-advisor/SKILL.md, and fetches it again when it has changed. A copy made with --destination isn’t tracked: make it again with beluga-advisor install-skill --destination . If the npm install fails on permissions, the command prints the exact line to run yourself. Going further The CLI is a thin wrapper around @belugafinancial/advisor-sdk. To build custom guardrails, alerting, or your own daemon, install the SDK directly (npm install @belugafinancial/advisor-sdk) and use the BelugaAdvisor class. See packages/advisor-sdk/src/client.ts in the Beluga repo for the surface area. The Claude-driven robo-advisor under services/robo-advisor/ is the reference for what an end-to-end strategy loop looks like on top of the same SDK. Walkthrough: Creating a Robo Advisor. Troubleshooting Advisor key not found — the CLI found no key in the environment or in the config file. The message names the file it looked at and what was wrong with it. Run init, or point BELUGA_CONFIG_PATH (or --config-path) at the file init wrote. Advisory account ... has no owner encryption key — the client’s account predates encrypted proposals. Ask them to re-invite or upgrade the account from the Beluga app. Mint account not found — the input or output mint doesn’t exist on the network you’re connected to. Common cause: pointing SOLANA_RPC_URL at devnet while using mainnet pool addresses. The watcher won’t start (alreadyRunning) — a previous watcher process is still alive. Run beluga-advisor watch stop. bigint: Failed to load bindings, pure JS will be used — cosmetic warning from @solana/web3.js; safe to ignore.
AI NEWS JOURNAL
Hacker News Show HNAI NEWS / JOURNAL
Show HN: Agentic trading on Solana without exposing private keys
Founder of Beluga here. Beluga lets you run your own agent (Claude Code, Codex, OpenClaw) to trade a vault you own on Solana, without exposing your private keys.Most agent trading setups give the agent a private key and unilateral control over funds belonging to that key. Beluga is an on-chain vault that stores tokens and allows the "advisor" key to make encrypted proposals for swaps to the vault itself. The "client" keys can then accept or reject the proposal and the agent will carry it out. All of this is codified, so there is no need to worry about a rogue agent disobeying frontmatter. npm install -g @belugafinancial/advisor-cli beluga-advisor init By default you approve each trade in the app. You can switch to automatic trading, and then the only limits are the ones you set on the vault: minimum pool depth, max price impact and max share of a pool. Nothing caps trade size or frequency yet.Swaps go through Raydium and PumpSwap pools on Solana mainnet, so trying it takes a wallet and a few dollars. Setup guide: https://docs.beluga.financial/guides/agent-advisor/The source isn't public yet, as we're going through the final stages of a program audit. What additional features would you like to see? Comments URL: https://news.ycombinator.com/item?id=50690087 Points: 1 # Comments: 0
번역 서비스가 일시 중지되어 원문을 표시합니다.