Skip to content

victor36max/shire

Repository files navigation

Shire

Where agents live, and flourish.

Shire is an open platform for deploying, orchestrating, and collaborating with AI agents. Give each agent its own persistent workspace, connect them through a built-in mailbox system, and manage everything from a single dashboard.

Shire Dashboard


Why Shire?

Most agent platforms treat agents as stateless API calls. Shire gives every agent a home β€” a persistent workspace with its own filesystem, tools, and mailbox.

  • Multi-project architecture β€” Organize agents into projects, each with its own dedicated VM, shared drive, and settings.
  • Persistent workspaces β€” Each agent gets its own directory with inbox/outbox, scripts, and documents β€” backed by a Firecracker VM, remote VPS, or local filesystem.
  • Pluggable VM backends β€” Run on Fly.io Sprites (Firecracker), any VPS via SSH, or your local machine for development.
  • Multi-harness runtime β€” Bring your own agent runtime. Supports Pi SDK and Claude Code CLI through a unified adapter pattern.
  • Recipe-based deployment β€” Define agents as simple YAML recipes. No Dockerfiles, no complex configs.
  • Agent catalog β€” Browse and deploy from a built-in catalog of pre-built agent templates.
  • Inter-agent communication β€” Agents discover peers and exchange messages through a file-based mailbox system.
  • Scheduled tasks β€” Automate agent work with one-time or recurring messages on custom intervals.
  • Shared drive β€” A communal filesystem synced across all agents within a project.
  • Real-time dashboard β€” Monitor, chat with, and manage agents from a live web UI with streaming updates.
  • Interactive terminal β€” Drop into the VM with a full terminal, right from your browser.

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                       Shire Dashboard                       β”‚
β”‚                (Phoenix LiveView + React UI)                β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  ProjectDashboard (/)                                       β”‚
β”‚  β”œβ”€β”€ AgentDashboard (/projects/:name)                       β”‚
β”‚  β”‚   β”œβ”€β”€ Agent Sidebar  β”‚  Chat/Stream Panel                β”‚
β”‚  β”œβ”€β”€ Project Details (/projects/:name/details)              β”‚
β”‚  β”œβ”€β”€ Settings (/projects/:name/settings)                    β”‚
β”‚  β”œβ”€β”€ Schedules (/projects/:name/schedules)                  β”‚
β”‚  └── Shared Drive (/projects/:name/shared)                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
                             β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  ProjectManager (GenServer)                 β”‚
β”‚             Boots all project VMs on startup                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚                          β”‚
               β–Ό                          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Project A                   β”‚  β”‚  Project B                   β”‚
β”‚  (ProjectInstanceSupervisor) β”‚  β”‚  (ProjectInstanceSupervisor) β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ VM (Sprite/SSH/Local)  β”‚  β”‚  β”‚  β”‚ VM (Sprite/SSH/Local)  β”‚  β”‚
β”‚  β”‚ Coordinator            β”‚  β”‚  β”‚  β”‚ Coordinator            β”‚  β”‚
β”‚  β”‚ AgentMgr A, B, ...     β”‚  β”‚  β”‚  β”‚ AgentMgr C, D, ...     β”‚  β”‚
β”‚  β”‚ Terminal Session       β”‚  β”‚  β”‚  β”‚ Terminal Session       β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚                                 β”‚
               β–Ό                                 β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  VM (A)                      β”‚  β”‚  VM (B)                      β”‚
β”‚  Sprite, SSH, or Local       β”‚  β”‚  Sprite, SSH, or Local       β”‚
β”‚                              β”‚  β”‚                              β”‚
β”‚  {workspace_root}/           β”‚  β”‚  {workspace_root}/           β”‚
β”‚  β”œβ”€β”€ agents/                 β”‚  β”‚  β”œβ”€β”€ agents/                 β”‚
β”‚  β”‚   β”œβ”€β”€ researcher/         β”‚  β”‚  β”‚   └── ...                 β”‚
β”‚  β”‚   β”‚   β”œβ”€β”€ recipe.yaml     β”‚  β”‚  β”œβ”€β”€ shared/                 β”‚
β”‚  β”‚   β”‚   β”œβ”€β”€ inbox/          β”‚  β”‚  └── .runner/                β”‚
β”‚  β”‚   β”‚   β”œβ”€β”€ outbox/         β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚  β”‚   β”‚   β”œβ”€β”€ scripts/        β”‚
β”‚  β”‚   β”‚   └── documents/      β”‚
β”‚  β”‚   └── coder/              β”‚
β”‚  β”œβ”€β”€ shared/                 β”‚
β”‚  └── .runner/                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Tech Stack

Layer Technology
Backend Elixir, Phoenix 1.8, Ecto, PostgreSQL
Frontend LiveReact (React inside Phoenix LiveView), shadcn/ui, Tailwind v4
Build Vite, Bun
Agent Runtime Bun + TypeScript, multi-harness adapter pattern
VM Pluggable: Fly.io Sprites (Firecracker), SSH (any VPS), or Local (dev)
Job Processing Oban (scheduled tasks, recurring jobs)

Getting Started

Prerequisites

  • Elixir 1.15+
  • PostgreSQL
  • Bun

1. Set up the database

Shire requires PostgreSQL. In development, mix setup creates the database automatically using local defaults. In production, set DATABASE_URL via your secrets manager or environment.

2. Choose a VM backend

Shire needs a VM backend for agent workspaces. Configure via environment variables (.env in dev, secrets manager in production):

πŸ”₯ Option A: Sprites (Firecracker VMs)

Production-grade backend using Fly.io Sprites β€” lightweight Firecracker VMs with sub-second boot, persistent storage, and auto-sleep.

What you need: A Sprites account and token from sprites.dev.

SPRITES_TOKEN=your_token_here

Sprites is the default backend β€” no other configuration needed.

Shire uses the Sprites Elixir SDK to manage VM lifecycles, execute commands, and stream terminal sessions.

Highlights:

  • Sub-second VM boot times
  • Persistent 100GB NVMe storage per VM
  • Instant checkpointing and restore (~300ms)
  • Auto-sleep on idle, instant resume
  • Hardware-level isolation via Firecracker
  • Up to 8 CPUs / 16GB RAM per VM

πŸ–₯️ Option B: SSH (Any VPS)

Connect to any Linux VPS over SSH. Run agents on your own infrastructure.

What you need: A Linux VPS with SSH access. Bun and Claude Code are installed automatically during bootstrap.

SHIRE_VM_TYPE=ssh
SHIRE_SSH_HOST=your-server.example.com
SHIRE_SSH_USER=deploy

# Key-based auth (recommended):
SHIRE_SSH_KEY="-----BEGIN OPENSSH PRIVATE KEY-----\n...\n-----END OPENSSH PRIVATE KEY-----"

# Or password-based auth:
# SHIRE_SSH_PASSWORD=your_password

# Optional:
# SHIRE_SSH_PORT=22
# SHIRE_SSH_WORKSPACE_ROOT=/home/deploy/shire/projects

Shire creates workspace directories on the remote host automatically.

πŸ’» Option C: Local (Development)

Use the local filesystem. Ideal for development and testing.

What you need: Bun and Claude Code installed on your machine (bootstrap does not run in local mode).

SHIRE_VM_TYPE=local

Agent workspaces live at ~/.shire/projects/. Processes run as local Erlang ports β€” no VMs, no SSH, no tokens.

3. Install and run

mix setup        # Install deps, create DB, build assets
mix phx.server   # Start the server

Visit localhost:4000 to open the dashboard.


Environment Variables

Full reference. Create a .env file in the project root β€” it's automatically loaded in dev/test via DotenvParser.

Application

Variable Default Description
PORT 4000 HTTP server port
PHX_HOST example.com Hostname for URL generation (production)
SECRET_KEY_BASE β€” Phoenix session secret. Generate with mix phx.gen.secret
DATABASE_URL β€” PostgreSQL connection string (production only β€” dev uses local defaults)
POOL_SIZE 10 Database connection pool size
ECTO_IPV6 β€” Set to true for IPv6 database connections
DNS_CLUSTER_QUERY β€” DNS query for distributed Erlang node discovery

VM Backend

Variable Default Description
SHIRE_VM_TYPE sprites VM backend: sprites, ssh, or local
SPRITES_TOKEN β€” Sprites SDK token (required for Sprites backend)
SHIRE_SSH_HOST β€” SSH hostname (required for SSH backend)
SHIRE_SSH_USER β€” SSH username (required for SSH backend)
SHIRE_SSH_KEY β€” Raw PEM private key content (SSH backend)
SHIRE_SSH_PASSWORD β€” SSH password, alternative to SHIRE_SSH_KEY (SSH backend)
SHIRE_SSH_PORT 22 SSH port
SHIRE_SSH_WORKSPACE_ROOT /home/$SHIRE_SSH_USER/shire/projects Workspace root on remote host

Agent-specific env vars (API keys, tokens, etc.) are configured per-project via the Settings page, not as server-level environment variables.

How It Works

1. Create a Project

Projects are the top-level unit. Each project gets its own VM with isolated storage. Create one from the dashboard.

2. Define a Recipe

Agents are defined as YAML recipes:

name: researcher
description: An agent that searches the web and summarizes findings
harness: claude_code
model: sonnet
system_prompt: |
  You are a research assistant. Search the web and summarize findings.

Recipe fields: name, description, harness (claude_code or pi_sdk), model, system_prompt, and skills.

3. Deploy

Hit "Create Agent", paste your recipe or pick one from the catalog. Shire bootstraps the workspace and spawns the agent runner.

4. Collaborate

Agents discover each other through peers.yaml and exchange messages via the mailbox system. Use the shared drive for files all agents need. Chat with any agent from the dashboard.

5. Automate

Schedule recurring messages to agents β€” hourly, daily, weekly, or custom cron intervals.

6. Sleep & Resume

Idle VMs auto-sleep, preserving all state. Everything resumes instantly when needed. (Sprites backend only β€” SSH and Local backends are always-on.)

Development

# Run all checks
mix precommit

# Or individually:
mix compile --warnings-as-errors   # Elixir compilation
mix format --check-formatted       # Elixir formatting
mix test                           # Elixir tests
cd assets && bun run tsc --noEmit  # TypeScript typecheck
cd assets && bun run lint          # ESLint
cd assets && bun run format:check  # Prettier
cd assets && bun run test          # Frontend tests

License

Business Source License 1.1 β€” free for non-production use. Converts to Apache 2.0 on 2030-03-24.

About

Where agents live, and flourish. 🌿

https://www.agents-shire.sh

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors