Agentic System (PAI)
activeMulti-agent AI infrastructure where autonomous agents coordinate tasks, manage knowledge, and execute work across a distributed homelab.
PAI (Personal AI Infrastructure) is a system of autonomous AI agents that coordinate work, manage knowledge, and execute tasks across my homelab. It’s the connective tissue between everything I build.
For a non-technical overview of how this system fits into my daily life, check the AI Infrastructure page.
Architecture
┌─────────────┐
│ Zarq Board │ (task coordination)
│ Bun + TS │
└──────┬──────┘
│
┌──────────────┼──────────────┐
│ │ │
┌──────┴──────┐ ┌────┴─────┐ ┌──────┴──────┐
│ Zarq │ │ Ping │ │ Maverick │
│ Claude Code │ │ Telegram │ │ OpenCode │
│ X1 Carbon │ │ X1 Carbon│ │ Legion │
└──────┬──────┘ └────┬─────┘ └─────────────┘
│ │
┌──────┴──────────────┴──────┐
│ Agent-PKM │
│ (knowledge base sync) │
│ JSONL / YAML / MD │
└────────────┬───────────────┘
│
┌────────────┴───────────────┐
│ Obsidian Vault │
│ (PARA method, 5+ years) │
└────────────────────────────┘
Agent Roster
| Agent | Platform | Host | Status |
|---|---|---|---|
| Zarq | Claude Code | X1 Carbon | Active |
| Ping | grammy (Telegram) | X1 Carbon | Active |
| Maverick | OpenCode | Legion | Active |
| Pong | TBD | Legion WSL2 | Gated |
| Neo | TBD | Mobile | Gated |
| Scripter | OpenClaw | Retired | Archived (Mar 2026) |
Key Technical Decisions
Task isolation via git worktrees. When an agent picks up a task, it creates a worktree with its own branch. This prevents conflicts when multiple agents work on the same codebase. The worktree gets merged back to main and cleaned up when the task is done.
Shared context via filesystem. Agents share state through a common directory (shared-ai-context/). It contains a task board JSON, activity logs, and a current-state summary. Each agent reads this at session start. Simple, debuggable, no database needed.
LLM fallback chain. API calls go through a priority chain: Anthropic, then OpenRouter, then Groq, then local Ollama. If one provider is down or credits are low, the next one picks up automatically.
systemd user services. All long-running agents run as systemd user services. Auto-restart on crash, logs via journalctl, starts on boot. The service files live in each project repo.
Services
| Service | Description | Runtime |
|---|---|---|
| zarq-board | Task coordination API | Bun + TypeScript |
| zarq-watcher | Board event watcher | Bun + TypeScript |
| ping | Telegram bot | Bun + grammy |
| agent-pkm-sync | Vault to agent knowledge sync | Bun + TypeScript |
| pkm-watcher | Vault file change detector | Python + watchdog |
What I Learned
Building PAI taught me that agent coordination is harder than agent capability. Making one agent smart is straightforward. Making three agents work on different things without stepping on each other, sharing context without flooding each other, and recovering gracefully when one goes offline. That’s the real problem.
The simplest solutions won. File-based shared state beats a database. Git worktrees beat branch switching. systemd beats custom process managers. Every time I tried to add complexity, I ended up reverting to the simpler approach.