sprotostudio
v0.1.0
Published
Sproto Studio operator agent — multi-chain wallet, MCP tool harness, OpenRouter chat. Plug in OPENROUTER_API_KEY and you have the whole Sproto creation + trading toolset at your fingertips.
Downloads
1,872
Maintainers
Readme
sproto
Operator agent for Sproto Studio. One install gives you:
- A multi-chain wallet (Base EVM + Solana) auto-provisioned on first run.
- The full Sproto Studio MCP tool catalog — image, video, music, 3D, NFT lookups, trading.
- An OpenRouter-backed chat agent that can call any of those tools on your behalf.
- Native x402 payments — paid tools settle in USDC or $BITCOIN from your wallet.
Install
Via npm (one-liner)
npm install -g sprotoThis bundles the Python TUI source plus the Node sidecars (viem, x402,
@solana/web3.js). On first run the launcher creates an isolated Python
venv at ~/.sprotostudio/venv and installs the package into it.
Requires Python ≥ 3.11 on PATH (the launcher tells you where to grab it if it's missing). Node ≥ 20.
Via pipx (Python-native)
pipx install sprotostudioThe PyPI name stays sprotostudio because sproto is taken on PyPI by
an unrelated package. You'll also need Node ≥ 20 in scope so the
wallet/x402 sidecars run.
Run
sproto # launches the Textual TUI
sproto doctor # check transports, wallet, x402, balances
sproto wallet # show wallet addresses + on-chain balances
sproto fund # print funding instructions
sproto agent "..." # one-shot agent prompt (needs OPENROUTER_API_KEY)
sproto agent # interactive agent chatsproto-tui is kept as an alias of sproto for backwards compatibility.
Wallet
First-run creates ~/.config/sproto-tui/wallet.json containing:
- a Base/EVM private key (for x402 payments and any EVM trading)
- a Solana keypair encoded as
secretBase58(Phantom-importable)
The file is written with mode 600. Back it up — losing it loses the funds, and there's no recovery flow yet.
Paying for tools
Free tools (catalog, lookups, status polls) cost nothing. Paid tools return a 402 challenge listing accepted assets. The TUI's signer prefers USDC on Base by default; flip rails per call:
SPROTO_TUI_PAY_ASSET=bitcoin sproto call sproto_create_image --arg prompt="..."
SPROTO_TUI_PAY_ASSET=usdc sproto call sproto_create_image --arg prompt="..."Run sproto fund for the bridge + swap links to fund either
chain.
Agent harness
export OPENROUTER_API_KEY=sk-...
sproto agent "make a sproto wearing sunglasses and post the URL"The agent gets a system prompt with your wallet addresses + live balances + the entire MCP tool catalog as OpenAI-style functions. It plans, calls tools, and reports results. Costs (USDC or $BITCOIN) come out of the local wallet.
Set SPROTO_AGENT_MODEL to override the default model
(openrouter/owl-alpha). Any OpenRouter model with tool-calling
support works.
Environment variables
| Var | Purpose |
| --- | ------- |
| OPENROUTER_API_KEY | Required for agent. Get one at https://openrouter.ai/keys. |
| SPROTO_AGENT_MODEL | Override the default agent model. |
| SPROTO_API_TOKEN | Optional bearer token for sproto.studio (credits-based runs). |
| SPROTO_STUDIO_API | Override the API base URL (default https://sproto.studio). |
| SPROTO_TUI_TRANSPORT | auto (default), mcp, or http. |
| SPROTO_TUI_PAY_ASSET | usdc (default) or bitcoin. |
| SPROTO_TUI_FORCE_X402 | 1 to drop the bearer and force the x402 path. |
| AGENT_WALLET_KEY | Override the auto-wallet's private key. |
| SOLANA_RPC_URL | Custom Solana RPC for balance reads. |
| SPROTO_TUI_PYTHON | npm launcher: pin a specific Python interpreter. |
| SPROTO_TUI_HOME | npm launcher: override the venv location (default ~/.sprotostudio). |
