Agent wallet
The receiver wallet for an agent, service, model route, tool runner, or worker. Any Solana wallet can be an agent wallet.
DRIP gives an AI agent a wallet-bound real-time budget. A payer streams SOL into escrow, the agent or service receives funds as they vest, and apps can use stream state to allow, pause, or revoke access without custodying private keys.
The DRIP agent model is built around streams, not lump-sum agent wallets. A human, team, or upstream agent creates a stream to an agent wallet, sets the flow rate, caps the maximum spend, and can pause or cancel the stream if the work should stop.
The current devnet build supports real on-chain SOL streams and a dashboard agent demo. The terminal activity shown in the dashboard is simulated, while the budget panel can be backed by real on-chain stream state when a wallet is connected.
For mainnet alpha, the same primitives give agents a way to prove they are funded, let services check access, and help teams audit spend from on-chain history.
The receiver wallet for an agent, service, model route, tool runner, or worker. Any Solana wallet can be an agent wallet.
A funded stream from a payer to the agent wallet. It defines deposit, flow rate, optional max budget, and optional expiration time.
A service-side check that reads stream state and decides whether an agent session, API route, or workflow is allowed.
The payer funds the stream and can pause, resume, or cancel future vesting according to the program rules.
The agent wallet can withdraw only the vested amount. It cannot withdraw unvested funds from the escrow.
Stream creation, withdrawal, pause, resume, and cancel actions emit on-chain events that can be indexed for reports.
Open the DRIP dashboard, connect a Solana wallet, and make sure the wallet is set to Devnet for the current MVP.
Choose the agent receiver wallet, select the agent policy, enter the deposit, flow rate, max budget, and optional expiration.
Confirm the receiver address, budget cap, and expected stream behavior before approving the wallet prompt.
The dashboard shows stream status, available vested balance, spend progress, and the stream account when on-chain data is available.
The receiver can withdraw vested funds. The payer can pause, resume, or cancel the stream to control future spend.
Inside this repo, the frontend uses the Solana helpers directly. This example creates a one-hour agent budget stream.
import { PublicKey } from "@solana/web3.js";
import BN from "bn.js";
import { createStream } from "@/lib/solana/stream";
const agentWallet = new PublicKey("AGENT_WALLET_PUBLIC_KEY");
const oneHourFromNow = Math.floor(Date.now() / 1000) + 60 * 60;
await createStream({
wallet,
receiver: agentWallet,
depositedAmountLamports: new BN("50000000"), // 0.05 SOL
flowRateLamportsPerSecond: new BN("10000"), // 0.00001 SOL/sec
maxBudgetLamports: new BN("50000000"),
expirationTime: oneHourFromNow,
});D5u3CiH3drPiQfiXctrFe6yDCsFsqHcWQ5aAnC9pkKM6
Solana Devnet for the current public build. Mainnet deployment details are published with the alpha release.
Native SOL only. SPL tokens and USDC are roadmap items and should not be assumed live.
Each stream has a stream state PDA and native SOL escrow PDA derived from the payer, receiver, and stream id.
These are the live devnet program instructions exposed by the current Anchor program.
initialize_stream(stream_id, deposited_amount, flow_rate_per_second, max_budget, expiration_time)Creates a stream account, derives the escrow account, transfers the funded SOL into escrow, and stores the stream policy.
withdraw()Receiver-only action that transfers the currently vested amount from escrow to the receiver wallet.
pause_stream()Payer-only action that stops new vesting while preserving stream state and already vested funds.
resume_stream()Payer-only action that resumes vesting and records how long the stream was paused.
cancel_stream()Payer-only action that pays any vested amount due to the receiver, returns remaining stream funds to the payer, and marks the stream cancelled.
Total SOL placed into the stream escrow. The stream cannot pay more than the escrowed amount.
Lamports per second that vest while the stream is active. Higher rates unlock the budget faster.
Optional cap for agent streams. If set, vested funds are capped at this amount even when deposit is larger.
Optional Unix timestamp after which the stream stops unlocking additional funds.
Derived from on-chain fields: streaming, paused, completed, cancelled, or expired.
Frontend classification used for reporting, such as AI_COMPUTE or API_COSTS. The current program enforces payment state, not accounting labels.
These TypeScript helpers power the app and define the shape of the agent SDK integration.
createStream(params)Creates and funds a new stream by calling initialize_stream.
fetchStream(params)Fetches one stream account and maps it into a DripStream object.
fetchStreamsForWallet(params)Fetches streams where a wallet is payer, receiver, or both using account memcmp filters.
withdrawFromStream(params)Lets the receiver withdraw vested SOL from a stream.
pauseStream(params)Lets the payer pause an active stream.
resumeStream(params)Lets the payer resume a paused stream.
cancelStream(params)Lets the payer cancel the stream, settle vested funds, and recover unvested escrow.
A service can treat stream state as a payment signal. If verification fails or the stream is missing, access should fail closed.
import { fetchStreamsForWallet } from "@/lib/solana/stream";
const streams = await fetchStreamsForWallet({
wallet,
walletPublicKey: payerWallet,
role: "payer",
});
const stream = streams.find((candidate) =>
candidate.receiver.equals(agentWallet) && !candidate.isCancelled
);
const allowed = stream?.status === "streaming";
const reason = allowed ? "active_stream" : stream?.status ?? "missing_stream";
return {
allowed,
reason,
stream: stream?.publicKey.toBase58() ?? null,
};Service endpoints for agent profiles, budget state, access checks, stream records, and infrastructure health.
GET /api/agents/:walletReturn public agent profile, wallet, supported capabilities, and current payment requirements.
GET /api/agents/:wallet/budgetReturn active stream summary, available vested funds, flow rate, cap, and expiration for an agent wallet.
GET /api/agents/:wallet/streamsList streams connected to an agent wallet as receiver, payer, or both.
POST /api/agents/:wallet/access-checkEvaluate whether a payer has an eligible active stream for the requested agent capability.
GET /api/streams/:streamReturn normalized stream state for dashboards, services, and audit exports.
POST /api/streams/sync/:streamRefresh cached stream state from chain after a wallet transaction or webhook event.
GET /healthReturn API, RPC, indexer, and cache health for infrastructure monitoring.
Access APIs should return deterministic reasons so apps can show the next required action.
{
"allowed": true,
"reason": "active_stream",
"trust_source": "solana_stream",
"stream": "STREAM_ACCOUNT_PUBLIC_KEY",
"status": "streaming",
"payer": "PAYER_PUBLIC_KEY",
"agent": "AGENT_PUBLIC_KEY",
"available_lamports": "1200000",
"flow_rate_lamports_per_second": "10000",
"expires_at": "2026-06-01T00:00:00Z",
"recommended_action": null
}Terminal commands for creating agent streams, checking budgets, validating access, and controlling stream state.
drip agent create-stream --receiver <wallet> --deposit <sol> --rate <sol/sec>Create and fund an agent stream from the connected wallet.
drip agent budget <wallet> --jsonInspect active budget state for an agent wallet.
drip agent allow --payer <wallet> --agent <wallet> --jsonRun the same access check a service would use before allowing an agent workflow.
drip stream withdraw --stream <address>Withdraw vested funds as the receiver wallet.
drip stream pause --stream <address>Pause an active stream as the payer.
drip stream resume --stream <address>Resume a paused stream as the payer.
drip stream cancel --stream <address>Cancel a stream, settle vested funds, and recover unvested escrow.
A lightweight JSON profile can help tools discover the agent wallet, capabilities, and payment requirements.
{
"drip_version": "1.0",
"name": "Research Agent",
"description": "Autonomous research workflow with stream-gated access.",
"wallet": "AGENT_PUBLIC_KEY",
"capabilities": ["research", "summarization", "reporting"],
"protocols": ["drip"],
"budget": {
"asset": "SOL",
"cluster": "mainnet-beta",
"stream_required": true,
"minimum_flow_rate_lamports_per_second": "10000",
"recommended_max_budget_lamports": "50000000"
},
"endpoints": {
"api": "https://agent.example.com/api",
"webhook": "https://agent.example.com/webhook"
},
"created_at": "2026-05-23T00:00:00Z"
}DRIP never needs the user's private key. Users approve transactions through their wallet.
The receiver can withdraw only funds that have vested under the stream rules.
Pausing stops new vesting. Cancelling settles vested funds and returns remaining stream funds to the payer.
If a service cannot verify stream state, the safest access decision is to block and ask the payer to reconnect or retry.
The agent controller checks payment state. It does not trade, route funds, or promise returns.
Before public mainnet use, deployment, API, CLI, and SDK docs should be verified against the exact shipped program and infrastructure.