⚡ Karen
Autonomous Wallet Infrastructure for Solana AI Agents Karen is an open-source, OpenClaw-inspired agentic wallet runtime where AI agents autonomously manage Solana wallets, sign transactions, and interact with DeFi protocols. It also serves as infrastructure — any external AI agent can plug in via REST API or MCP.Why Karen?
Karen bridges the gap between AI agents and blockchain by providing:Autonomous Operation
LLM-powered agents that observe wallet state, reason about decisions, and execute transactions autonomously using pluggable skills
Secure by Design
AES-256-GCM encrypted keystores with HD derivation, per-agent spending limits, rate limiting, and program allowlists
DeFi Native
Built-in Jupiter swaps, native SOL staking, SPL token launches, wSOL wrapping, and token management
Universal Integration
REST API and MCP server let any external AI agent (Claude, OpenClaw, LangChain) access wallet capabilities
Architecture
Karen uses a three-layer architecture that separates agent intelligence, core wallet operations, and blockchain interactions:Key Features
🤖 Autonomous Agents
LLM-powered agents (OpenAI, Claude, Grok, Gemini) that follow a continuous observe-think-act loop:- Observe: Check wallet balances, recent transactions, and on-chain state
- Think: LLM reasons about strategy and selects the best action
- Act: Execute one of 17 pluggable skills (swap, transfer, stake, etc.)
- Remember: Persist decisions in memory for learning over time
🔐 Secure Wallets
- AES-256-GCM encryption: Private keys encrypted with scrypt-derived keys
- HD derivation: BIP-44 compatible hierarchical deterministic wallets
- Multi-agent support: Each agent gets its own derived wallet from a master seed
- Keystore isolation: Encrypted keystores stored separately from application code
💱 DeFi Integration
- Jupiter DEX: Automated token swaps with slippage protection
- Native staking: Delegate SOL to validators, manage stake accounts
- SPL token lifecycle: Create tokens, mint supply, revoke authorities
- Token management: Burn tokens, close accounts, freeze/thaw
- wSOL wrapping: Convert between SOL and Wrapped SOL
🛡️ Security Guardrails
Every transaction passes through configurable safety checks:| Guardrail | Default | Purpose |
|---|---|---|
maxSolPerTransaction | 2 SOL | Limit per-transaction spend |
maxTransactionsPerMinute | 5 | Rate limiting |
dailySpendingLimitSol | 10 SOL | Daily spending cap |
allowedPrograms | System, Token, Jupiter, Stake | Whitelist programs |
blockedAddresses | [] | Blacklist addresses |
🔌 Universal Integration
REST API (Port 3001): HTTP endpoints for wallet creation, balance checks, swaps, transfers, staking, and more. MCP Server: Model Context Protocol integration provides 17 tools that any MCP-compatible agent can use:karen_create_wallet,karen_balance,karen_swapkaren_transfer,karen_airdrop,karen_stakekaren_launch_token,karen_mint_supply,karen_burn- And 8 more DeFi operations
🧠 Agent Skills (17 Total)
Core Skills:check_balance- View SOL and SPL token holdingsswap- Trade tokens via Jupiter DEXtransfer- Send SOL to addressesairdrop- Request devnet SOLtoken_info- Look up token metadatawait- Skip action this cycle
launch_token- Create new SPL tokenmint_supply- Mint additional tokensrevoke_mint_authority- Permanently disable minting
stake_sol- Delegate to validatorunstake_sol- Deactivate stake accountwithdraw_stake- Withdraw deactivated stakelist_stakes- View all stake accounts
burn_tokens- Destroy tokensclose_token_account- Reclaim rent SOLwrap_sol- Convert SOL to wSOLunwrap_sol- Convert wSOL to SOL
💾 Agent Memory
Agents maintain persistent memory of past decisions:📊 Dashboard & CLI
- CLI: Full-featured terminal interface for wallet/agent management
- Dashboard: Premium Next.js UI for live monitoring (optional)
- Telegram Bot: Control agents via Telegram (optional)
Supported LLM Providers
| Provider | Models |
|---|---|
| OpenAI | gpt-4o, gpt-4o-mini, gpt-3.5-turbo |
| Anthropic | claude-sonnet-4-20250514, claude-3-haiku |
| xAI | grok-3-latest |
| gemini-2.0-flash |
Project Structure
Security Model
Karen implements defense-in-depth security:- Encrypted keystores: AES-256-GCM encryption with scrypt key derivation (N=16384, r=8, p=1)
- HD wallets: BIP-44 derivation path
m/44'/501'/0'/0'for Solana - Spending limits: Per-transaction, per-minute, and daily caps enforced before signing
- Program allowlists: Only whitelisted Solana programs (System, Token, Jupiter, Stake, Metadata)
- Audit logging: Every transaction and decision logged with timestamp
- Devnet only: Designed for safe testing without real funds
Next Steps
Quickstart
Get from zero to running agent in 5 minutes
Installation
Prerequisites, dependencies, and environment setup
API Reference
REST API and MCP tool documentation
Agent Skills
Complete reference for all 17 agent skills
Community & Support
- GitHub: github.com/yourusername/karen
- Issues: Report bugs and request features
- Discussions: Ask questions and share strategies
- License: MIT - free for commercial and personal use