Xenith is InferNode's default graphical user interface, a fork of the Acme editor optimized for AI agents and AI-human collaboration.
Xenith maintains Acme's elegant text-based philosophy while adding capabilities specifically designed for AI integration:
- 9P Filesystem Interface - Agents interact via standard file operations
- Namespace Security - Capability-based access control for AI containment
- Observable Operations - All agent activity visible to humans
- Multimodal Support - Text and images in the same environment
- Dark Mode - Modern theming with Catppuccin and custom colors
Unlike JSON-RPC protocols (MCP) or REST APIs, Xenith exposes everything as files:
/mnt/xenith/
├── new # Create window (write returns ID)
├── focus # Current focus window
└── <id>/
├── body # Window text content
├── tag # Title/command line
├── addr # Text address (selection range)
├── ctl # Control commands
├── event # Event stream
├── colors # Per-window theming
└── image # Image display control
An AI agent reads and writes files. No SDK required. No parsing required. LLMs understand filesystem operations naturally.
Inferno®'s namespace model provides capability-based security:
# Agent sees only what you bind:
sys->bind("/services/llm", "/llm", Sys->MREPL);
sys->bind("/tools/safe", "/tools", Sys->MREPL);
sys->bind("/tmp/scratch", "/scratch", Sys->MCREATE);
# Nothing else exists from agent's perspective
Benefits:
- Explicit grants - Agent cannot access unbounded resources
- Observable - Human sees all namespace bindings
- Dynamic - Grant or revoke capabilities at runtime
- No escape - Namespace boundary is enforced by kernel
Xenith windows are shared workspaces:
┌─ Source Code ─────────────┐ ┌─ Agent Dialog ────────────┐
│ func main() { │ │ Human: Add error handling │
│ // Code here │ │ Agent: I'll wrap this in │
│ } │ │ a try-catch block... │
└───────────────────────────┘ └───────────────────────────┘
- Human edits appear as events to the agent
- Agent modifications are visible immediately
- Middle-click executes commands (Acme-style)
- Both parties work on the same text
Xenith includes a modern dark theme (Catppuccin Mocha) and full color customization:
# Use dark theme
xenith -t catppuccin
# Traditional Acme colors
xenith -t plan9
# Custom colors via environment
export xenith_bg_text_0=#1E1E2E
export xenith_fg_text=#CDD6F420+ color variables for complete UI customization.
Xenith supports inline image display (PNG, PPM formats):
# Load image in window
echo 'image /path/to/diagram.png' > /mnt/xenith/1/ctl
# Query image info
cat /mnt/xenith/1/image
# Returns: /path/to/diagram.png 800 600
# Clear image, return to text
echo 'clearimage' > /mnt/xenith/1/ctlUseful for AI-generated visualizations, charts, and diagrams.
Agents can monitor user activity:
fd := sys->open("/mnt/xenith/1/event", Sys->OREAD);
for(;;) {
n := sys->read(fd, buf, len buf);
# Event format: "type origin q0 q1 flags length text"
# React to user edits, selections, commands
}
Event types include insertions, deletions, selections, and command executions.
InferNode includes a standalone text editor with a modern feature set, accessible both from the GUI and via 9P for agent control.
- Undo / Redo — Ctrl-Z / Ctrl-Y with separate undo and redo stacks
- Find & Replace — Ctrl-F (find), Ctrl-H (find & replace), with wrap-around and replace-all
- Selection — Double-click selects word, triple-click selects line (400ms detection window)
- Keyboard shortcuts — Unix cursor navigation (Ctrl-A/E/K/U), macOS Cmd shortcuts mapped to control chars
- Status bar — Shows file path, line/column, dirty indicator, search state
The editor mounts a 9P filesystem for programmatic control, used by the Veltro editor tool:
/edit/
├── ctl Global: open <path>, new, quit
├── index List of open document IDs
└── {id}/
├── body Document text (read/write)
├── ctl Per-doc: save, saveas, goto, find, insert, delete, replace, replaceall
├── addr Cursor position (read: "line col", write: set position)
└── event Blocking read for events (modified, opened, quit)
The Veltro editor tool uses IPC to let agents read, edit, and navigate open documents:
# Agent opens a file
echo 'open /appl/cmd/hello.b' > /edit/ctl
# Agent reads the document
cat /edit/1/body
# Agent inserts text at line 5, column 1
echo 'insert 5 1 # new comment' > /edit/1/ctl
# Agent finds and replaces
echo 'replaceall oldvar newvar' > /edit/1/ctl # tab-separated| Aspect | Acme | Xenith |
|---|---|---|
| Colors | Hardcoded pastels | 20+ customizable + dark theme |
| Images | Text only | PNG/PPM display |
| Per-window UI | Standard | Custom color schemes |
| AI focus | Generic editor | Agent-friendly design |
| Code size | ~16K lines | ~21K lines |
| Module | Purpose |
|---|---|
xenith.b |
Main entry, theming |
fsys.b |
9P filesystem interface |
exec.b |
Command execution |
asyncio.b |
Async I/O primitives |
imgload.b |
Image loading (PNG/PPM) |
wind.b |
Window management |
text.b |
Text editing |
# From InferNode
xenith
# With dark theme
xenith -t catppuccin
# With specific font
xenith -f /fonts/pelm/unicode.9.font# Pseudocode for an AI agent
# 1. Create a window
write("/mnt/xenith/new/ctl", "scratch")
# Returns window ID, e.g., "3"
# 2. Write content
write("/mnt/xenith/3/body", "Analysis results:\n...")
# 3. Read user selection
selection = read("/mnt/xenith/3/rdsel")
# 4. Monitor events
for event in read_stream("/mnt/xenith/3/event"):
if event.type == "insert":
# User added text, respond...- B1 (Left) - Select text
- B2 (Middle) - Execute selection as command
- B3 (Right) - Search/look up selection
Xenith follows the principle: "Minimal mechanism, maximal capability."
From the Plan 9 tradition:
- Everything is a file
- Text is the universal interface
- Composition over configuration
- Small, sharp tools
Applied to AI:
- Filesystem operations are universal
- Observable beats opaque
- Human remains in control
- Capabilities are explicit
Planned enhancements (see IDEAS.md):
- Graphics languages —
pic,grapfor diagrams - Audio support — Voice I/O via
/dev/audio - Structured data — JSON/tree viewers
- Token accounting — LLM cost tracking
Xenith inherits Acme's interaction model. These resources explain the fundamentals:
- A Tour of Acme - Russ Cox's video tutorial (recommended starting point)
- Acme homepage - Documentation, resources, and community
- Acme: A User Interface for Programmers - Rob Pike's original paper
appl/xenith/DESIGN.md- Detailed design rationaleappl/xenith/IDEAS.md- Feature roadmapappl/xenith/IMAGE.md- Image implementation details
MIT License (as per InferNode)