4 AI agents working together. One seamless experience.
Self-hosted. Multi-provider. Desktop app. Remote control via LINE / WhatsApp / Messenger.
Download ยท Getting Started ยท Features ยท Developer Setup ยท Architecture ยท API Reference
No terminal required โ download, install, start chatting.
ใฟใผใใใซไธ่ฆ โ ใใฆใณใญใผใใใฆใใไฝฟใใพใใ
| Platform | Download | Size |
|---|---|---|
| ๐ macOS | KAGE-macOS.dmg | ~120 MB |
| ๐ช Windows | KAGE-Windows-Setup.exe | ~90 MB |
๐ก Alternatively, visit the Releases page to see all versions.
macOS: Open the .dmg โ drag KAGE to your Applications folder โ double-click to launch.
Windows: Run the .exe installer โ follow the prompts โ KAGE launches automatically.
On first launch, the Setup Wizard appears. Paste your AI provider API key:
| Provider | Get your key |
|---|---|
| Anthropic (recommended) | console.anthropic.com |
| OpenAI | platform.openai.com |
| Google AI | aistudio.google.com |
Set a password for KAGE, then click Complete Setup.
That's it! Type a message and KAGE's 4-agent pipeline handles the rest:
You: "Organize my project files and create a summary report"
Sentinel โ security check
Planner โ break into subtasks
Executor โ run tools (filesystem, search, code...)
Reviewer โ verify results & quality
โ
Done โ files organized + summary delivered
KAGE's Sentinel agent runs before and after every task:
- Input validation โ blocks dangerous commands before execution
- PII detection โ auto-masks credit card numbers, SSNs, phone numbers
- Plan review โ validates execution plans for safety
- Output sanitization โ ensures no sensitive data leaks
- Loop detection โ prevents infinite agent loops
- Cost enforcement โ hard limits on per-task / daily / monthly API costs
KAGE automatically detects which tools are needed from your message and connects them:
You: "Search GitHub for React component libraries"
โ Auto-connects github + brave_search servers
โ Searches, analyzes, summarizes
| Category | Examples |
|---|---|
| Development | GitHub, GitLab, Docker, Kubernetes, Git |
| Productivity | Slack, Notion, Google Drive, Todoist |
| Data | PostgreSQL, MySQL, MongoDB, Redis |
| Search | Brave Search, Google Search |
| Cloud | AWS, GCP, Azure, Vercel |
| Communication | Gmail, Discord, Telegram |
Automatically routes each agent to the cheapest suitable model โ up to 90% cost reduction:
| Agent | Role | Model Tier |
|---|---|---|
| Sentinel | Security check | Fast (cheapest) |
| Planner | Task planning | Scales with complexity |
| Executor | Tool execution | Your chosen model |
| Reviewer | Quality check | Fast (cheapest) |
Real token tracking with per-agent cost breakdown. No more estimated costs.
| Provider | Models |
|---|---|
| Anthropic | Claude Opus 4.6, Sonnet 4.6, Haiku 4.5 |
| OpenAI | GPT-5, GPT-4.1, o3, o4-mini |
| Gemini 3.1 Pro, 2.5 Flash | |
| Groq | Llama 4, DeepSeek R1 |
| xAI | Grok 4.20 |
| Alibaba | Qwen 3, Qwen Max |
| Moonshot | Kimi K2 |
| OpenRouter | 100+ models |
Run KAGE on your PC at home, control it from your phone:
You (LINE): authenticate my-passphrase
KAGE: โ
Authenticated.
You (WhatsApp): check my project build status
KAGE: Build passed. 142 tests green. Deploy ready.
Supported: LINE, WhatsApp, Facebook Messenger โ same full 4-agent pipeline.
Save frequently-used instructions as reusable templates with {{variables}}:
Template: "{{folder}}ๅ
ใฎใใกใคใซใ{{format}}ๅฝขๅผใงๆด็ใใฆ"
โ Fill in: folder=~/Desktop, format=ๆฅไปๅฅ
โ One-click execution
Full UI and agent responses in both English and Japanese.
KAGE checks for updates automatically on launch. When a new version is available:
- A dialog asks: "v{x.y.z} is available. Download?"
- The update downloads in the background
- When ready: "Restart to install?"
- KAGE restarts and you're on the latest version
No manual re-download needed. Updates are delivered through GitHub Releases.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ KAGE Architecture โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Electron โ โ Express Server โ โ
โ โ Desktop โ โ โ โ
โ โ App โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ (.dmg/exe) โ โ โ Orchestrator โ โ โ
โ โโโโโโโโโโโโโโค โ โ โ โ โ
โ โ React UI โโโโโบโ โ ModelRouter โ Complexity Check โ โ โ
โ โ โSSE โ โ TokenTracker โ Real Cost โ โ โ
โ โ Chat โ โ โ โ โ โ
โ โ Monitor โ โ โ Sentinel โ Planner โ โ โ
โ โ Tools โ โ โ โ โ โ โ โ
โ โ Templates โ โ โ AutoMCP โ Executor (รN) โ โ โ
โ โ Settings โ โ โ โ โ โ โ โ
โ โโโโโโโโโโโโโโ โ โ Reviewer โ Response โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโ โ โ โ
โ โ LINE โ โ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โ โ
โ โ WhatsApp โโโโโบโ โ SQLite โ โ MCP Servers โ โ โ
โ โ Messenger โ โ โ DB โ โ (50+ auto-inst) โ โ โ
โ โโโโโโโโโโโโโโ โ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Layer | Technology | Purpose |
|---|---|---|
| Desktop | Electron + electron-updater | Native macOS / Windows app with auto-update |
| Frontend | React 18 + Vite + Tailwind CSS | Fast, responsive dark UI |
| Backend | Node.js + Express | API server & orchestration |
| Database | SQLite (better-sqlite3) | Zero-config persistent storage |
| AI | Anthropic SDK + MCP SDK | Multi-model & tool integration |
| Cost Engine | ModelRouter + TokenTracker | Smart routing & real cost tracking |
| Auth | bcryptjs + JWT | Secure authentication |
| Realtime | Server-Sent Events (SSE) | Live agent status streaming |
| i18n | Custom hooks | English + Japanese |
Click to expand / ใฏใชใใฏใใฆๅฑ้
| Requirement | Version |
|---|---|
| Node.js | 18+ |
| npm | 9+ |
| API Key | Anthropic, OpenAI, Google, or any supported provider |
# 1. Clone the repository
git clone https://github.com/jun-omise/KAGE.git
cd KAGE
# 2. Install dependencies
npm install
# 3. Configure environment
cp .env.example .envEdit .env:
ANTHROPIC_API_KEY=sk-ant-...your-key...
JWT_SECRET=any-random-string-here
PORT=3456# 4. Start development server
npm run devOpen http://localhost:5173 โ the Setup Wizard will guide you through the rest.
# Development
npm run dev # Start client + server (recommended)
npm run server # Express server only (port 3456)
npm run client # Vite dev server only (port 5173)
npm run build # Production build (client)
# Desktop App Build
npm run electron:dev # Run Electron in dev mode
npm run electron:build:mac # Build macOS .dmg
npm run electron:build:win # Build Windows .exe| Variable | Required | Default | Description |
|---|---|---|---|
ANTHROPIC_API_KEY |
Yes* | โ | Anthropic API key |
JWT_SECRET |
Yes | โ | Secret for JWT signing |
PORT |
No | 3456 |
Server port |
*At least one AI provider key is required. Additional keys can be configured through the Settings UI.
KAGE/
โโโ electron/ # Desktop app (Electron)
โ โโโ main.js # Main process + auto-updater
โ โโโ preload.js # Preload script
โ โโโ builder.config.js # Build config (dmg/exe)
โ
โโโ client/ # Frontend (React + Vite)
โ โโโ src/
โ โโโ components/
โ โ โโโ ChatPanel.jsx # Chat interface
โ โ โโโ AgentMonitor.jsx # Agent status (Cards / Timeline)
โ โ โโโ ProgressIndicator.jsx # Pipeline progress bar
โ โ โโโ TemplateEditor.jsx # Template variable editor
โ โ โโโ ToolManager.jsx # 50+ MCP server catalog
โ โ โโโ ...
โ โโโ hooks/
โ โ โโโ useTemplates.js # Template CRUD
โ โ โโโ useSSE.js # Real-time events + MCP auto-connect
โ โโโ i18n/ # en.json, ja.json
โ
โโโ server/ # Backend (Express)
โ โโโ core/
โ โ โโโ orchestrator.js # 4-agent pipeline + auto MCP
โ โ โโโ ai-client.js # Multi-provider AI client
โ โ โโโ model-router.js # Complexity-based model routing
โ โ โโโ model-registry.js # 35+ model catalog & pricing
โ โ โโโ token-tracker.js # Real token counting
โ โ โโโ agents/ # Sentinel, Planner, Executor, Reviewer
โ โโโ mcp/
โ โ โโโ client.js # MCP connection manager
โ โ โโโ auto-resolver.js # Auto-detect & auto-connect MCP
โ โ โโโ builtin-servers.js # 50+ server definitions
โ โโโ security/ # PII, cost, audit, loop detection
โ โโโ notifications/ # Webhook, LINE, WhatsApp, Messenger
โ โโโ routes/ # API route modules
โ
โโโ .env.example
โโโ package.json
โโโ README.md
KAGE uses GitHub Actions for automated builds. To release:
# 1. Bump version in package.json
npm version patch # or minor / major
# 2. Push the tag
git push origin main --tagsGitHub Actions will automatically:
- Build macOS
.dmgand Windows.exe - Create a GitHub Release
- Upload installers as release assets
- Generate
latest-mac.yml/latest.ymlfor auto-updater
Click to expand / ใฏใชใใฏใใฆๅฑ้
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/chat |
Send message โ triggers 4-agent pipeline |
GET |
/api/stream/:id |
SSE stream for real-time agent updates |
GET |
/api/conversations |
List conversations |
POST |
/api/approval |
Approve / reject agent actions |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/models |
List all 35+ models by provider |
GET |
/api/models/routing |
Get model routing config |
POST |
/api/models/routing/preview |
Preview routing for a message |
PUT |
/api/models/active |
Switch active model |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/tools/builtin |
List 50+ available MCP servers |
POST |
/api/tools/connect |
Connect an MCP server |
POST |
/api/suggestions/mcp |
Get smart MCP suggestions |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/tasks?is_template=true |
List templates |
POST |
/api/tasks |
Create task/template |
POST |
/api/tasks/:id/run |
Execute with variable substitution |
| Event | Payload |
|---|---|
pipeline:progress |
{ phase, stepIndex, totalSteps, elapsed_ms } |
pipeline:routing |
{ complexity, mainModel, routing } |
agent:detail |
{ agent, currentAction, model, toolName } |
mcp:auto_connecting |
{ serverId, serverName } |
mcp:auto_connected |
{ serverId, tools[] } |
| Issue | Solution |
|---|---|
| macOS: "App is damaged" / ้ใใพใใ | Run: xattr -cr /Applications/KAGE.app |
| Windows: SmartScreen warning | Click More info โ Run anyway |
| Port 3456 in use | Change PORT in .env or Settings UI |
| "API key not set" | Add key in the Setup Wizard or Settings page |
| MCP server won't connect | Check: npx -y @modelcontextprotocol/server-filesystem /tmp |
npm install fails (dev) |
macOS: xcode-select --install / Windows: install Build Tools |
| Electron build fails (dev) | Run npm run build first, then npm run electron:build:mac |
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes
- Push and open a Pull Request
MIT License โ see LICENSE for details.
Built with Anthropic Claude + MCP