diff --git a/README.md b/README.md index 5fa8b1d..7cabe2c 100644 --- a/README.md +++ b/README.md @@ -23,21 +23,31 @@ See [`doc/usage.md`](doc/usage.md) for usage instructions. ## Configuration -### Environment: `~/.config/ollie/env` +### Backends: `~/.config/ollie/backends.conf` -``` -OLLIE_BACKEND=openai # ollama | openai | anthropic | copilot | kiro (default: ollama) -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_COMPLETE_BACKEND=ollama # backend for code completion -OLLIE_COMPLETE_MODEL=qwen3:latest # model for code completion +```ini +# 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 ``` -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/`. Shell environment variables take precedence over the env file. +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 diff --git a/doc/resources/9p.md b/doc/resources/9p.md index 4476cf0..ec5c7a9 100644 --- a/doc/resources/9p.md +++ b/doc/resources/9p.md @@ -115,12 +115,15 @@ echo 'implement login page' | ollie-9p rdwr route | File | Mode | Description | |---|---|---| | `prompt` | write | Queue a new turn | +| `fifo` | r/w | Prompt queue (write=enqueue, read=dequeue) | | `statewait` | read (blocking) | Blocks until state changes | -| `state` | read | Current state | -| `chat` | read | Full conversation history | -| `context` | read | Full message history as JSONL | -| `offset` | read | Byte position after last user prompt | +| `chat` | read (streaming) | Filtered text (no markers/fences) | +| `chat.raw` | read (streaming) | Full markup with block markers | +| `log` | read | Last 64KB of conversation (non-blocking) | | `plan` | r/w | Scratch space for agent planning | -| `prompt.prev` | read | The last submitted prompt | -| `env` | read | Session environment variables | -| `cost` | read | Cumulative cost in USD | \ No newline at end of file +| `cfg` | r/w | Agent config (key=value) | +| `ctl` | rdwr | Control commands (write cmd, read response) | +| `stats` | read | Token usage, cost, context size (key=value) | +| `name` | r/w | Mutable agent name | +| `id` | read | Immutable agent UUID | +| `proc/{pid}` | read | Detached process output | \ No newline at end of file diff --git a/doc/resources/misc.md b/doc/resources/misc.md index 9f13c55..119cbae 100644 --- a/doc/resources/misc.md +++ b/doc/resources/misc.md @@ -132,13 +132,9 @@ agent_tester=$(o ls session/tester/agent | grep -v '^new$') send() { sid=$1; shift aname=$1; shift - exec 3< <(o readloop "session/$sid/agent/$aname/statewait" &) - sleep 0.1 o write "session/$sid/agent/$aname/prompt" "$*" - until o read "session/$sid/agent/$aname/state" | grep -q idle; do sleep 0.5; done - exec 3<&- - offset=$(o read "session/$sid/agent/$aname/offset" | tr -d '[:space:]') - o read "session/$sid/agent/$aname/chat" | tail -c +$((offset + 1)) + # Block until agent returns to idle + while [ "$(o read "session/$sid/agent/$aname/statewait")" != "idle" ]; do :; done } reply=$(send developer "$agent_developer" "Implement a function that parses a JSON config file.") @@ -169,9 +165,9 @@ $reply") $result") done -o kill developer -o kill reviewer -o kill tester +session=developer o ctl kill +session=reviewer o ctl kill +session=tester o ctl kill ``` The script initializes the routing, but agents can discover other sessions diff --git a/doc/usage.md b/doc/usage.md index 6a5d7bc..ebe1bd9 100644 --- a/doc/usage.md +++ b/doc/usage.md @@ -45,7 +45,7 @@ In another terminal: ```sh eval $(o env myproject default) -o tail # stream chat output +o read chat # stream chat output ```