Skip to content

lzblack/agimi

Repository files navigation

Agimi

Your AI agent's eyes on the desktop.

A desktop pet that watches your long-running tasks — AI coding agents, builds, deploys — so you don't have to stare at a terminal waiting. Agimi reacts with animations, sound effects, and notification bubbles when your tasks complete or fail.

Quick Start

npm install
npm run tauri dev

How It Works

Agimi runs an HTTP server on port 19280. Remote agents send events via POST /event, and the pet reacts:

Event Pet reaction
Stop Happy animation + sound
StopFailure / PostToolUseFailure Error animation + sound
PreToolUse / PostToolUse Typing animation
No events for 5 min Falls asleep

Test it

curl -X POST http://localhost:19280/event \
  -H "Content-Type: application/json" \
  -d '{"event":"Stop","message":"Build complete!"}'

Or run the full demo: ./test-demo.sh

Claude Code Integration

Add HTTP hooks to your Claude Code settings.json (on the machine running the agent):

{
  "hooks": {
    "Stop": [{
      "hooks": [
        { "type": "http", "url": "http://<your-ip>:19280/event", "async": true }
      ]
    }],
    "PreToolUse": [{
      "hooks": [
        { "type": "http", "url": "http://<your-ip>:19280/event", "async": true }
      ]
    }],
    "PostToolUse": [{
      "hooks": [
        { "type": "http", "url": "http://<your-ip>:19280/event", "async": true }
      ]
    }],
    "PostToolUseFailure": [{
      "hooks": [
        { "type": "http", "url": "http://<your-ip>:19280/event", "async": true }
      ]
    }],
    "UserPromptSubmit": [{
      "hooks": [
        { "type": "http", "url": "http://<your-ip>:19280/event", "async": true }
      ]
    }]
  }
}

Replace <your-ip> with your Tailscale IP or localhost if agent and pet run on the same machine.

Security

The HTTP server listens on 0.0.0.0:19280 with no authentication. This is by design — Tailscale or an SSH tunnel provides the security layer.

Do not expose port 19280 to the public internet. Use Tailscale or SSH reverse tunnel only.

Codex CLI Integration

Copy hooks/codex-hooks.json to your Codex config directory and replace <tailscale-ip> with your Agimi host.

Copilot CLI Integration

Copy hooks/copilot-hook.sh to your Copilot CLI hooks directory. Set AGIMI_HOST and AGIMI_PORT environment variables.

Gemini CLI Integration

Copy hooks/gemini-hook.sh to your Gemini CLI hooks directory. Set AGIMI_HOST and AGIMI_PORT environment variables.

Telegram Fallback

When Agimi is offline (Windows asleep), events can fall back to Telegram. See hooks/fallback-notify.sh. Set TELEGRAM_TOKEN and TELEGRAM_CHAT environment variables, then use as a dual-hook:

{
  "hooks": {
    "Stop": [{ "hooks": [
      { "type": "http", "url": "http://<tailscale-ip>:19280/event", "async": true },
      { "type": "command", "command": "~/.agimi/hooks/fallback-notify.sh", "async": true }
    ] }]
  }
}

Configuration

Config file: ~/.agimi/config.json (created on first run)

{
  "port": 19280,
  "skin": "orange-tabby",
  "size": 128,
  "position": { "x": 100, "y": 100 },
  "volume": 0.7,
  "sound_enabled": true
}

Skins

Right-click the pet or use the system tray to switch between skins:

  • Orange Tabby (default)
  • Ragdoll

Sound

Plays game sounds on state transitions (requires sound files in ~/.claude/sounds/):

  • Happy → BOTW_Yahaha.mp3
  • Error → Civ5_Declare_a_War.mp3
  • Typing → RDD_Stinger_soft.mp3

License

MIT

About

Your AI agent's eyes on the desktop

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors