ollie is a 9p-based generative agent surface
Go to file
Levi Neely c9789de2bd toolsrv: fix ReadAt offset for request-response files
After Write(), the file offset is at the end of the written data.
For request-response files (like proc/new), we need to read the
result from offset 0, not from the current offset.

Changed CallTool() to use ReadAt(buf, 0) instead of io.ReadAll()
which uses Read() and inherits the wrong offset.

Same fix was already applied to token reading in Dial().

Added TestIntegration_ToolExecution to verify the full tool
execution path works end-to-end.
2026-08-10 19:14:09 +02:00
agent toolsrv: implement 9P Tauth authentication 2026-08-10 19:03:10 +02:00
backend kiro: wire session CWD through to EnvState; o: add new command 2026-08-10 09:10:13 +02:00
bypass rename elevate→bypass throughout 2026-08-09 02:22:39 +02:00
cmd toolsrv: implement 9P Tauth authentication 2026-08-10 19:03:10 +02:00
contrib/elisp fs: add /help ctl command — returns command reference 2026-08-09 03:32:21 +02:00
data o: support root-relative paths with leading / 2026-08-10 13:47:10 +02:00
doc maintainability: docs, contracts, structural cleanup 2026-08-09 21:45:56 +02:00
env all: delete dead code, tighten API surface 2026-08-08 15:51:13 +02:00
format format: remove agent dependency from FormatEvent 2026-08-07 10:16:28 +02:00
fs agent: fix tool_load ctl to refresh agent's tool listing 2026-08-10 13:56:59 +02:00
fsedsl maintainability: docs, contracts, structural cleanup 2026-08-09 21:45:56 +02:00
kde@b6a7d93d0e update kde submodule: fix tool output rendering 2026-08-09 12:14:09 +02:00
lib9p kde: update submodule (hybrid native/subprocess streaming) 2026-08-07 18:06:44 +02:00
log clean up OLLIE_* env vars: replace with XDG conventions 2026-08-07 07:11:53 +02:00
paths refactor: code review items 15-17 2026-08-09 12:24:15 +02:00
prompts prompt audit: trim system prompt, kill dead code, improve maintainability 2026-08-09 14:13:52 +02:00
sandbox clean up OLLIE_* env vars: replace with XDG conventions 2026-08-07 07:11:53 +02:00
session toolsrv: implement 9P Tauth authentication 2026-08-10 19:03:10 +02:00
tools/lsp refactor: items 8-10, 12, 13 from code review 2026-08-09 11:32:31 +02:00
toolsrv toolsrv: fix ReadAt offset for request-response files 2026-08-10 19:14:09 +02:00
.gitignore gitignore: add ollie-9p binary 2026-08-07 09:15:07 +02:00
.gitmodules remove httpgw and webui; update AGENTS.md to reflect current structure 2026-07-30 20:19:32 +02:00
.plan.md Good idea fairy cleanup: ~960 lines removed 2026-08-05 21:51:55 +02:00
AGENTS.md maintainability: docs, contracts, structural cleanup 2026-08-09 21:45:56 +02:00
Containerfile add remote access via TCP: Containerfile, mount subcommand, docs 2026-04-16 23:32:37 +02:00
README.md prompt audit: trim system prompt, kill dead code, improve maintainability 2026-08-09 14:13:52 +02:00
go.mod Extract EDSL to fsedsl/ library 2026-08-04 12:02:32 +02:00
go.sum Revert "remove dead mount/ package and olliesrv mount subcommand" 2026-07-30 21:19:11 +02:00
justfile rename ollie-remote to toolsrv 2026-08-10 15:01:42 +02:00
pull.sh pull.sh 2026-08-06 18:08:24 +02:00

README.md

ollie

Ollie is an AI agent runtime. A single binary (olliesrv) exposes agent sessions over a single surface: a 9P2000 filesystem. The core is deliberately minimal; capabilities come from composing small pieces — tool executables, skill files, metadata sidecars — rather than building a monolithic framework.

Building

git clone --recurse-submodules https://git.lneely.de/lkn/ollie.git
cd ollie
just

Requires just:

cargo install just

See doc/usage.md for usage instructions.

Configuration

Backends: ~/.config/ollie/backends.conf

# Default backend for new sessions
backend = openrouter

[openrouter]
key = sk-or-v1-...
model = qwen/qwen3-235b-a22b

[anthropic]
key = sk-ant-...
model = claude-sonnet-4-20250514

[ollama]
host = http://localhost:11434
model = qwen3:latest

[kiro]
# key auto-detected from Kiro CLI if unset

Each section configures a backend. The session selects which backend to use via the backend top-level setting or per-agent backend= in cfg. See data/backends.conf for the full template.

Everything lives under $XDG_CONFIG_HOME/ollie/ (default: ~/.config/ollie/) — tools in tools/, memory in memory/, agents in agents/, prompts in prompts/, skills in skills/.

What you can do

Capability How
CLI o — unified namespace CLI: read, write, ls, ctl, prompt, tui, env, generate
Terminal TUI o tui — tmux layout, no widgets
One-shot LLM o generate "explain monads" or echo "prompt" | o generate
Run an agent Create a session + agent via 9P — then connect with any frontend (ellie, KDE (GUI/KRunner/Kate), o tui)
Remote execution Set remote=user@host in session config
Agents Write a JSON config in data/agents/ with agent prompt in data/prompts/
Tools Drop an executable + .meta in ~/.config/ollie/tools/ — load at runtime via /tool_load
Domain skills Load markdown skill modules at runtime

Repository layout

Single Go module with one Git submodule (kde).

Directory Language Description
agent/ Go Agent loop, history, prompt resolution, context compaction
backend/ Go LLM providers (Anthropic, OpenAI, Ollama, Gemini, Copilot, CodeWhisperer)
toolsrv/ Go Tool server, dynamic tool dispatch, sandboxed execution, remote execution
tools/lsp/ Go LSP bridge daemon + client library (gopls, clangd, intelephense)
session/ Go Session lifecycle, config, persistence
fs/ Go 9P filesystem tree (EDSL-declared namespace, ctl dispatch)
fsedsl/ Go Filesystem declaration EDSL (generic, reusable)
bypass/ Go Bypass broker (sandbox escape approval)
sandbox/ Go Landlock sandbox config
lib9p/ Go 9P protocol library + native C client
cmd/olliesrv/ Go The main binary
cmd/ollie-9p/ Go 9P client CLI
cmd/ollie-remote/ Go Remote execution binary
kde/ C++/Qt6 KDE plasmoid, GUI, Kate plugin, KRunner (submodule)
data/agents/ JSON Agent configs
data/prompts/ Markdown System prompt templates
data/tools/ Mixed Tool executables (scripts + compiled) + .meta sidecar files
data/skills/ Markdown Domain knowledge modules
doc/ Markdown Architecture docs, usage guide

Architecture

graph TB
    subgraph "Frontends (all use o / ollie-9p)"
        TUI["o tui<br>(tmux + o read/ctl)"]
        KDE[KDE GUI<br>ollie-9p native client]
        KATE[Kate plugin]
        EMACS[Emacs<br>ellie.el · ollie-9p]
        ACME[Plan 9 acme]
        SCRIPTS[Shell scripts<br>o read · o ctl · o write]
    end

    subgraph "o CLI"
        O["o<br>path resolution · ctl dispatch<br>prompt REPL · TUI composition"]
    end

    subgraph "olliesrv"
        P9[9P Filesystem<br>session/ namespace]
        SESS[session.Session<br>tool server conn · persistence]
        AG[agent.Agent<br>loop · compaction<br>prompt assembly]
        TOOLS[toolsrv.Server<br>dynamic dispatch · sandbox]
    end

    subgraph "LLM Backends"
        OLL[Ollama]
        OAI[OpenAI / OpenRouter]
        ANT[Anthropic]
        COP[Copilot]
        KIRO[Kiro]
    end

    subgraph Execution
        EXEC[Tool Scripts<br>loaded via ctl<br>· shell, reasoning_think<br>· file_*, lsp_*, memory_*<br>· gui_*, subagent_*]
    end

    TUI & SCRIPTS & ACME --> O
    O --> P9
    KDE & KATE & EMACS --> P9
    P9 --> SESS
    SESS --> AG
    SESS -->|shared RPC conn| TOOLS

    AG -->|streaming| OLL & OAI & ANT & COP & KIRO

    TOOLS --> EXEC

olliesrv exposes the agent runtime over a single surface: a 9P2000 filesystem. o is the CLI layer that all text-based frontends build on — it handles path resolution, context, and ctl dispatch. The KDE GUI and Kate plugin use ollie-9p (the native 9P client) directly for performance. For a deep dive into the filesystem, see doc/9p.md.

Credits

  • 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
  • @aws — for a solid open-source agent implementation

License

GPLv3