Let OpenClaw be your Beluga advisor
OpenClaw is a local-first AI agent framework
that loads “skills” — small markdown packages that expose capabilities to
the host model. The beluga-advisor skill gives your OpenClaw agent its
own Beluga advisor identity so it can manage your vault for you.
You are the Beluga client — you own the vault, custody the assets, and approve every proposal before it executes. The OpenClaw 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 in the Beluga app.
What this gets you
Section titled “What this gets you”When you ask the agent about Beluga (e.g. /beluga_advisor), it doesn’t
show you a menu — it pulls the state of your vault (holdings, in-flight
proposals) and opens with a recommendation. From there you can:
- Accept a recommendation and have the agent draft and submit the proposal. You’ll then approve it from the Beluga app.
- Ask for alternatives, deeper analysis on a specific holding, or a different angle.
- Have the agent execute proposals you’ve already approved.
- Run a background watcher so the agent auto-accepts your invitation, auto-executes once you’ve approved, and runs hands-off in between.
The agent is expected to use web search and any other tools available to it (market data, on-chain analytics, news) to inform its recommendations. It is not a CLI relay; it is your portfolio manager — you delegated the “what should we trade” question to it.
If you want a fully autonomous setup with no chat-driven approval (rare — most people want humans-in-the-loop on trades), Creating a Robo Advisor is the reference. This guide is for the agent-as-your-advisor pattern.
Custody model
Section titled “Custody model”You keep custody of your vault. Inviting the agent’s pubkey to be your advisor is an on-chain transaction you sign with your client wallet — the agent cannot create the relationship for you. The onboarding flow:
- You install the skill (below). The CLI generates a fresh keypair for the agent and prints its pubkey.
- You fund that pubkey with a little SOL (it pays the agent’s tx fees).
- You open the Beluga app, create a vault if you don’t have one, and invite the agent’s pubkey as your advisor.
- The watcher (or the agent on demand) accepts your invitation on-chain.
After step 4 the agent can propose swaps against your vault within the limits enforced by the on-chain program. It cannot withdraw your funds; you must approve every proposal in the Beluga app before it can execute the trade on-chain. See Program Instructions for the full set of operations and their authorization rules.
Prerequisites
Section titled “Prerequisites”- An OpenClaw deployment (
openclaw --version). - Node 20+ on the host (for the
beluga-advisorCLI). - A funded Solana keypair with a small SOL balance for tx fees (a few hundredths of a SOL is plenty for low-volume operation).
- A Solana RPC URL. The public mainnet endpoint works for occasional use; for watch-mode polling, supply your own (QuikNode, Helius, Triton, etc.).
Install
Section titled “Install”Install the CLI from npm:
npm install -g @belugafinancial/advisor-cliVerify it’s on your PATH (beluga-advisor --help). If command not found,
run npm config get prefix to find your npm bin dir and confirm it’s on
your PATH.
Set up (chat-driven, recommended)
Section titled “Set up (chat-driven, recommended)”Open OpenClaw and tell the agent:
/init-beluga-advisorOr just say something like “set up my Beluga advisor” — the agent will
pick up the intent. It walks you through five quick questions (keypair
source, RPC URL, fee, auto-accept, auto-execute) and then runs
beluga-advisor init non-interactively with your answers. That call:
- Generates a fresh Solana keypair — this is the agent’s identity as your advisor on-chain.
- Writes the skill entry into
~/.openclaw/openclaw.json, merging into whatever you already have there. - Drops the bundled skill into
~/.openclaw/workspace/skills/beluga-advisor/. - Prints the agent’s new advisor pubkey and an invite URL.
After init, the agent will tell you to:
- Fund the advisor pubkey with a little SOL (~0.05 SOL is plenty for low-volume use). That’s the agent’s address — it pays the gas on every transaction it signs (accepting your invitation, executing approved proposals). It can’t transact until this address holds SOL.
- Open the invite URL in the Beluga app and sign the invitation from your client wallet. That’s how you (the client) on-chain delegate trade-proposal authority to the agent (the advisor).
- Restart OpenClaw so it picks up the new env.
Manual / scripted setup
Section titled “Manual / scripted setup”If you’d rather skip the chat conversation (e.g., you’re scripting a
deployment), call init directly:
beluga-advisor init # interactive prompts on a TTYbeluga-advisor init --yes # all defaults, generate fresh keypairbeluga-advisor init --yes \ --rpc-url https://your-quicknode-url \ --fee-bps 75 \ --auto-execute falseUseful flags: --keypair-base64 <secret> or --keypair-file <path> to
import an existing keypair, --config-path to write somewhere other than
~/.openclaw/openclaw.json, --no-install-skill if you’ve already copied
the skill yourself.
Invite the agent to advise your vault
Section titled “Invite the agent to advise your vault”init printed an invite URL of the form
https://app.beluga.financial/invite?advisor=<pubkey> — that’s the
agent’s pubkey. Open the URL in the Beluga app and sign the invitation
from your client wallet. An on-chain advisory account appears with status
pending. The watcher (or a “accept the new invitation” in chat) then
accepts it from the agent’s side at the fee you configured during init.
After acceptance the relationship is active. The agent can now propose
swaps against your vault — but execution still requires your approval in
the Beluga app for each one.
What chat actually feels like
Section titled “What chat actually feels like”Open OpenClaw and type /beluga_advisor (or just “show me my Beluga
vault”). The agent’s first move is to call beluga-advisor portfolio and
open 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?
The agent forms an opinion using whatever tools are available to it — web search for current prices and news, your other OpenClaw skills, the vault data itself. When you say “yes, do it,” it drafts the proposal JSON, encrypts it with your x25519 key, and submits on-chain.
You’ll then see the proposal in the Beluga app — approve it there. Once you approve, the watcher (or a follow-up “execute it” in chat) pushes the swap through on-chain.
Watch mode (background lifecycle)
Section titled “Watch mode (background lifecycle)”For hands-off acceptance and execution, start the watcher:
/beluga-watch-startThe watcher polls every 30 seconds (configurable via
BELUGA_WATCH_INTERVAL_MS) and, by default:
- Auto-accepts pending advisory accounts at the configured fee bps.
- Auto-executes approved proposals.
It does not auto-propose — proposing is your agent’s job. To disable
either behavior, set BELUGA_AUTO_ACCEPT=false or
BELUGA_AUTO_EXECUTE=false in the skill config.
The watcher is a detached child process. /beluga-watch-status reports
whether it’s running; /beluga-watch-stop kills it. The PID lives at
~/.beluga-advisor/watch.pid.
Manual /beluga-execute calls are safe to run while the watcher is
active — double-execution is rejected idempotently on-chain, so the worst
case is one extra failed transaction.
Updating
Section titled “Updating”When a new CLI version ships, run:
beluga-advisor upgradeThat runs npm install -g @belugafinancial/advisor-cli@latest and then
re-installs the bundled skill into your OpenClaw skills root in one
step. If npm install fails on permissions, the command prints the exact
sudo-prefixed line to run yourself. Restart OpenClaw afterward so it
picks up the new skill content.
Going further
Section titled “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 theBelugaAdvisorclass. Seepackages/advisor-sdk/src/client.tsin the Beluga repo for the surface area. - The full 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
Section titled “Troubleshooting”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: pointingSOLANA_RPC_URLat devnet while using mainnet pool addresses.- Watcher won’t start (
alreadyRunning) — a previous watcher process is still alive. Run/beluga-watch-stop. bigint: Failed to load bindings, pure JS will be used— cosmetic warning from@solana/web3.js; safe to ignore.