Installation
Get Karen running locally with this comprehensive setup guide.Prerequisites
Node.js
Karen requires Node.js 20.0.0 or higher.package.json:
LLM API Key
Karen supports multiple LLM providers. You need at least one API key:- OpenAI
- Anthropic
- xAI (Grok)
- Google (Gemini)
Recommended for beginners. Best balance of cost and performance.
- Sign up at platform.openai.com
- Navigate to API Keys
- Create new key with name “Karen”
- Copy key (starts with
sk-)
gpt-4o(default, most capable)gpt-4o-mini(faster, cheaper)gpt-3.5-turbo(legacy)
Git
For cloning the repository:Installation Steps
1. Clone Repository
The official repository is at https://github.com/Don-Vicks/karen
2. Install Dependencies
Karen uses standard npm packages. Choose your preferred package manager:package.json):
3. Configure Environment
Copy the example environment file:.env with your settings:
.env
Configuration Reference
Solana Settings
Solana Settings
| Variable | Description | Default |
|---|---|---|
SOLANA_RPC_URL | Solana RPC endpoint | https://api.devnet.solana.com |
SOLANA_NETWORK | Network (devnet, testnet, mainnet-beta) | devnet |
- Helius:
https://devnet.helius-rpc.com/?api-key=YOUR_KEY - Alchemy:
https://solana-devnet.g.alchemy.com/v2/YOUR_KEY - QuickNode:
https://your-endpoint.solana-devnet.quiknode.pro/YOUR_KEY/
LLM Provider Keys
LLM Provider Keys
Add at least one API key:
Keys are loaded in
| Variable | Format | Get Key |
|---|---|---|
OPENAI_API_KEY | sk-... | platform.openai.com |
ANTHROPIC_API_KEY | sk-ant-... | console.anthropic.com |
XAI_API_KEY | xai-... | console.x.ai |
GEMINI_API_KEY | Any string | aistudio.google.com |
src/agent/runtime.ts:75-89:Keystore Security
Keystore Security
| Variable | Description | Recommendation |
|---|---|---|
KEYSTORE_PASSWORD | Master password for wallet encryption | Use 32+ random characters |
API Server
API Server
| Variable | Description | Default |
|---|---|---|
API_PORT | REST API server port | 3001 |
API_SECRET | Bearer token for admin endpoints | karen-dev-secret |
Agent Defaults
Agent Defaults
| Variable | Description | Default |
|---|---|---|
DEFAULT_LLM_PROVIDER | Default LLM (openai, anthropic, grok, gemini) | openai |
DEFAULT_LLM_MODEL | Default model per provider | gpt-4o |
AGENT_LOOP_INTERVAL_MS | Milliseconds between agent cycles | 30000 (30s) |
MAX_TX_PER_MINUTE | Rate limit for transactions | 5 |
MAX_SOL_PER_TX | Max SOL per transaction | 2.0 |
DAILY_SPENDING_LIMIT_SOL | Daily spending cap | 10.0 |
4. Build Project
Compile TypeScript to JavaScript:package.json):
dist/ directory.
5. Verify Installation
Run the info command to check system health:If Solana shows “Disconnected”, check your
SOLANA_RPC_URL and internet connection.Project Structure
After installation, your directory should look like:Development Mode
For active development with auto-reload:tsx watch to recompile on file changes.
Optional: Dashboard Setup
Karen includes a Next.js dashboard for visual monitoring:http://localhost:3000 and connects to the API server at http://localhost:3001.
Optional: MCP Server Setup
To use Karen as an MCP server for Claude Desktop or OpenClaw:Claude Desktop
Edit~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
OpenClaw
Add to your OpenClaw MCP configuration:karen_* tools available.
Troubleshooting
Error: Cannot find module
Error: Cannot find module
Dependencies not installed. Run:
Error: OPENAI_API_KEY not set
Error: OPENAI_API_KEY not set
Missing LLM API key. Check Should show:
.env file:Error: connect ECONNREFUSED
Error: connect ECONNREFUSED
Solana RPC endpoint unreachable. Try alternative:
.env
TypeScript errors during build
TypeScript errors during build
Ensure TypeScript version matches:If different, reinstall:
Error: EACCES permission denied
Error: EACCES permission denied
Node modules installed with wrong permissions. Fix:
Next Steps
Quickstart
Create your first agent in 5 minutes
CLI Reference
Complete command-line interface documentation
API Reference
REST API and MCP integration guide
Security Guide
Best practices for production deployment
System Requirements
Minimum
- OS: macOS 10.15+, Ubuntu 20.04+, Windows 10+ (WSL2)
- Node.js: 20.0.0+
- RAM: 2 GB
- Storage: 500 MB
- Network: Stable internet connection
Recommended
- OS: macOS 13+, Ubuntu 22.04+
- Node.js: 20.11.0+ (LTS)
- RAM: 4 GB+
- Storage: 2 GB (for logs and memory)
- Network: Low-latency connection to Solana RPC