REIN
Sign inGet started
Introduction

REIN Documentation

REIN is an on-chain spending policy engine for AI agents. Set daily caps, per-transaction limits, step-up thresholds, and allowlists — enforced atomically by an Anchor program on Solana, not by a SaaS database.

Quick start
Zero to vault in 90 seconds
Claude Code
MCP server + rein init CLI
Python SDK
CrewAI, LangGraph, AutoGen
API reference
rein_spend, balance, history

What REIN does

When your agent calls rein.spend(), the Anchor program checks all active policies inside the same atomic transaction. If any rule fails, the transaction reverts — no funds move. On success, a Receipt PDA is created in the same transaction as immutable proof.

# Install the MCP server
npx rein init
# Or install the TypeScript SDK
npm install @rein/sdk
# Python
pip install rein

Core concepts

Policy PDA
An on-chain account storing your spending rules. Written once, checked on every transaction. Cannot be altered by a SaaS backend.
Receipt PDA
Created atomically on each successful spend. Contains vault, recipient hash, amount, timestamp, and Solana tx signature. Immutable and disputable.
Step-up auth
Spends above your threshold pause and send you a push notification. You approve or deny with one tap — the agent resumes in under 1 second.
Vault
Your REIN account. Each vault has its own Policy PDA, USDC balance, and receipt history. One owner can manage multiple vaults for different agents.
Get started — Quick start