Self-Extensible AI Assistant π
Built for folks who want their AI to actually do things β not just chat.
π§ Active Development β This project is being actively built. Expect frequent updates!
π OpenWhale Website β Coming soon
βοΈ OpenWhale Hosting β Managed hosting coming soon
OpenWhale is an AI assistant that can take action. It connects to multiple AI models, talks on your behalf through WhatsApp/Telegram/Discord, browses the web, executes code, manages your calendar, and basically does whatever you need it to do.
Think of it as Claude, GPT-4, or DeepSeek with arms and legs.
- It's agentic β not just a chatbot. It can use tools, run commands, send messages, and interact with the real world.
- Use any model β Claude, GPT-4, DeepSeek, Groq, Gemini, Ollama. Switch whenever you want.
- Runs anywhere β Docker, bare metal, your Raspberry Pi. Whatever works for you.
- Actually secure β JWT auth, API keys, rate limiting, audit logs. The boring stuff that matters.
- Node.js 22+ β Required for the runtime
- pnpm β Recommended package manager (handles native modules better)
# Install pnpm if you don't have it
npm install -g pnpm# Clone it
git clone https://github.com/viralcode/openwhale.git
cd openwhale
# Install dependencies (use pnpm, not npm!)
pnpm install
# Allow native modules to build (important!)
pnpm approve-builds
# Set up your environment
cp .env.example .env
# Add your API keys to .env
# Run it
pnpm run devdocker-compose up -dThat's it. Hit http://localhost:18789/health to make sure it's alive.
Error: Could not locate the bindings file.
This happens when using npm instead of pnpm, or when native modules weren't built properly.
Fix:
# Remove existing node_modules
rm -rf node_modules package-lock.json
# Use pnpm instead
pnpm install
pnpm approve-builds # Select all packages when prompted
pnpm run devMake sure you pulled the latest version of the repository which includes the lockfile:
git pull origin mainSome packages require Xcode Command Line Tools:
xcode-select --installOpenWhale comes with a web dashboard for managing everything without touching the terminal.
Access it at: http://localhost:18789/dashboard
- Chat β Talk to the AI with full tool support
- Connect channels β Link WhatsApp, Telegram, Discord by scanning QR codes or adding tokens
- Manage providers β Add API keys for Claude, GPT-4, Gemini, etc.
- Configure skills β Enable GitHub, Notion, Weather, Google services
- View message history β See all conversations across channels
- Monitor system β Check connected channels, active sessions, audit logs
First time running? The dashboard walks you through:
- Checking prerequisites (Node, Python, FFmpeg)
- Adding your AI provider keys
- Connecting messaging channels
- Enabling skills
The dashboard is protected by authentication.
Default credentials:
Username: admin
Password: admin
β οΈ Security Note: Change the default password after first login!
Features:
- Session-based auth with 7-day expiry
- Admin can create additional users
- Password change in Settings
- Logout button in sidebar
OpenWhale can send and receive messages through multiple platforms. Here's how to set them up:
The easiest one β works with your personal WhatsApp account.
Via Dashboard:
- Go to
http://localhost:18789/dashboard - Navigate to Channels β WhatsApp
- Click "Connect"
- Scan the QR code with your phone (WhatsApp β Linked Devices β Link a Device)
- Done! Messages to your number will be handled by the AI
Via CLI:
npm run cli whatsapp login # Shows QR code in terminal
npm run cli whatsapp status # Check if connected
npm run cli whatsapp logout # DisconnectYour session is saved in ~/.openwhale/whatsapp-auth/ so you don't need to scan again.
- Create a bot with @BotFather on Telegram
- Copy the bot token
- Add to
.env:TELEGRAM_BOT_TOKEN=your-bot-token
- Restart OpenWhale
- Message your bot β the AI will respond
- Create a bot at Discord Developer Portal
- Enable "Message Content Intent" under Bot settings
- Copy the bot token
- Add to
.env:DISCORD_BOT_TOKEN=your-bot-token
- Invite bot to your server using the OAuth2 URL generator
- Restart OpenWhale
These are the built-in capabilities the AI can use. You don't need to configure anything β they just work.
| Tool | What it does |
|---|---|
| exec | Run shell commands on your machine |
| file | Read, write, list files and directories |
| browser | Open URLs, take screenshots, interact with web pages |
| screenshot | Capture your screen or specific windows |
| code_exec | Run Python/JavaScript code in a sandbox |
| web_fetch | Fetch content from URLs (APIs, web pages) |
| memory | Remember things across conversations |
| cron | Schedule tasks to run at specific times |
| canvas | Generate and manipulate images |
| tts | Text-to-speech (say things out loud) |
| image | Analyze and process images |
| nodes | Work with structured data and knowledge graphs |
OpenWhale has a powerful memory system (inspired by OpenClaw) that remembers context across conversations and restarts.
~/.openwhale/memory/
βββ MEMORY.md # Long-term facts
βββ 2024-01-15.md # Daily notes
βββ vector.db # Vector embeddings for semantic search
| Command | What it does |
|---|---|
/memory |
View your memory files |
/status |
Show session info |
/reset |
Clear session, start fresh |
/history |
Show recent messages |
OpenWhale supports semantic search over your memories β find related content by meaning, not just keywords.
Three embedding providers (just like OpenClaw):
-
Local (no API key!) β Uses
node-llama-cppwith a 300MB GGUF model- Downloads automatically on first use
- Runs entirely on your machine
- Model:
embeddinggemma-300M-Q8_0
-
OpenAI β If
OPENAI_API_KEYis set- Model:
text-embedding-3-small - Best accuracy, requires API key
- Model:
-
Gemini β If
GOOGLE_API_KEYis set- Model:
text-embedding-004 - Good free alternative
- Model:
Auto-selection order: Local β OpenAI β Gemini
Ask the AI to:
- "Remember that my favorite color is blue" β Saves to MEMORY.md
- "Add to today's notes: meeting at 3pm" β Saves to daily log
- "Search my memory for project ideas" β Vector search
- "Index my memory files" β Re-index for search
- "Show memory status" β See embedding provider info
Conversations are saved to JSONL transcripts, so you can:
- Continue where you left off after restarts
- Keep context across multiple messages
- Review past conversations
OpenWhale can extend itself! Create custom automations via chat that persist and run on schedules.
Extensions are stored as TypeScript files in ~/.openwhale/extensions/
Just ask the AI:
- "Create an extension that reminds me to drink water every hour"
- "Make an extension that checks Bitcoin price at 9 AM and sends it to WhatsApp"
- "Create a daily standup reminder extension"
| Action | What it does |
|---|---|
create |
Create a new extension with code and optional schedule |
list |
List all extensions |
get |
View an extension's code |
update |
Modify an extension |
delete |
Remove an extension |
enable/disable |
Toggle an extension |
run |
Execute an extension manually |
Each extension has:
{
"name": "daily_reminder",
"description": "Sends a daily reminder",
"version": "1.0.0",
"enabled": true,
"schedule": "0 9 * * *",
"channels": ["whatsapp"]
}Use cron expressions for scheduled execution:
0 9 * * *β Daily at 9 AM0 */2 * * *β Every 2 hours0 9 * * 1-5β Weekdays at 9 AM
// Extension code (runs daily)
const response = await fetch('https://api.coinbase.com/v2/prices/BTC-USD/spot');
const data = await response.json();
return `Bitcoin price: $${data.data.amount}`;Extensions automatically send their return value to configured channels!
Skills are integrations with external services. They need API keys to work.
Access repositories, issues, pull requests.
GITHUB_TOKEN=ghp_your_tokenCreate a token at github.com/settings/tokens with repo scope.
Current conditions and forecasts.
OPENWEATHERMAP_API_KEY=your_keyGet a free key at openweathermap.org.
Manage pages and databases.
NOTION_API_KEY=secret_your_keyCreate an integration at notion.so/my-integrations.
Calendar, Gmail, Drive, and Tasks β all in one.
- Create a project in Google Cloud Console
- Enable Calendar, Gmail, Drive, and Tasks APIs
- Create OAuth credentials (Desktop app)
- Download
credentials.jsonto~/.openwhale/google/credentials.json - Run OpenWhale and visit the Google auth URL shown in logs
- Authorize access β tokens are saved automatically
Securely fetch passwords and secrets.
OP_CONNECT_TOKEN=your_connect_token
OP_CONNECT_HOST=http://localhost:8080Requires 1Password Connect server.
Works automatically on Mac β no config needed. The AI can read/write your Notes and Reminders.
Control playback, search music, manage playlists.
SPOTIFY_CLIENT_ID=your_client_id
SPOTIFY_CLIENT_SECRET=your_client_secretCreate an app at developer.spotify.com.
Manage boards, lists, and cards.
TRELLO_API_KEY=your_key
TRELLO_TOKEN=your_tokenGet keys at trello.com/app-key.
OpenWhale supports 8 AI providers with automatic failover. Add the keys for whichever services you want to use.
| Provider | Env Variable | Top Models (Feb 2026) |
|---|---|---|
| Anthropic | ANTHROPIC_API_KEY |
claude-sonnet-5-20260203, claude-opus-4-5, claude-sonnet-4-5 |
| OpenAI | OPENAI_API_KEY |
gpt-5.2, gpt-5, gpt-4o, o4-mini |
| Google Gemini | GOOGLE_API_KEY |
gemini-3-pro-preview, gemini-3-flash-preview, gemini-2.5-pro |
| Qwen | DASHSCOPE_API_KEY |
qwen3-max, qwq-plus, qwen3-coder-plus, qwen3-vl-plus |
| DeepSeek | DEEPSEEK_API_KEY |
deepseek-chat, deepseek-coder, deepseek-reasoner |
| Groq | GROQ_API_KEY |
llama-3.3-70b-versatile, mixtral-8x7b-32768 |
| Together AI | TOGETHER_API_KEY |
Any open-source model |
| Ollama | OLLAMA_HOST |
Local models (no API key needed) |
# Example .env configuration
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...
GOOGLE_API_KEY=...
DASHSCOPE_API_KEY=... # or QWEN_API_KEY
DEEPSEEK_API_KEY=...
GROQ_API_KEY=...
OLLAMA_HOST=http://localhost:11434Fallback Order: Anthropic β OpenAI β Google β Qwen β DeepSeek β Groq β Together β Ollama
Switch models on the fly in the dashboard or CLI.
The CLI is where the magic happens:
# Start an interactive chat
npm run chat
# Check your setup
npm run cli providers # See which AI providers are connected
npm run cli tools # List available tools
npm run cli channels # Check messaging channels
npm run cli skills # See skill status
# WhatsApp management
npm run cli whatsapp login # Scan QR code
npm run cli whatsapp status # Check connection
npm run cli whatsapp logout # Disconnect
# Background daemon (keeps running after terminal closes)
npm run cli daemon install # Install as system service
npm run cli daemon start # Start daemon
npm run cli daemon status # Check if running
npm run cli daemon stop # Stop daemonOpenWhale exposes an OpenAI-compatible API, so you can plug it into existing tools:
# Chat completion
curl -X POST http://localhost:18789/api/agent/chat/completions \
-H "Authorization: Bearer your-token" \
-H "Content-Type: application/json" \
-d '{"messages": [{"role": "user", "content": "Hello!"}]}'| Endpoint | Description |
|---|---|
GET /health |
Health check |
POST /auth/register |
Create account |
POST /auth/login |
Get access token |
POST /api/agent/chat/completions |
Chat (with tools) |
GET /api/providers |
List AI providers |
GET /api/channels |
List channels |
GET /dashboard |
Web dashboard |
src/
βββ agents/ # Multi-agent routing and orchestration
βββ auth/ # JWT, API keys, sessions
βββ channels/ # WhatsApp, Telegram, Discord, Slack adapters
βββ cli.ts # Interactive terminal interface
βββ daemon/ # Background service (launchd on macOS)
βββ dashboard/ # Web admin panel
βββ db/ # SQLite/PostgreSQL with Drizzle ORM
βββ gateway/ # Hono-based HTTP API
βββ integrations/# Google APIs (Calendar, Gmail, Drive, Tasks)
βββ providers/ # Anthropic, OpenAI, Google, Groq, Ollama
βββ security/ # Rate limiting, RBAC, audit logs, sandboxing
βββ sessions/ # Persistent conversation history
βββ skills/ # GitHub, Notion, Spotify, Weather, Apple, etc.
βββ tools/ # File, browser, code execution, screenshots
All settings go in .env:
# Server
GATEWAY_PORT=18789
GATEWAY_HOST=0.0.0.0
# Database (SQLite by default)
DATABASE_URL=file:./data/openwhale.db
# Or PostgreSQL:
# DATABASE_URL=postgresql://user:pass@localhost:5432/openwhale
# Security β CHANGE THIS!
JWT_SECRET=change-me-to-something-random-at-least-32-chars
SECURITY_MODE=local # or 'strict' for production
# Logging
LOG_LEVEL=infoPRs welcome! If you find a bug or have an idea, open an issue. Keep it friendly.
MIT β do whatever you want with it.
Built with β€οΈ by Jijo John
