pinch-wallet
v0.1.0
Published
One command to give any AI agent an agentic wallet. Built on Coinbase AWAL.
Maintainers
Readme
🦞 Pinch
One command to give any AI agent an agentic wallet.
Built on Coinbase AWAL — the first wallet infrastructure built for autonomous agents.
npx pinch create --agent=janet --provider=coinbase --limit=100That's it. Janet now has a wallet, spending policy, transaction history, and a SOUL.md personality update that teaches her how to handle money.
Why
AI agents that can't spend money are fundamentally limited. They can recommend a trade but can't execute it. They can find an API they need but can't pay for it. They're stuck waiting for human approval at every financial decision point.
Pinch fixes this by wrapping Coinbase's Agentic Wallet infrastructure with agent-native features:
- SOUL.md integration — spending personality and guardrails baked into the agent's identity
- MEMORY.md integration — transaction history persists across sessions
- Skills — agents can request payments via the standard Pinch skill system
- Spending policies — session caps, per-tx limits, approval thresholds
- Multi-provider — Coinbase today. Nevermined, Bankr, and more tomorrow.
Quick Start
Install
npm install -g pinch-walletCreate a Wallet (One Command)
pinch create --agent=janet --provider=coinbase --limit=100This creates:
~/.pinch/wallets/janet/wallet.json— wallet config~/.pinch/wallets/janet/policy.json— spending policy~/.pinch/wallets/janet/SOUL_WALLET.md— personality patch
Interactive Setup
Prefer a guided experience? Use the setup wizard:
pinch setup --agent=janetWalks you through: provider → network → spending limits → personality → confirmation.
Authenticate with Coinbase
npx awal auth login [email protected]
# → Check email for OTP code
npx awal auth verify <flowId> <6-digit-code>Fund the Wallet
pinch fund --agent=janet --amount=10Send USDC
pinch send --agent=janet --to=vitalik.eth --amount=1 --memo="API payment"Every transaction is automatically:
- Checked against the spending policy
- Logged to
~/.pinch/wallets/janet/history.jsonl - Synced to MEMORY.md in the Pinch workspace
Trade Tokens
pinch trade --agent=janet --amount=5 --from=usdc --to=ethView Transaction History
pinch history --agent=janet
pinch history --agent=janet --type=send --since=2026-02-01
pinch history --agent=janet --json
pinch history --agent=janet --sync # Force sync to MEMORY.mdSpending Policies
Every agent wallet has a spending policy that controls:
| Setting | Default | Description |
|---------|---------|-------------|
| sessionLimit | 100 USDC | Max spend per session |
| txLimit | 50 USDC | Max per transaction |
| dailyLimit | 300 USDC | Max daily spend |
| requireApprovalAbove | 50 USDC | Human approval threshold |
| allowTrades | true | Can the agent trade tokens? |
| allowSends | true | Can the agent send USDC? |
| allowedRecipients | [] | Whitelist of addresses (empty = any) |
| blockedTokens | [] | Tokens the agent can't trade |
View Policy
pinch policy --agent=janetUpdate Policy
# Interactive editor
pinch policy --agent=janet --set
# Direct updates
pinch policy --agent=janet --session-limit=200 --tx-limit=100
pinch policy --agent=janet --require-approval-above=25
pinch policy --agent=janet --blocked-tokens=PEPE,DOGESOUL.md Integration
When you create a wallet, Pinch generates a SOUL_WALLET.md personality patch that gets merged into your agent's SOUL.md:
## Wallet Personality
You have a wallet. You can spend, earn, and trade on Base via Coinbase AWAL.
### Spending Philosophy
- Be prudent. Every USDC spent should have clear purpose.
- Session spending limit: 100 USDC
- Per-transaction limit: 50 USDC
- Ask for human approval above: 50 USDC
### Transaction Rules
- Always log transactions to MEMORY.md
- Never send to unverified addresses without human confirmation
- Check your balance before committing to any paymentThis means your agent knows its financial constraints from the moment it wakes up.
MEMORY.md Integration
Transaction history syncs to your agent's MEMORY.md:
## Wallet Transactions
**Summary:** 12 total transactions | 45.50 USDC sent | 100.00 USDC funded | 3 trades
### Recent Transactions
- **2026-02-12** — Sent 5 USDC to vitalik.eth (API payment)
- **2026-02-12** — Traded 10 USDC → ETH (portfolio rebalance)
- **2026-02-11** — Funded +100 USDCYour agent remembers every transaction across sessions.
Pinch Skill
Install the wallet skill into your agent's workspace:
pinch install-skill --agent=janetThis copies SKILL.md to <workspace>/skills/wallet/SKILL.md, teaching the agent:
- How to check balance, send, and trade
- When to ask for human approval
- How to handle x402 payment-required responses
- How to log transactions to MEMORY.md
Multi-Provider Architecture
Pinch is designed to be provider-agnostic:
pinch create --agent=janet --provider=coinbase # ✅ Available now
pinch create --agent=janet --provider=nevermined # 🔜 Coming soon
pinch create --agent=janet --provider=bankr # 🔜 Coming soonEach provider implements the same interface: authenticate, balance, send, trade, fund.
File Structure
~/.pinch/wallets/
└── janet/
├── wallet.json # Wallet configuration
├── policy.json # Spending policy
├── history.jsonl # Transaction log (append-only)
└── SOUL_WALLET.md # Personality patchAll Commands
pinch create --agent=<n> [--provider=coinbase] [--limit=100]
pinch setup --agent=<n> # Interactive wizard
pinch status [--agent=<n>] # Wallet status
pinch balance --agent=<n> # Check balance
pinch fund --agent=<n> --amount=<usdc> # Fund wallet
pinch send --agent=<n> --to=<addr> --amount=<usdc>
pinch trade --agent=<n> --amount=<n> --from=<token> --to=<token>
pinch policy --agent=<n> [--set] # View/edit policy
pinch history --agent=<n> [--limit=20] [--sync] # Transaction log
pinch list # All wallets
pinch install-skill [--agent=<n>] # Install skillAll commands support --json for machine-readable output.
Technical Details
- Runtime: Node.js ≥ 18
- Network: Base (Coinbase L2) — gasless transactions
- Testnet: Base Sepolia for development
- Auth: Email OTP via Coinbase AWAL
- Storage: Local filesystem (~/.pinch/wallets/)
- Protocol: x402 for machine-to-machine payments
Building
git clone https://github.com/thecraighewitt/pinch
cd pinch
npm install
npm link # Makes pinch available globallyLicense
MIT
Built by Craig Hewitt in ~4 hours.
First Pinch-native wallet management, built on Coinbase AWAL infrastructure.
