From afe514525daa1e86e650eb5e8d32823d3feacd93 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Sat, 18 Apr 2026 12:27:16 +0200 Subject: [PATCH] doc: move Sessions reference back from monorepo USAGE.md Co-Authored-By: Claude Sonnet 4.6 --- README.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/README.md b/README.md index 9ffd439..fe619c5 100644 --- a/README.md +++ b/README.md @@ -111,3 +111,69 @@ olliesrv status # check if running ``` The server listens on a Unix socket in the Plan 9 namespace (`$NAMESPACE/ollie`) and optionally mounts via `9pfuse` to `$HOME/mnt/ollie` (or `$OLLIE`). + +## Sessions + +### Create + +```sh +cat $OLLIE/s/new # show required/optional KV pairs +echo "cwd=$PWD" > $OLLIE/s/new +echo "cwd=$PWD backend=ollama model=qwen3:8b" > $OLLIE/s/new +``` + +Valid keys: `cwd` (required), `backend`, `model`, `agent`. + +### Send a prompt + +```sh +echo "what files are in the current directory?" > $OLLIE/s//prompt +``` + +Writes dispatch asynchronously on close; the shell returns immediately. + +### Read the conversation + +```sh +cat $OLLIE/s//chat # full history snapshot +tail -f $OLLIE/s//chat # follow output as it arrives +``` + +### Check state + +```sh +cat $OLLIE/s//state +# idle | thinking | calling: +``` + +### Control + +```sh +echo stop > $OLLIE/s//ctl # interrupt current turn +echo compact > $OLLIE/s//ctl # summarize context +echo clear > $OLLIE/s//ctl # clear history +echo kill > $OLLIE/s//ctl # kill session +echo "rn my-name" > $OLLIE/s//ctl +echo "model qwen3:8b" > $OLLIE/s//ctl +``` + +`ctl` accepts only recognized commands: `stop`, `kill`, `rn `, `compact`, `clear`, `backend`, `model`, `models`, `agents`, `agent`, `sessions`, `cwd`, `skills`, `tools`, `mcp`, `context`, `usage`, `history`, `irw`, `help`. The `/` prefix is added automatically. Unrecognized input is rejected with an error. + +### Switch backend, model, or agent + +```sh +echo ollama > $OLLIE/s//backend +echo qwen3:8b > $OLLIE/s//model +echo myagent > $OLLIE/s//agent +``` + +Writes to `backend`, `model`, and `agent` are rejected when the agent is not idle. Check `state` to confirm the change took effect. + +### Kill and rename + +```sh +rm -r $OLLIE/s/ # kill +mv $OLLIE/s/ $OLLIE/s/my-friendly-name # rename +``` + +Rename is rejected if the agent is running or the target name already exists. All open file handles into the session are updated automatically.