Spend control · Solana · v1.4

Put your agent
on a leash.

Spend control for AI agents on Solana. Trustless limits, per‑vendor caps, and human approvals — enforced onchain, not by our servers.

See it block
14 KB · ZERO DEPS
ANCHOR · TYPESCRIPT
AGENT KIT · LANGCHAIN · CREWAI
POLICY ENGINE · LIVE
01 · Agent
Trading Bot α
cap $100/d · spent $42
02 · Policy
Onchain PDA
5 rules · v1.4.2
03 · Solana
execute()
slot 340118291
HITL
@OnLeashBot
1,284
CHECKS
18ms
LATENCY
340118291
SLOT
NET SOLANA · MAINNET·BETA/ /POLICY VERSION v1.4.2/ /ANCHOR PROGRAM OnL3sh11111111111111111111111111111111/ /HITL WINDOW · 5:00/ /+1,284 AGENTS DEPLOYED/ /$2.1M ROUTED THIS WEEK/ /BLOCKED 318 OUT-OF-POLICY ATTEMPTS/ /DEVNET LATENCY 312ms/ /NET SOLANA · MAINNET·BETA/ /POLICY VERSION v1.4.2/ /ANCHOR PROGRAM OnL3sh11111111111111111111111111111111/ /HITL WINDOW · 5:00/ /+1,284 AGENTS DEPLOYED/ /$2.1M ROUTED THIS WEEK/ /BLOCKED 318 OUT-OF-POLICY ATTEMPTS/ /DEVNET LATENCY 312ms/ /
What makes OnLeash different

Everything you need.
Nothing you don't.

Onchain enforcement, granular caps, human-in-the-loop approvals, and multi-agent hierarchy — all four in a single SDK, shipping on Solana.

01 · ONCHAIN

Trustless Anchor program

Limits live in an onchain PDA. Even our own backend can't sign over them. Other SDKs check rules in their server — we check yours in Solana.

7xKj...9bM2ALLOW
JUP6L...rActALLOW
4vLi...drainerBLOCKED
8aZK...3mNpALLOW
02 · GRANULAR

Per‑vendor daily caps

Set a separate ceiling for any address or protocol. Block one vendor instantly without touching another. Drainers never get a second swing.

JUP$0/25
METEOR$-5/25
PUMP$-16/25
03 · 5:00 WINDOW

Telegram human‑in‑the‑loop

Anything above the threshold pings Telegram. A 5‑minute window, two buttons, full ed25519 receipt. Slack & Discord same wire.

🚨 ONLEASH APPROVAL REQUIRED
Agent: Trading Bot α
Sending: 60 USDC → 8xKj…3mNp
⏰ Expires 4:59
✓ APPROVE✕ REJECT
04 · NESTED

Multi‑agent hierarchy

A parent agent funds N children. Children are bounded by the parent's envelope onchain. No child can outspend the org. Verifiable, recursive.

PARENT $500child·a $200child·b $400
Live demo · 4 scenes

Watch it block,
then watch it ship.

Four states, every layer of the stack: pre‑check, onchain, human‑in‑the‑loop, hierarchical. Click a scene or let it auto‑run.

CYCLE · 7.4s
ENV · DEVNET
~/onleash · scene 01 · Blocklist● REC
Active policy
BLOCKLIST4vLi…drainer
DAILY CAP$100
VENDOR CAP$25
HITL @$50
Outcome
BLOCKED
Drainer address blocked instantly
Wire it up · 14 lines

Three lines to install.
One line to send.

Drop into Solana Agent Kit, LangChain, or CrewAI. Your existing keypair becomes a leashed wallet.

install.shbash
# 1. install
$ npm i @onleash/sdk

# 2. set api key
$ leash login --key onl_sk_•••

# 3. deploy a policy
$ leash policy:create \
  --cap 100 \
  --vendor-cap 25 \
  --hitl 50 \
  --telegram @OnLeashBot

✓ policy deployed · pda 7gXq…4mJp
agent.tstypescript
import { LeashWallet } from "@onleash/sdk"
import { Keypair } from "@solana/web3.js"

const wallet = new LeashWallet({
  keypair: Keypair.generate(),
  apiKey: process.env.ONLEASH_KEY!,
});

// Pre‑checks → onchain → HITL if needed
await wallet.send({
  to:     "8aZKj…3mNp",
  amount: 60,
  token:  "USDC",
});  // → throws or returns sig
Human‑in‑the‑loop · 5:00 window

Two taps.
One signed transfer.

Above the threshold? Your phone buzzes. Tap approve, the SDK gets a hashed token back, the Anchor program executes. Reject and nothing happens — onchain.

01SDK creates approval — sha‑256 of token, 5min expiry, logged in DB.
02Telegram fires — agent name, amount, recipient, reason.
03SDK polls every 3s — until decided or window closes.
04Anchor executes — only after approve receipt is confirmed.
@OnLeashBot
online · just now
🚨 Approval required
AgentTrading Bot α
Sending60.00 USDC
To8xKj…3mNp
Reasonabove $50 threshold
VendorJUP swap
⏱ Expires in 4:59