ollie is a 9p-based generative agent surface
Go to file
Ollie Agent 2d14772cb4 gitmodules: use relative URLs so forge links resolve correctly 2026-07-17 22:43:57 +02:00
.beads agents: extract prompts to markdown, assemble via executable prompt 2026-04-26 15:00:46 +02:00
.kiro/settings sandbox: fix regression from simplification 2026-04-21 21:09:33 +02:00
9p@b49bbb099d docs: compress root intro to overview level, move Plan 9 detail to 9p/ 2026-07-17 22:39:52 +02:00
acme@d90c19a57d bump acme 2026-06-24 13:07:58 +02:00
agents copilot agent: read-only tools, structured response format 2026-07-16 21:44:52 +02:00
contrib contrib: add ollie-remount script for 9pfuse recovery after sleep/wake 2026-05-21 08:44:17 +02:00
core@b6d0653d0b core: fix detached process WaitDelay kill 2026-07-17 22:15:28 +02:00
dbus@dd8a31dd8a update core + dbus submodules (detach exit injection) 2026-07-17 22:08:18 +02:00
doc update core submodule (session persistence), sync docs 2026-05-21 15:08:46 +02:00
el@d97f4c4f42 front-ends: transparent FUSE remount on I/O errors 2026-05-21 09:00:13 +02:00
experiments Clarify Identity-Specific Rigor description 2026-05-02 14:30:21 +02:00
httpgw@345508d9e1 httpgw: fix session naming on create 2026-07-07 12:40:03 +02:00
kde@3aa751d8de kde: update submodule 2026-07-17 22:23:07 +02:00
sandbox another sandbox tweak 2026-07-17 15:17:30 +02:00
scripts update core (kiro backend fixes), fix prime path resolution 2026-07-10 11:43:29 +02:00
webui@0984739dba webui: fix cwd display 2026-07-07 12:38:19 +02:00
.gitignore gitignore: add __pycache__ 2026-04-29 10:17:28 +02:00
.gitmodules gitmodules: use relative URLs so forge links resolve correctly 2026-07-17 22:43:57 +02:00
AGENTS.md add AGENTS.md, update 9p/kde submodules (tools-image prompt) 2026-07-16 20:13:53 +02:00
Containerfile add remote access via TCP: Containerfile, mount subcommand, docs 2026-04-16 23:32:37 +02:00
Makefile add ollie-dbus submodule, update top-level Makefile 2026-07-07 13:02:44 +02:00
README.md docs: root intro describes the runtime, not the filesystem surface 2026-07-17 22:40:32 +02:00
mkfile move prompts/skills/tools into 9p/ and kde/ submodules 2026-07-07 12:07:50 +02:00
pull.sh add dbus to pull.sh 2026-07-10 15:02:08 +02:00

README.md

ollie

Ollie is an AI agent runtime. A small Go core handles the agent loop, tool dispatch, sandboxing, and multi-backend routing; frontends (terminal, acme, Emacs, KDE, browser) and orchestration (shell scripts, multi-agent workflows, cron) are external. The core is deliberately minimal — capabilities come from composing small pieces rather than building a monolithic framework.

Repository layout

Monorepo with Git submodules. Each submodule has its own Go module (except el which is Elisp and kde which is C++/Qt).

Directory Language Description
core/ Go Core library: agent loop, backends, tools, config, sandbox
9p/ Go 9P filesystem server (olliesrv)
dbus/ Go D-Bus session manager daemon (ollied)
acme/ Go Plan 9 acme editor frontend
httpgw/ Go HTTP-to-9P gateway (ollie-httpgw)
webui/ TypeScript Preact SPA browser frontend
kde/ C++/Qt6 KDE integration: plasmoid, standalone GUI, Kate plugin, KRunner, tray
el/ Elisp Emacs frontend (ellie.el)
agents/ JSON Agent config files (loaded at runtime)
prompts/ Markdown System prompt templates
tools/ Python/Bash Tool scripts (file_read, lsp_, memory_, etc.)
scripts/ Shell User-facing CLI scripts: session management, utilities, plumbing
sandbox/ YAML Landlock sandbox config
doc/ Markdown Architecture docs, usage guide
contrib/ Mixed Community scripts
experiments/ Mixed Trial notes

What you get

  • Interactive AI shell — s/sh gives you a readline prompt that resumes your last session per directory, with streaming output and live model/backend switching
  • One-shot queries that compose with Unix pipes — cat error.log | s/bfg "what caused this?" | s/bfg "suggest a fix"
  • Parallel fan-out — s/bfg -parallel 4 spawns N agents on the same prompt and collects results
  • Multi-agent workflows in plain shell — create named sessions, pass prompts between them via files, coordinate with statewait; no framework or SDK
  • Subagent delegation — agents can fork ephemeral subagents that run independently and return results
  • Tier-based routing — route dispatches subtasks to worker or expert models based on complexity; the orchestrator picks the tier, the system picks the backend/model
  • Orchestrator/worker system — specialized agents for task decomposition (orchestrator) and scoped execution (worker/expert); workers read code and reason about implementation within their assigned scope
  • Any model, any backend — Ollama (local), OpenAI, Anthropic, OpenRouter, GitHub Copilot, Kiro; switch per-session with one write
  • Sandboxed execution — every tool call runs inside a Landlock sandbox with configurable filesystem access
  • Extensible via plain scripts — drop executables into a directory and the agent picks them up; built-in tools cover file I/O, LSP (go-to-definition, references, rename, diagnostics), persistent memory, web search, and browser screenshots
  • Domain skills — teach the agent your project's conventions with a markdown file; loaded on demand
  • AI code completion — u/complete reads a prefix from stdin and prints the completion to stdout; plug it into any editor that can shell out
  • Multiple frontends — terminal (s/sh), acme (ollie-acme + Kmpl), Emacs (ellie), KDE (plasmoid, standalone GUI, Kate plugin), and a browser-based web UI; all talk to the same 9P server
  • Remote access — mount a remote server's namespace locally with 9pfuse, or use the HTTP gateway with curl or the web UI
  • Store federation — point tools or transcripts at a remote 9P mount to share across machines
  • Prompt optimization — u/optimize generates N candidate prompts in parallel, then judges them to return the best one
  • Automatic context compaction — long conversations are summarized transparently when approaching the model's context limit
  • Per-agent 9P principals — each agent session mounts the filesystem as its own user; 9P permission enforcement prevents self-prompting loops and enforces access boundaries

Getting started

Clone with submodules:

git clone --recurse-submodules https://github.com/lneely/ollie.git

Or after cloning:

git submodule update --init --recursive

Build and install everything from the monorepo root:

mk

Or build specific components:

mk core    # Core library
mk 9p      # 9P filesystem server
mk httpgw  # HTTP gateway
mk webui   # Web UI (requires Node.js + npm)
mk dbus    # D-Bus daemon
mk data    # Install agents/prompts/tools/skills to ~/.config/ollie/
mk scripts # Install CLI scripts

For KDE, build from kde/ with CMake. For Emacs, copy el/ellie.el into your config and (require 'ellie).

See doc/USAGE.md for usage instructions.

Configuration

Environment: ~/.config/ollie/env

OLLIE_BACKEND=openai           # ollama | openai | anthropic | copilot | kiro (default: ollama)
OLLIE_OLLAMA_URL=              # base URL for Ollama (default: http://localhost:11434)
OLLIE_OPENAI_URL=https://openrouter.ai/api
OLLIE_OPENAI_KEY=sk-or-...
OLLIE_ANTHROPIC_KEY=sk-ant-...
OLLIE_COPILOT_TOKEN=...
OLLIE_KIRO_TOKEN=...           # bearer token or sqlite:// path (auto-detected from Kiro CLI if unset)
OLLIE_MODEL=qwen/qwen3-235b-a22b
OLLIE_TOOLS_PATH=~/.config/ollie/tools    # directory for tool scripts ({tool} steps)
OLLIE_MEMORY_PATH=~/.config/ollie/memory  # directory for memory files (ollie/m)
OLLIE_ELEVATE_SOCKET=${XDG_RUNTIME_DIR}/ollie/elevate.sock  # socket path for x/elevate adapter
OLLIE_COMPLETE_BACKEND=ollama             # backend for u/complete (required)
OLLIE_COMPLETE_MODEL=qwen3:latest         # model for u/complete (required)
OLLIE_ENABLED_BACKENDS=openrouter,kiro  # backends available for routing (comma-separated)

# Per-backend tier models for t/route
OLLIE_TIER_WORKER_openrouter=mistralai/devstral-small
OLLIE_TIER_EXPERT_openrouter=anthropic/claude-sonnet-4-20250514
OLLIE_TIER_WORKER_kiro=claude-haiku-4-20250514
OLLIE_TIER_EXPERT_kiro=claude-sonnet-4-20250514
OLLIE_TIER_WORKER_anthropic=claude-haiku-4-20250514
OLLIE_TIER_EXPERT_anthropic=claude-sonnet-4-20250514
OLLIE_TIER_WORKER_ollama=qwen3:8b
OLLIE_TIER_EXPERT_ollama=qwen3:32b

Shell environment variables take precedence over the env file.

Development

Update all submodules to latest:

git submodule update --remote

Each submodule has its own Go module with independent tests (go test ./...). See individual submodule READMEs for component-specific build and test instructions.

Credits

Many sources of inspiration:

  • Plan 9 from Bell Labs — for an interesting system
  • @9fans — for the Plan 9 port
  • Suckless — for articulating good software development principles
  • @simonfxr — for a solid agent baseline to "borrow" from, and other nifty ideas
  • @aws — for a solid open-source agent implementation

License

GPLv3