diff --git a/AGENTS.md b/AGENTS.md index a1eb4ec..f0c3a2e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -105,12 +105,25 @@ Config lives in `~/.config/ollie/env`. Key variables: - `OLLIE_MEMORY_PATH` — persistent memory directory - `OLLIE_ENABLED_BACKENDS` — backends available for routing ## Adding a new tool -1. Create an executable in `data/tools/` -2. Create a `.meta` sidecar file (`data/tools/.meta`) with JSON metadata: + +### Script-based tool (Python/Bash) +1. Create an executable script in `data/tools/` +2. Create `data/tools/.meta` with JSON metadata: ```json {"description":"...","prompt":"...","args":{...},"tier":"hot","readOnly":false} ``` 3. Run `just install-data` to install + +### Compiled tool (Go) +1. Create a package under `tools//cmd//main.go` + - Read JSON args from stdin, write result to stdout, exit 0/1 + - Share library code in `tools//` (e.g. `tools/lsp/`) +2. Create `data/tools/.meta` (same format as above) +3. Add a build target in the justfile that compiles to `{{cfg}}/tools/` +4. Run `just` to build and install + +Both paths produce the same result: an executable + `.meta` in `$OLLIE_TOOLS_PATH`. +The registry doesn't distinguish between scripts and binaries. ## Adding a new prompt 1. Write the markdown file in `data/prompts/` 2. If it should be loaded by default, reference it in `agents/default.json`