Skip to content

dead1786/kagora

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Kagora

One app to manage all your AI agents. Terminal, chat, automation β€” unified.

CI License: MIT Node 20+ Electron TypeScript


Most AI tools give you a chatbox. Kagora gives you a command center.

Each agent gets its own real terminal. They talk to each other. They run on schedules. You control them all from one window β€” or from your phone via HTTP API. No wrappers, no sandboxes, no toy shells.

Features

  • πŸ–₯️ Multi-terminal β€” Every agent runs in its own independent PTY shell. Full bash, full control.
  • πŸ’¬ Group chat + DM β€” Agents talk to each other, to you, or in channels. Built-in, not bolted-on.
  • ⏰ Scheduler β€” Interval, daily, weekly, and monthly automations with descriptions. Set it and forget it.
  • πŸ”Œ HTTP API β€” Port 7777. Integrate with Telegram, LINE, scripts, whatever you want.
  • 🧠 Startup memory β€” Each agent remembers its boot commands. Restore context on launch.
  • 🌐 i18n β€” English, 繁體中文, ζ—₯本θͺž. More welcome.
  • πŸ”’ Admin mode β€” You're the operator. Token auth, role control, your rules.

Quick Start

Three commands. That's it.

git clone https://github.com/dead1786/kagora.git
cd kagora
npm install
npm run dev

Windows note: You need VS Build Tools with C++ workload and Python 3 (pip install setuptools) for node-pty compilation. The postinstall script handles the rest.

macOS: xcode-select --install | Linux: sudo apt install build-essential python3

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Kagora App                     β”‚
β”‚                                                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”‚
β”‚  β”‚ Agent A  β”‚  β”‚ Agent B  β”‚  β”‚ Agent C  β”‚  ...  β”‚
β”‚  β”‚ (PTY)    β”‚  β”‚ (PTY)    β”‚  β”‚ (PTY)    β”‚       β”‚
β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜       β”‚
β”‚       β”‚              β”‚              β”‚             β”‚
β”‚       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”˜β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜             β”‚
β”‚                  β”‚                                β”‚
β”‚         β”Œβ”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”                       β”‚
β”‚         β”‚   Message Bus  β”‚                       β”‚
β”‚         β”‚  (chat + DM)   β”‚                       β”‚
β”‚         β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜                       β”‚
β”‚                 β”‚                                 β”‚
β”‚    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                    β”‚
β”‚    β”‚            β”‚            β”‚                    β”‚
β”‚  β”Œβ”€β”΄β”€β”€β”   β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”   β”Œβ”€β”€β”€β”΄β”€β”€β”€β”€β”               β”‚
β”‚  β”‚ UI β”‚   β”‚Schedulerβ”‚   β”‚HTTP APIβ”‚               β”‚
β”‚  β”‚Reactβ”‚   β”‚ (cron)  β”‚   β”‚ :7777  β”‚               β”‚
β”‚  β””β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β–²                       β–²
        β”‚                       β”‚
     Desktop               External
     (Electron)         (curl / bots / scripts)

HTTP API

Default: http://127.0.0.1:7777 β€” see AGENTS-GUIDE.md for full docs.

Send a message:

curl -X POST http://127.0.0.1:7777/api/chat \
  -H "Content-Type: application/json" \
  -d '{"from": "operator", "to": "group", "text": "status report"}'

Inject a command into an agent's terminal:

curl -X POST http://127.0.0.1:7777/api/terminal/inject \
  -H "Content-Type: application/json" \
  -d '{"agentId": "claude", "text": "git status\n"}'

Optional auth: Set KAGORA_API_TOKEN=your-secret and include Authorization: Bearer your-secret in requests.

Method Endpoint What it does
POST /api/chat Send message (group or DM)
GET /api/chat?channel=xxx Read chat history
POST /api/terminal/inject Send text to agent terminal
GET /api/agents List agents
GET /api/automations List scheduled tasks
POST /api/automations Create automation
PATCH /api/automations/:id Update automation
DELETE /api/automations/:id Delete automation

Plugin System

Extend Kagora with plugins. Each plugin is a folder in plugins/ with a plugin.json manifest and a JS entry file.

Create a plugin:

plugins/
  my-plugin/
    plugin.json
    index.js

plugin.json:

{
  "id": "my-plugin",
  "name": "My Plugin",
  "version": "1.0.0",
  "description": "What it does",
  "main": "index.js"
}

index.js:

function activate(ctx) {
  // Register a webhook at GET /api/plugins/my-plugin/health
  ctx.webhook.register('GET', 'health', (_req, res) => {
    res.writeHead(200, { 'Content-Type': 'application/json' });
    res.end(JSON.stringify({ status: 'ok' }));
  });

  // React to chat messages
  ctx.events.on('chat:message', (msg) => {
    if (msg.text === '!hello') {
      ctx.chat.send('my-plugin', 'group', 'Hello from plugin!');
    }
  });

  // Run something every 60 seconds
  ctx.scheduler.addInterval('heartbeat', 60000, () => {
    ctx.log.info('still alive');
  });
}

function deactivate() { /* cleanup */ }

module.exports = { activate, deactivate };

Plugin Context API:

API Methods Description
ctx.chat send(from, to, text), history(channel), agents() Chat operations
ctx.terminal inject(agentId, text), write(agentId, data), has(agentId) Terminal control
ctx.webhook register(method, path, handler), unregister(method, path) HTTP endpoints under /api/plugins/<id>/
ctx.scheduler addInterval(name, ms, fn), removeInterval(name) Periodic tasks
ctx.events on(event, handler), off(event, handler) Subscribe to chat:message, agent:added, agent:removed, terminal:data, terminal:exit
ctx.log info(), warn(), error() Namespaced logging

See examples/plugins/hello-world/ for a complete example.

Screenshots

Coming soon.

Contributing

PRs welcome. Keep it clean:

  1. Fork β†’ branch β†’ commit β†’ PR
  2. Run npm test before submitting
  3. TypeScript strict mode. No any unless you have a reason.
  4. One feature per PR. Small diffs merge faster.

See AGENTS-GUIDE.md for API integration details.

License

MIT β€” do whatever you want.

Releases

No releases published

Packages

 
 
 

Contributors