Skip to content

jmvbambico/tiny-aigency

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiny Aigency

Turn invisible coding agents into a living pixel world inside your terminal.

Tiny Aigency is a lightweight TUI that visualizes AI coding agent activity as animated characters in themed terminal scenes. Instead of watching logs scroll by, see your agents collaborate in real time.

+------------- Tiny Aigency -------------+
|                                         |
|   [command desk]      [map table]       |
|   +==+               +==+              |
|   |OC| .             |EX| *            |
|   +==+               +==+              |
|   Orchestrator        Explorer          |
|                                         |
|   [crystal orb]      [bookshelf]        |
|   +==+               +==+              |
|   |OR| @             |LB| .            |
|   +==+               +==+              |
|   Oracle              Librarian         |
|                                         |
|   [drafting desk]    [repair bench]     |
|       (?)                               |
|   +==+               +==+              |
|   |DS| #             |FX|              |
|   +==+               +==+              |
|   Designer            Fixer             |
|                                         |
+-----------------------------------------+
| 4 agent(s) | Explorer joined | [q] quit |
+-----------------------------------------+

Features

  • Auto-discovery -- detects active agent sessions from your harness with zero configuration
  • Live visualization -- agents animate based on what they're actually doing (reading, writing, thinking, waiting)
  • Speech bubbles -- visual indicator when an agent needs your attention
  • Themed environments -- office scene with workstations, props, and positioned agents
  • Harness-agnostic -- ships with OpenCode and Claude Code adapters; extensible to any agent framework
  • Plugin-agnostic -- one OpenCode adapter supports all plugins (OMO-Slim, OMO, default agents, custom)
  • Dual renderer -- Kitty graphics protocol for full sprites, Unicode halfblock fallback for any terminal
  • Mouse + keyboard -- click agents, hover for tooltips, Tab to cycle, scroll to zoom
  • Tiny -- single static binary, <3MB, <20MB RSS, <2% CPU at idle

Requirements

  • A terminal with truecolor support (nearly all modern terminals)
  • One of the supported agent harnesses installed and configured:
  • For full sprite rendering: a Kitty-protocol terminal (Kitty, WezTerm, Ghostty)

Install

From source

git clone https://github.com/cryogenix/tiny-aigency
cd tiny-aigency
cargo build --release

The binary is at target/release/tiny-aigency.

From crates.io (coming soon)

cargo install tiny-aigency

Usage

tiny-aigency

On first run, you'll be prompted to select your agent harness. The choice is saved to ~/.config/tiny-aigency/config.toml for future sessions.

Tiny Aigency will immediately scan for existing agent sessions and display them. Start an agent session in another terminal to watch characters come alive.

Controls

Input Action
Tab / Shift+Tab Cycle between agents
q Quit
t Cycle theme
? Help overlay
Click agent Select and show details
Hover agent Tooltip with role and state
Scroll Zoom scene

How It Works

Tiny Aigency watches your agent harness's session files on disk:

Agent Harness (OpenCode / Claude Code)
        |
        |  writes session files to disk
        v
Session Storage (~/.local/share/opencode/storage/session/)
        |
        |  notify crate watches for changes
        v
Tiny Aigency (Rust TUI)
        |
        |  normalizes to AgentEvent
        v
Scene Engine -> Renderer -> Terminal

OpenCode

Sessions are stored as JSON files in ~/.local/share/opencode/storage/session/<project>/. Agent identity is extracted from session titles -- OMO-Slim and other plugins tag subagent sessions with (@agent-name subagent) in the title field.

No modifications to OpenCode or its plugins are required. Tiny Aigency is purely observational.

Claude Code

Watches JSONL transcript files in ~/.claude/projects/. Each terminal/sub-agent gets its own transcript file.

Agent States

Each agent's visual appearance reflects what they're doing:

State Visual Meaning
Idle gray No recent activity
Thinking cyan Planning, reasoning
Reading green File reads, searches
Writing yellow File writes, code generation
Running magenta Executing commands, tests
Repairing red Debugging, fixing errors
Waiting red + (?) Needs user input

Configuration

~/.config/tiny-aigency/config.toml:

harness = "opencode"
theme = "office"

[agent-map]
# Map harness-specific agent names to Pantheon roles.
# Unmapped names get a generic character.
explore = "explorer"
sisyphus-junior = "fixer"

Themes

A theme is a self-contained visual package: background, props, workstation positions, and character sprites.

themes/office/
  theme.toml
  background.png
  props/
    desk.png
    bookshelf.png
  characters/
    orchestrator/
      idle.png
      typing.png
      thinking.png
    explorer/
      ...

Characters belong to the theme for visual cohesion, but users can override any character in their config:

[characters]
fixer = "cyberpunk/characters/fixer"
oracle = "~/.local/share/tiny-aigency/characters/custom-wizard"

The bundled Office theme uses sprites from 2dPig Pixel Office (CC0).

Architecture

src/
  main.rs           # TUI app: startup, main loop, rendering
  config.rs         # Config load/save, agent-map resolution
  events.rs         # AgentEvent, AgentRole, AgentState
  discovery/
    mod.rs          # HarnessAdapter trait
    opencode.rs     # OpenCode session file watcher
    claude.rs       # Claude Code JSONL watcher
  scene/
    mod.rs          # Scene manager, event routing
    agent.rs        # Agent state machine, animation
    animation.rs    # Frame counting, sprite mapping
  renderer/
    mod.rs          # Backend detection (Kitty vs halfblock)
    kitty.rs        # Kitty graphics protocol renderer
    halfblock.rs    # Unicode halfblock fallback
  theme/
    mod.rs          # Theme definition loading

Supported Agent Harnesses

Harness Status Agent Identity
OpenCode (OMO-Slim) Supported Parsed from session title (@name subagent)
OpenCode (OMO) Supported Same mechanism
OpenCode (default) Supported Same mechanism
Claude Code Stub Single agent per transcript
Aider Planned Markdown chat history
Gemini CLI Planned Session JSON

Inspiration

  • pixel-agents -- VS Code extension that turns Claude Code into a pixel art office. Tiny Aigency shares the vision of agent-agnostic, platform-agnostic visualization, but runs in the terminal instead of a webview.

Roadmap

  • Kitty graphics protocol sprite rendering
  • Aider and Gemini CLI adapters
  • Additional themes (Cyberpunk, Forest, Space, Zen)
  • Community theme and character packs
  • Multi-agent visual interaction (agents talking to each other)
  • Thought bubbles with reasoning text
  • Token usage / context window stats as in-game health bars

License

MIT

About

Lightweight TUI that visualizes AI coding agent activity as animated characters in themed terminal scenes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages