@octocodeai/freellama-mcp-server 0.10.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CONFIGURATION.md +82 -3
  2. package/DEVELOPING.md +40 -9
  3. package/README.md +316 -213
  4. package/dist/agent-cli.js +16963 -0
  5. package/dist/index.js +4896 -4036
  6. package/dist/research/bash-agent.js +287 -108
  7. package/dist/research/coder-agent.js +455 -127
  8. package/dist/research/github-agent.js +276 -94
  9. package/dist/research/octocode-agent.js +276 -94
  10. package/docs/AGENT_CLI.md +234 -0
  11. package/docs/API.md +160 -0
  12. package/docs/ARCHITECTURE.md +158 -50
  13. package/docs/ASSESSMENT.md +131 -0
  14. package/docs/BENCHMARK.md +381 -0
  15. package/docs/BUILD_AND_NOTES.md +12 -3
  16. package/docs/CLI.md +62 -17
  17. package/docs/CPU_GPU_ROUTING.md +22 -9
  18. package/docs/DEFERRED_JOBS.md +17 -4
  19. package/docs/FEATURES.md +97 -43
  20. package/docs/LLAMACPP.md +133 -0
  21. package/docs/LOCAL_MODELS.md +26 -20
  22. package/docs/MODEL_FORMS_AND_RESULTS.md +14 -6
  23. package/docs/MODEL_INTROSPECTION.md +9 -2
  24. package/docs/MODEL_SELECTION.md +38 -9
  25. package/docs/MONITORING.md +110 -12
  26. package/docs/OLLAMA_REVIEW.md +226 -0
  27. package/docs/PRODUCTION.md +68 -25
  28. package/docs/PROMPTS.md +119 -0
  29. package/docs/README.md +22 -6
  30. package/docs/RELIABILITY.md +207 -0
  31. package/docs/RUST_RESOURCE_AUDIT.md +65 -0
  32. package/docs/SCOPES_AND_WARMING.md +12 -5
  33. package/docs/TESTING.md +112 -6
  34. package/docs/TUNING.md +12 -8
  35. package/docs/assets/benchmark-results-2026-11-14.html +4 -0
  36. package/docs/assets/tool-calling-2026-11-14-bonsai-9b/TABLE.md +14 -0
  37. package/docs/assets/tool-calling-2026-11-14-lfm3-vl/TABLE.md +14 -0
  38. package/docs/assets/tool-calling-table.md +14 -0
  39. package/docs/cookbooks/README.md +9 -2
  40. package/docs/cookbooks/batch-text.md +4 -2
  41. package/docs/cookbooks/classify.md +19 -3
  42. package/docs/cookbooks/coding.md +13 -4
  43. package/docs/cookbooks/find-code.md +8 -3
  44. package/docs/cookbooks/jobs.md +8 -8
  45. package/docs/cookbooks/memory-and-caching.md +2 -2
  46. package/docs/cookbooks/ocr.md +3 -3
  47. package/docs/cookbooks/research-agent.md +32 -2
  48. package/docs/cookbooks/speech-to-text.md +1 -1
  49. package/docs/cookbooks/sweep.md +4 -1
  50. package/docs/octocode/GITHUB.md +4 -4
  51. package/docs/octocode/LOCAL.md +5 -4
  52. package/native/index.d.ts +1 -1
  53. package/package.json +6 -6
  54. package/docs/COMPARISON.md +0 -40
package/README.md CHANGED
@@ -2,61 +2,100 @@
2
2
 
3
3
  ![A brown cartoon llama stands on a pastel cloud background.](assets/logo.jpg)
4
4
 
5
- **Run your agent's bulk work on local models without overloading your machine.**
5
+ **Run local Ollama models the smart way: the right model for your machine right now, tuned
6
+ prompts, and new loads held until they fit in memory, for your coding agent and for you.**
6
7
 
7
- FreeLlama lets coding agents offload bounded work (embeddings, OCR and vision, bulk rewrites,
8
- classification, summaries) to local [Ollama](https://ollama.com) models instead of spending paid
9
- tokens and context. For each task it picks an installed model that fits, loads and switches models
10
- only when they fit in memory, and returns the result with a receipt of where and how it ran. Your
11
- agent still decides what to offload and verifies the answer.
8
+ FreeLlama sits between you (or your agent) and [Ollama](https://ollama.com). Ollama runs the
9
+ models; FreeLlama decides which model, how, and whether there is room for it.
10
+
11
+ An optional [managed llama.cpp engine](https://github.com/bgauryy/FreeLlama/blob/main/docs/LLAMACPP.md) also supports explicitly selected,
12
+ bounded text tasks through the Rust service. Automatic model selection, workflows and lifecycle
13
+ management still use Ollama. See the [current assessment](https://github.com/bgauryy/FreeLlama/blob/main/docs/ASSESSMENT.md) for ratings,
14
+ validation coverage and remaining gaps.
15
+
16
+ **In numbers** ([benchmark](https://github.com/bgauryy/FreeLlama/blob/main/docs/BENCHMARK.md), one Apple M2 Pro, 2026-11-14):
17
+
18
+ | | Measured |
19
+ |---|---|
20
+ | Speed | 274 ms median per task against 272 ms for Ollama alone; first streamed token 95 vs 93 ms |
21
+ | Cost of the layer | 3.7 ms per task (p95 9.8 ms), 9.7 ms of CPU, 26–31 MB of RAM |
22
+ | Answers | Built-in workflow prompts passed 45/46 completed graded cases (98%; 45/48 planned, 94%), against 25/48 (52%) for one-line prompts; mean output used 36% fewer tokens |
23
+ | Memory | A 7.2 GB load with 4.2 GB free was refused with the programs holding memory, instead of swapping |
24
+
25
+ ```mermaid
26
+ flowchart LR
27
+ ask["An Ollama request:<br/>workflow, job or model"] --> pick["1. Pick<br/>a qualified local calibration,<br/>else a catalog or capability fallback"]
28
+ pick --> tune["2. Tune<br/>the model card's settings<br/>+ tested workflow prompt"]
29
+ tune --> gate{"3. Gate<br/>does the load fit<br/>in free memory?"}
30
+ gate -->|yes| run["Ollama runs it"]
31
+ gate -->|"no, after a wait"| refuse["Refused with the reason<br/>and what holds memory"]
32
+ run --> report["4. Report<br/>answer + check: lines<br/>+ receipt"]
33
+ ```
34
+
35
+ | You are | Use | It feels like |
36
+ |---|---|---|
37
+ | A coding agent (Claude Code, Cursor, Codex, any MCP host) | The **MCP server** | Tools such as `run_task {workflow:"fix-bug", files:[…]}` |
38
+ | A person, a script, or an agent with only a shell | **`freellama run`** and **`chat`** | `ollama run`, with workflows, files and memory safety |
39
+ | Any Ollama, OpenAI or Anthropic client (the `ollama` CLI, Continue, opencode, Open WebUI, SDKs) | **`freellama gateway`** | A server that lists models such as `freellama/review-code` |
12
40
 
13
41
  ```mermaid
14
42
  flowchart LR
15
43
  agent["Coding agent<br/>Claude Code, Cursor, any MCP host"]
16
- cli["freellama CLI"]
17
- raw["Ollama-compatible client"]
44
+ you["You or a script"]
45
+ client["Ollama, OpenAI, Anthropic clients"]
18
46
  subgraph fl["FreeLlama, on your machine"]
19
- mcp["MCP server<br/>Node.js + Rust addon"]
20
- serve["freellama serve<br/>127.0.0.1:11435"]
21
- research["Research adapter<br/>read-only, allowlisted files"]
47
+ mcp["MCP tools<br/>workflows, picks, checks"]
48
+ cli["freellama run / chat"]
49
+ gw["freellama gateway<br/>127.0.0.1:11437"]
50
+ serve["freellama serve<br/>127.0.0.1:11435<br/>routing, admission, memory gate"]
22
51
  end
23
- gpu[("Ollama<br/>GPU: Metal, CUDA, ROCm")]
24
- cpu[("Optional CPU-only Ollama")]
25
-
26
- agent -->|"MCP over stdio"| mcp
27
- mcp -->|"control API"| serve
28
- cli -->|"control API"| serve
29
- raw -.->|"/api and /v1 stream through"| serve
30
- mcp -.->|"delegate_research"| research
31
- research -->|"each model turn is a managed task"| serve
32
- serve -->|"route, admit, load, run"| gpu
33
- serve -.->|"operator-assigned models"| cpu
52
+ ollama[("Ollama<br/>Metal, CUDA, ROCm, CPU")]
53
+ cpp[("Optional llama.cpp server<br/>explicit bounded text tasks")]
54
+
55
+ agent -->|"MCP"| mcp
56
+ you --> cli
57
+ cli -->|"the same tool handlers, in-process"| mcp
58
+ client --> gw
59
+ mcp -->|"managed tasks"| serve
60
+ gw -->|"virtual models: pick, prompts, admitted load"| serve
61
+ serve --> ollama
62
+ serve --> cpp
34
63
  ```
35
64
 
36
- ## Why FreeLlama
65
+ ## Why not call Ollama directly?
66
+
67
+ Ollama runs the tag and settings you request. Choosing well on a shared workstation requires
68
+ metadata inspection, host observations and coordination. FreeLlama supplies that layer; the answer
69
+ is still yours to check. The [end-to-end review](https://github.com/bgauryy/FreeLlama/blob/main/docs/OLLAMA_REVIEW.md) explains the architecture,
70
+ implemented repairs and remaining evidence gaps.
37
71
 
38
- Coding agents spend paid tokens and context on work a model on your own machine can do: embedding a
39
- repository, reading screenshots and scans, summarizing or classifying hundreds of files. Pointing
40
- the agent straight at Ollama does not fix that, because the agent cannot see:
72
+ | What goes wrong with a direct call | What FreeLlama does | What we measured |
73
+ |---|---|---|
74
+ | **The wrong model for this machine.** A tag name says nothing about capability, context or memory. One load too many and the machine starts swapping. | Uses a qualifying [machine-local route](https://github.com/bgauryy/FreeLlama/blob/main/docs/MODEL_SELECTION.md#turn-measurements-into-routing-evidence) first, then catalog or capability fallbacks. Throughput does not prove quality. A load that does not fit waits, then is refused with the reason and the programs holding the memory. | With 6.5 GB free, a code review moved from a 10 GB model to one that fit. A yes/no question ran on a 1.2 GB decision model instead of a 14.5 GB one that would have been refused. |
75
+ | **Default settings waste tokens.** Thinking models reason before every answer. Small models pad their output. | Applies each model card's documented sampling and think setting, plus step-by-step workflow prompts that were tested on the models. | A direct call spent 61 tokens (0.92 s) thinking before answering "OK"; FreeLlama answered in 2 tokens (0.47 s). Workflow prompts passed 45/46 completed cases against 25/48 for one-line prompts. |
76
+ | **No way to tell a good answer from a bad one.** Answers loop, pad, invent facts, or come back empty. | Returns `check:` lines for filler, numbers or quoted text absent from the source, and edits that do not match the file, plus execution receipts. [Measured misses and false alarms](https://github.com/bgauryy/FreeLlama/blob/main/docs/RELIABILITY.md) remain visible; clean checks do not prove accuracy. | An empty "thinking-only" answer exits 1 with the fix (`--think=false`) instead of looking like success. |
41
77
 
42
- - **Which model fits the job.** A tag name does not show capabilities, context window or memory
43
- footprint.
44
- - **Whether there is room.** One more load can push the machine into swap, several agents can pile
45
- onto one GPU, and a hot or busy machine slows everything.
46
- - **Whether it worked.** A model can repeat itself until its token cap, and nothing says whether the
47
- task ran on the GPU or fell back to the CPU.
78
+ Over a session it also keeps the machine efficient:
48
79
 
49
- FreeLlama answers all three on every call, which makes offloading safe to do by default: the paid
50
- model keeps the judgment, the local model does the volume, and each answer comes back with a receipt
51
- you can check. The name means less metered inference, not only Meta's Llama models. More in
52
- [Features](docs/FEATURES.md#why-freellama).
80
+ | Mechanism | Effect | Measured |
81
+ |---|---|---|
82
+ | **Prompt cache kept** | Reuses a loaded model's context window and settings, so Ollama's prompt cache survives between turns | A second question about a 3,144-token document took 5.1 s instead of 11.9 s (attention models; Ollama does not cache hybrid models such as `lfm3` across turns) |
83
+ | **Managed local admission** | Managed Ollama loads, including streams, pass the memory gate; managed llama.cpp tasks reserve their configured memory budget. Direct engine calls and external server startup are outside this gate | — |
84
+ | **Indexed code search** | A repeated search embeds only the chunks that changed | `packages/mcp/src`: 55.9 s first, 0.13 s next |
85
+ | **Long tasks as jobs** | A long task returns a job id at once; the agent polls and stays free | Job id in 29 ms; an interactive task behind 8 queued ones answered in 1.40 s instead of 3.52 s |
86
+
87
+ *Measured on one Apple M2 Pro (32 GB) with Ollama 0.40.15 on 2026-11-14 (the thinking example on
88
+ 2026-11-10). These are single-machine results, not general speed claims; method and limits:
89
+ [Benchmark](https://github.com/bgauryy/FreeLlama/blob/main/docs/BENCHMARK.md).*
90
+
91
+ The name means less metered inference, not only Meta's Llama models.
53
92
 
54
93
  ## Requirements
55
94
 
56
95
  | You need | Why |
57
96
  |---|---|
58
- | [Ollama](https://ollama.com/download) running (`ollama list` works) with at least one model | FreeLlama manages Ollama; it does not install, start or replace it, and never downloads a model without your approval |
59
- | Node.js 22 or newer | Runs the MCP server and the `freellama` npm launcher |
97
+ | [Ollama](https://ollama.com/download) running (`ollama list` works) with at least one model | Required for the agent workflows below. FreeLlama never downloads a model without your approval. Only the one-line installer offers to install Ollama, and only after asking you |
98
+ | Node.js 22 or newer | Runs the MCP server, the agent commands (`run`, `chat`, `gateway`…) and the npm launcher |
60
99
  | One of the platforms below | npm installs the matching prebuilt binary as an optional dependency; do not install with `--omit=optional` |
61
100
 
62
101
  | Platform | Prebuilt package |
@@ -67,243 +106,307 @@ you can check. The name means less metered inference, not only Meta's Llama mode
67
106
  | Windows x64 | `@octocodeai/freellama-native-win32-x64-msvc` |
68
107
  | Windows arm64 | `@octocodeai/freellama-native-win32-arm64-msvc` |
69
108
 
70
- Intel Macs and musl Linux (such as Alpine) have no prebuilt binary: build from source with Rust 1.89
71
- or newer ([Build from source](docs/BUILD_AND_NOTES.md#build-from-source)). Optional: a second,
72
- CPU-only Ollama process for small helper models ([CPU/GPU routing](docs/CPU_GPU_ROUTING.md)).
109
+ Intel Macs and musl Linux (such as Alpine) have no prebuilt binary: [build from source](https://github.com/bgauryy/FreeLlama/blob/main/docs/BUILD_AND_NOTES.md#build-from-source)
110
+ with Rust 1.89 or newer. A second, CPU-only Ollama for small helper models is optional
111
+ ([CPU/GPU routing](https://github.com/bgauryy/FreeLlama/blob/main/docs/CPU_GPU_ROUTING.md)).
73
112
 
74
- ## Install
113
+ Published npm installs on supported platforms use prebuilt Rust binaries; they need Node 22+,
114
+ not a Rust toolchain. Source builds need Rust and, for the agent commands and MCP, Node. The
115
+ [explicit llama.cpp operator path](https://github.com/bgauryy/FreeLlama/blob/main/docs/LLAMACPP.md) can run without Ollama; `run`, `chat`,
116
+ `gateway` and global readiness still depend on Ollama.
75
117
 
76
- ### MCP server (for your agent)
118
+ When Ollama is missing, every command that needs it stops at once and says what to do:
77
119
 
78
- Claude Code:
79
-
80
- ```bash
81
- claude mcp add freellama -- npx -y @octocodeai/freellama-mcp-server
120
+ ```mermaid
121
+ flowchart LR
122
+ cmd["freellama run, chat,<br/>gateway, status"] --> up{"Ollama answers?"}
123
+ up -->|yes| go["Runs"]
124
+ up -->|no| inst{"Ollama installed?"}
125
+ inst -->|no| m["Ollama is not installed. Install it with<br/>curl -fsSL https://ollama.com/install.sh #124; sh<br/>or from https://ollama.com/download (exit 1)"]
126
+ inst -->|yes| st["Ollama is installed but not running:<br/>open the Ollama app or run ollama serve<br/>(exit 75, retry)"]
82
127
  ```
83
128
 
84
- Claude Desktop, Cursor and other hosts:
129
+ ## Install
85
130
 
86
- ```json
87
- { "mcpServers": { "freellama": { "command": "npx", "args": ["-y", "@octocodeai/freellama-mcp-server"] } } }
88
- ```
131
+ One line installs FreeLlama and, if you agree, Ollama:
89
132
 
90
- At launch the server starts its own FreeLlama service on `127.0.0.1:11435` if none is running, so
91
- the CLI is optional. It does not install or start Ollama.
133
+ | System | Command |
134
+ |---|---|
135
+ | macOS, Linux | `curl -fsSL https://raw.githubusercontent.com/bgauryy/FreeLlama/main/scripts/install.sh \| sh` |
136
+ | Windows (PowerShell) | `irm https://raw.githubusercontent.com/bgauryy/FreeLlama/main/scripts/install.ps1 \| iex` |
92
137
 
93
- Required for `delegate_research` in a published install: `FREELLAMA_MCP_ALLOWED_ROOTS` lists the
94
- directories that tool may read (`:`-separated on macOS and Linux, `;` on Windows). Unset, every local
95
- `delegate_research` call is refused (its `adapter:"github"` runs without a workspace); the other tools
96
- do not need it, and `run_task` `files` uses `FREELLAMA_FILE_ROOTS` instead. Add it with
97
- `claude mcp add freellama -e FREELLAMA_MCP_ALLOWED_ROOTS=/absolute/path/to/your-project -- npx -y @octocodeai/freellama-mcp-server`
98
- or an `"env": { ... }` entry in JSON. All settings: [MCP configuration](packages/mcp/CONFIGURATION.md).
138
+ It installs the npm package when npm is on PATH, otherwise the checksum-verified binary. When
139
+ Ollama is missing it asks before running Ollama's official installer; add `sh -s -- --with-ollama`
140
+ or `sh -s -- --no-ollama` to decide up front. It never downloads a model:
141
+ run `freellama init` next to see what is installed and what fits.
99
142
 
100
- Without `model` (and without `FREELLAMA_MCP_DEFAULT_MODEL`), `delegate_research` uses the first
101
- research-agent catalog pick (stronger, default, small) that is installed and fits in memory now;
102
- GitHub research skips the small pick, which scored 1 of 6 there. When none fits, it takes the
103
- installed default (then stronger) pick and lets serve's memory gate admit, wait or refuse the load;
104
- with no pick installed it falls back to routing. The receipt's `researchModel` says which and why.
105
- GitHub answers are grounded against the adapter's own `gh` results; local adapters check the workspace on disk. A sweep whose
106
- server process exited reports `interrupted` with the `sweep{action:"resume", sweepId}` call, which
107
- reuses saved chunk results; sweeps never resume on their own.
143
+ Or install one part yourself:
108
144
 
109
- ### CLI (for the terminal)
145
+ | For | Install | Then |
146
+ |---|---|---|
147
+ | Your agent (Claude Code) | `claude mcp add freellama -- npx -y @octocodeai/freellama-mcp-server` | Ask the agent in plain words |
148
+ | Your agent (Claude Desktop, Cursor, other hosts) | `{ "mcpServers": { "freellama": { "command": "npx", "args": ["-y", "@octocodeai/freellama-mcp-server"] } } }` | Same |
149
+ | You, scripts, shell-only agents, operators | `npm install -g @octocodeai/freellama` | `freellama run`, `chat`, `gateway`, `serve`, `doctor`… |
150
+ | Operators without Node.js | `cargo install freellama-cli` (Rust 1.89+) | The operator commands only (`serve`, `doctor`, `catalog`…) |
110
151
 
111
- ```bash
112
- npm install -g @octocodeai/freellama
113
- freellama --version
152
+ One `freellama` command covers both halves; the npm launcher sends each command to the right one:
153
+
154
+ ```mermaid
155
+ flowchart LR
156
+ f["freellama COMMAND"] --> which{"COMMAND"}
157
+ which -->|"run, chat, gateway,<br/>workflows, job, tool(s)<br/>status on a terminal"| node["Agent commands, in Node<br/>(from @octocodeai/freellama-mcp-server,<br/>installed with it)"]
158
+ which -->|"serve, init, doctor, catalog,<br/>models, task, jobs, status --json…"| rust["Operator commands,<br/>the Rust binary"]
114
159
  ```
115
160
 
116
- Without installing, prefix commands with `npx @octocodeai/freellama`. Without Node.js, use
117
- `cargo install freellama-cli` (Rust 1.89+; the command is still `freellama`).
161
+ | Note | Detail |
162
+ |---|---|
163
+ | Agent commands on npm | From 0.11.0. From a checkout: `yarn install && yarn build && node packages/cli/bin/freellama.js run --help` |
164
+ | Without installing | Prefix any command with `npx @octocodeai/freellama` |
165
+ | The service | The MCP server and the agent commands start `freellama serve` on `127.0.0.1:11435` if none is running. Neither installs or starts Ollama |
166
+ | `delegate_research` | Reads only the directories in `FREELLAMA_MCP_ALLOWED_ROOTS` (`:`-separated; `;` on Windows), for example `claude mcp add freellama -e FREELLAMA_MCP_ALLOWED_ROOTS=/absolute/path/to/your-project -- npx -y @octocodeai/freellama-mcp-server`. `run_task` `files` uses `FREELLAMA_FILE_ROOTS` instead |
167
+ | Every setting | [MCP configuration](https://github.com/bgauryy/FreeLlama/blob/main/packages/mcp/CONFIGURATION.md) |
118
168
 
119
169
  ## Quick start
120
170
 
121
171
  ### From your agent
122
172
 
123
- Ask in plain words; the agent picks the tool ([MCP reference](packages/mcp/README.md)):
173
+ Ask in plain words; the agent picks the tool:
124
174
 
125
- - "List my local models and tell me which one fits coding tasks."
126
- - "Use FreeLlama to summarize these 40 files with a local model, then check three summaries."
175
+ - "Use FreeLlama to summarize these 40 log files with a local model, then check three summaries."
127
176
  - "Read this screenshot with a local OCR model."
177
+ - "Find where CLI flags are parsed in src/, using a local embedding model."
128
178
 
129
- Or call the tools directly: take the tested pick for the job from the catalog, then run it with
130
- that `model` (without one, routing picks by capability alone and may choose a model that does
131
- not fit now).
179
+ Or name a workflow. FreeLlama then picks the model and gives it step-by-step instructions:
132
180
 
133
181
  ```jsonc
182
+ { "tool": "run_task", "arguments": { "workflow": "fix-bug", "files": ["src/parser.ts"], "prompt": "drops the last token" } }
134
183
  { "tool": "models", "arguments": { "view": "catalog", "job": "coding" } }
135
- { "tool": "run_task", "arguments": { "task": "coding", "model": "<catalog pick>", "prompt": "Rename foo to bar in: ...", "options": { "num_predict": 512 } } }
136
184
  ```
137
185
 
138
- `run_task {preview:true}` shows the route without running or reserving anything.
186
+ | Call | Returns |
187
+ |---|---|
188
+ | `models {view:"catalog", job}` | Shipped recommendations for a job, with current installation and estimated fit; automatic execution can use a qualifying local calibration first |
189
+ | `run_task {preview:true}` | The route, without running or reserving anything |
139
190
 
140
191
  ### From the terminal
141
192
 
193
+ `freellama run` takes the same flags as `ollama run`. It streams tokens on a terminal and prints
194
+ only the answer in a pipe.
195
+
196
+ ```bash
197
+ freellama catalog # catalog recommendations: installed, estimated fit
198
+ git diff | freellama run -w summarize-diff # review summary from the pick that fits
199
+ freellama run -w fix-bug -f src/parser.ts "drops the last token"
200
+ freellama run --ask "Is a refund requested?" < ticket.txt # a yes/no answer with its probability
201
+ freellama run -j find-code -f 'src/**/*.ts' "where are CLI flags parsed"
202
+ freellama chat review-code # the real ollama chat, on a workflow
203
+ freellama status # memory, queues, loaded models, jobs
204
+ ```
205
+
206
+ | Stream | Carries |
207
+ |---|---|
208
+ | stdout | The answer only |
209
+ | stderr | `check:` lines (read them before you rely on the answer) and notes |
210
+
211
+ | Exit code | Meaning |
212
+ |---|---|
213
+ | 0 | Answered |
214
+ | 75 | Busy, short of memory, or Ollama stopped; retry later. stderr says when |
215
+ | 1 | Refused, failed, empty, or Ollama not installed |
216
+ | 2 | Usage error |
217
+ | 130 | Interrupted |
218
+
219
+ Model management stays with Ollama: `ollama list`, `ollama pull`, `ollama rm`.
220
+
221
+ ### From any Ollama, OpenAI or Anthropic client
222
+
142
223
  ```bash
143
- freellama init # check prerequisites, print a first-run plan; changes nothing
144
- freellama doctor # Ollama reachability, versions, hardware, effective settings
145
- freellama catalog # tested model picks per job, what is installed, what fits now
146
- freellama serve # keep running: the service on http://127.0.0.1:11435
147
- # in another terminal
148
- freellama ready # can work be served now, or what is it waiting for
149
- freellama models
150
- freellama task --task completion --model MODEL_TAG "Reply with exactly OK."
151
- freellama status # queues, memory holds, loaded models
224
+ freellama gateway # 127.0.0.1:11437
225
+ OLLAMA_HOST=127.0.0.1:11437 ollama run freellama/explain-code
152
226
  ```
153
227
 
154
- Replace `MODEL_TAG` with a tag from `models`. `init`, `doctor` and `catalog` work without `serve`.
155
- Every command has `--help`; the [CLI guide](docs/CLI.md) covers the rest. While `serve` runs, a
156
- status page is at `http://127.0.0.1:11435/_freellama/ui`.
228
+ | Client | Point it at | Model |
229
+ |---|---|---|
230
+ | Ollama (CLI, Open WebUI, Continue…) | `OLLAMA_HOST=127.0.0.1:11437` | `freellama/review-code`, or any installed tag |
231
+ | OpenAI Chat and Responses (Codex) | base URL `http://127.0.0.1:11437/v1` | `freellama/review-code` |
232
+ | Anthropic Messages (Claude Code) | `ANTHROPIC_BASE_URL=http://127.0.0.1:11437` | `freellama/review-code` |
233
+
234
+ Each workflow is a model; responses stream token by token. Real tags pass through to Ollama with
235
+ FreeLlama's admission and telemetry.
236
+
237
+ ## What you get
238
+
239
+ | Area | What it does | Where |
240
+ |---|---|---|
241
+ | **Model choice** | A qualifying machine-local Rust route takes priority over the shipped catalog. Capable workflows and OCR also require task-quality evidence for that route; otherwise catalog and capability fallbacks apply. The receipt names the selection and any caveats | [Model selection](https://github.com/bgauryy/FreeLlama/blob/main/docs/MODEL_SELECTION.md), `freellama catalog`, `models {view:"catalog"}` |
242
+ | **Second engine** | Explicit local llama.cpp text tasks share the Rust admission pools and resource governor. The operator starts the server and supplies context, output and memory bounds; placement remains unverified | [Managed llama.cpp](https://github.com/bgauryy/FreeLlama/blob/main/docs/LLAMACPP.md) |
243
+ | **Streaming with receipts** | Managed Ollama tasks stream tokens as server-sent events (`route`, `admission`, `delta`, then `done` with the full receipt); measured first token 95 vs 93 ms for direct Ollama. MCP shows "generating on MODEL: N tokens, R tok/s" while a job runs | `POST /_freellama/v1/tasks {stream:true}`, [Every API](https://github.com/bgauryy/FreeLlama/blob/main/docs/API.md) |
244
+ | **Where the time went** | Each receipt's `timing` splits a task by phase (discover, admission, Ollama's answer, placement, learning…) and gives FreeLlama's own `overhead_ms` | `--json`, `response_file`, [Architecture](https://github.com/bgauryy/FreeLlama/blob/main/docs/ARCHITECTURE.md#request-shapes) |
245
+ | **Workflows** | 15 tested instructions for small models: `fix-bug`, `change-code`, `implement`, `write-tests`, `review-code`, `explain-code`, `summarize-log`, `summarize-text`, `summarize-diff`, `extract-json`, `read-text`, `read-table`, `read-fields`, `answer-image`, `describe-screen`. Sampling comes from each model's card; the dated eval reports 45/46 completed passes against 25/48 for one-line prompts, with [denominators and limits](https://github.com/bgauryy/FreeLlama/blob/main/docs/BENCHMARK.md#built-in-prompts-measured) | `-w NAME`, `run_task {workflow}`, `scripts/local-test/workflows.mjs` |
246
+ | **Your own workflows** | A Markdown file per workflow (job, title, instructions) in `~/.octocode/freellama/workflows/`. It runs like a built-in, replaces one of the same name, and the receipt names the file and its digest; a bad file is skipped with the reason | [Your own workflows](https://github.com/bgauryy/FreeLlama/blob/main/docs/PROMPTS.md#your-own-workflows), `freellama workflows` |
247
+ | **Fallback chains** | Up to 4 models to try in order, each only after the one before was refused before it ran (no room, input over its context, not installed). Never after a model started; every attempt is in the receipt | `run_task {fallbackModels}`, `--fallback TAG` |
248
+ | **Structured output** | A field list (`'name, age int, tags list'`) or a JSON schema | `--schema` |
249
+ | **Decisions** | Yes/no, one of a list, or a level, with a probability | `--ask`, `--choice`, `--level` |
250
+ | **Embeddings and completion** | Shorter vectors; fill-in-the-middle on models that support it | `--dimensions`, `--suffix` |
251
+ | **Checkable answers** | Heuristics flag some padding, numbers or quoted text absent from the source, invalid edits, leaked thinking, input instructions, empty extraction fields and malformed tool calls. They miss errors and produce false alarms; a clean result still needs verification. Receipts distinguish configured from observed placement | stderr; MCP `response_file`; [measured reliability and limits](https://github.com/bgauryy/FreeLlama/blob/main/docs/RELIABILITY.md) |
252
+ | **Memory safety** | A model loads only if it fits with a reserve; idle models unload first, otherwise the load waits, then is refused with the reason | [The memory gate](https://github.com/bgauryy/FreeLlama/blob/main/docs/ARCHITECTURE.md#managed-task-execution) |
253
+ | **Fair sharing** | One queue per backend weights interactive, normal and background work 3:2:1; holds apply when the machine is busy, hot or swapping. An optional CPU-only Ollama runs helper models beside the GPU | [Monitoring](https://github.com/bgauryy/FreeLlama/blob/main/docs/MONITORING.md) |
254
+ | **Long answers** | Saved whole and returned as a short view | [Where an answer goes](https://github.com/bgauryy/FreeLlama/blob/main/packages/mcp/CONFIGURATION.md#where-an-answer-goes) |
255
+ | **Batches and jobs** | Up to 64 independent items; background jobs, optionally with durable receipts and idempotency keys; sweeps over a whole code tree or log set | `--each`, `run_task {tasks}`, `--defer` + `freellama job ID --wait`, `idempotencyKey`, `sweep` |
256
+ | **Agent-safe shell** | Answer-only stdout, stable exit codes, no hang on an agent's open stdin; every MCP tool callable from a shell | `freellama tool NAME JSON` |
257
+
258
+ ## What to offload
259
+
260
+ Offload bounded work whose result can be checked. Keep judgment in the agent.
261
+
262
+ | Offload | Keep in your agent |
263
+ |---|---|
264
+ | Embeddings, code search and deduplication | Small lookups (describing the task costs more than doing it) |
265
+ | OCR and image reading | High-stakes judgment: security review, design, merge decisions |
266
+ | Bulk rewrites, summaries, classification of many files | Edits across files |
267
+ | Questions about workspace files (`delegate_research`) | Final verification of any local answer |
268
+
269
+ Treat local answers as candidates: spot-check a few before you rely on the rest.
270
+
271
+ ## How it compares
272
+
273
+ Model loading, eviction, compatible APIs, MCP and presets are common. Ollama itself queues work and
274
+ evicts idle models; the llama.cpp router, llama-swap, LocalAI, Lemonade, LM Studio and oMLX each
275
+ manage model memory their own way. FreeLlama adds a specific combination for an agent offloading
276
+ work on a machine that is also doing other work:
277
+
278
+ - admission against live host signals (free memory with a reserve, OS pressure, swap, CPU load,
279
+ heat) that holds a cold load but lets a loaded model keep serving;
280
+ - per-job selection using qualifying local calibration, with catalog fallbacks and tested workflow prompts;
281
+ - compact answers with `check:` lines and a receipt of what ran, where and why.
282
+
283
+ | Choose | When |
284
+ |---|---|
285
+ | FreeLlama | An agent offloads bounded, checkable work to local Ollama models on a shared workstation |
286
+ | Ollama alone | One application, one explicitly chosen model, little contention |
287
+ | LocalAI, Lemonade | You want the server to supply agents, many backends or routing policies itself |
288
+ | LM Studio, Open WebUI | You want a desktop or web app for people |
289
+ | LiteLLM | An organization-wide gateway with retries, budgets and caching across providers |
290
+ | llama.cpp, oMLX, vLLM | You want engine-level control: batching, KV caches, kernels |
291
+
292
+ FreeLlama does not make Ollama decode faster, has no chat UI, no automatic failover between engines
293
+ and no scheduling across machines. It does not automatically escalate failed checks to a cloud
294
+ model; the caller owns that decision. The second engine is currently limited to explicit text tasks.
295
+
296
+ ### Benchmarks
297
+
298
+ Ollama alone, FreeLlama on Ollama, and the most popular alternatives by GitHub stars, on one task
299
+ and one hash-verified model file (Apple M2 Pro, 32 GB, 2026-11-14). All 300 answers were correct.
300
+
301
+ ![Ollama, FreeLlama, llama.cpp, LocalAI and llama-swap on six measured KPIs: median task time 272, 274, 336, 802 and 332 ms; first token 93, 95, 128, 541 and 130 ms; throughput at 4 clients 225, 221, 291, 145 and 305 per minute; cold request 1.13, 1.21, n/a, 3.39 and 1.58 s; plus what FreeLlama adds: 3.7 ms overhead, 98% vs 52% with built-in prompts, 9.7 ms CPU and 30 MB RAM, loads that would not fit refused](https://raw.githubusercontent.com/bgauryy/FreeLlama/main/docs/assets/benchmark-overview.png)
302
+
303
+ | | Ollama | **FreeLlama** | llama.cpp | LocalAI | llama-swap |
304
+ |---|---:|---:|---:|---:|---:|
305
+ | Median task time | 272 ms | **274 ms** | 336 ms | 802 ms | 332 ms |
306
+ | First token | 93 ms | **95 ms** | 128 ms | 541 ms | 130 ms |
307
+ | Tasks/min, 4 clients | 225 | **221** | 291 | 145 | 305 |
308
+
309
+ FreeLlama keeps Ollama's speed and adds what an agent needs on a shared machine:
310
+
311
+ ![FreeLlama's features measured: built-in prompts pass 98% of graded cases against 52% for one-line prompts; an interactive task behind 8 queued answers in 1.40 s instead of 3.52 s; a repeated code search takes 0.13 s instead of 55.9 s; a repeated sweep 18 ms instead of 49.8 s; a long task returns a job id in 29 ms](https://raw.githubusercontent.com/bgauryy/FreeLlama/main/docs/assets/benchmark-features.png)
312
+
313
+ The historical charts use completed-case accuracy: 45/46 (98%) for workflow prompts. Relative to
314
+ the nominal 48 planned cases, that is 45/48 (94%), with two completions missing from the retained
315
+ aggregate; the baseline is 25/48 (52%). This small public workload does not estimate general accuracy.
316
+
317
+ llama.cpp and llama-swap serve concurrent clients faster with Ollama's default settings, and
318
+ LocalAI trades speed for breadth. What to use for what you are building, and how every number was
319
+ measured: [Benchmark](https://github.com/bgauryy/FreeLlama/blob/main/docs/BENCHMARK.md).
157
320
 
158
321
  ## Under the hood
159
322
 
160
- Every managed call, from the MCP server, the CLI or the HTTP API, runs through the same Rust core
161
- and the same gates: route, admit, load, run, observe. Nothing is decided from a model's name.
323
+ Every managed request, whether from MCP, the agent commands, the operator CLI or the HTTP API, goes through the same
324
+ Rust core: route, admit, load, run, observe. Nothing is decided from a model's name.
162
325
 
163
326
  | Owner | Does |
164
327
  |---|---|
165
- | Your agent | Decides what to offload, writes the prompt, verifies the answer |
328
+ | Your agent, or you | Decides what to run, writes the request, verifies the answer |
166
329
  | FreeLlama | Picks the model, queues fairly, checks memory and host signals, coordinates loads, writes the receipt |
167
- | Ollama | Stores models, loads runners, generates tokens |
330
+ | Ollama, or the explicitly configured llama.cpp server | Executes inference; Ollama also supplies discovery, lifecycle operations and observed placement |
168
331
 
169
- ### Life of one task
332
+ The sequence below shows the default Ollama workflow. The [llama.cpp guide](https://github.com/bgauryy/FreeLlama/blob/main/docs/LLAMACPP.md)
333
+ describes its narrower execution path and unsupported controls.
170
334
 
171
335
  ```mermaid
172
336
  sequenceDiagram
173
337
  autonumber
174
- participant A as Agent
175
- participant M as MCP server
338
+ participant A as Agent or you
339
+ participant F as MCP server or freellama run
176
340
  participant S as freellama serve
177
341
  participant O as Ollama
178
- A->>M: run_task (task kind, model, prompt)
179
- M->>S: POST /_freellama/v1/tasks
180
- Note over S: Route: filter installed models by capability<br/>and context window, rank by policy,<br/>local benchmarks and loop history
181
- Note over S: Admit: fair queue per backend, weighted 3/2/1<br/>for interactive, normal and background work,<br/>then memory, swap, CPU-load and heat checks
182
- alt queue full, no room, or wait budget spent
183
- S-->>M: 429 or 503 with the reason
342
+ A->>F: a workflow, job or model, plus the request
343
+ F->>S: managed task (or a streamed request)
344
+ Note over S: Route: installed models by capability,<br/>context window, policy and local calibration
345
+ Note over S: Admit: fair queue, then memory, swap,<br/>CPU-load and heat checks
346
+ alt no room before the wait budget
347
+ S-->>F: 503 naming the hold and what holds memory
184
348
  else admitted
185
- opt model not resident
186
- S->>O: load it under the backend's load lock
349
+ opt model not loaded
350
+ S->>O: load it, unloading idle models if needed
187
351
  end
188
352
  S->>O: chat, generate or embed
189
- O-->>S: streamed tokens, checked for loops every 16 tokens<br/>when the repetition stop is on
190
- S->>O: GET /api/ps
191
- O-->>S: where the runner actually ran, GPU or CPU
192
- S-->>M: result + receipt
353
+ O-->>S: tokens
354
+ S->>O: GET /api/ps (where it really ran)
355
+ S-->>F: answer + receipt
193
356
  end
194
- M-->>A: answer + receipt: route, admission, timing, placement
357
+ F-->>A: answer, check: lines, receipt
195
358
  ```
196
359
 
197
- An explicit `model` always wins over routing; FreeLlama never swaps in another model. With
198
- `defer:true` the same path runs in the background and `task_jobs` returns the receipt.
199
-
200
- #### Where an answer goes
201
-
202
- Every result is saved whole (`response_file`; read one part with `read_response{file, section}`).
203
- `run_task` and `delegate_research` take two more fields that choose what comes back inline:
204
-
205
- - `output`: `auto` (default) returns the answer inline up to 8,000 characters (about 2,000 tokens),
206
- and above that a short view: the label line, the first lines of the answer, every `check:`,
207
- `handoff_file:`, `verification:` and `cited:` line unchanged, and the file holding the whole
208
- answer. `inline` always returns the whole text; `file` always returns the short view. The
209
- default exists because hosts limit tool output (Claude Code warns above 10,000 tokens and caps
210
- it at 25,000 by default) and every inline character costs the calling agent tokens.
211
- A shortened view also replaces the answer's text inside `structuredContent` with
212
- `answer moved: <output_file or read_response location>` and adds `output: {mode, chars, file}`.
213
- - `outputPath`: also write the answer there as Markdown (the `saveAs` handoff format), returned as
214
- `output_file`. The caller owns the path: a new file is created and an existing one replaced. It
215
- must resolve inside the readable roots (the project, the temp directory, `FREELLAMA_FILE_ROOTS`),
216
- outside any `.git` directory, and not be a directory. It is checked before the model runs, so it
217
- is refused with `preview` or `defer`; with `tasks` one file holds the combined text. A failed
218
- write keeps the whole answer inline and names the error.
219
-
220
- A shortened view without an `outputPath` writes the answer to a new
221
- `${FREELLAMA_HOME}/tmp/<timestamp>-<pid>-<n>.md` (default `~/.octocode/freellama`) and ends with
222
- `output_file: <path> (the full answer, N chars)`; a later `run_task{files:[output_file]}` can read
223
- it. Those files are deleted after `FREELLAMA_RESPONSE_TTL_DAYS` (default 7; `0` keeps them). If
224
- that write fails, the view points at the saved response
225
- (`read_response{file, section:"/result/content/0/text"}`); with neither, the whole answer is
226
- returned with a note.
227
-
228
- `task_jobs{action:"get"}` shapes a finished deferred job the same way (its own `output`, default
229
- `auto`). Receipts keep the routing, timing and token counts inline; telemetry and nested metrics move
230
- to the saved `response_file`. `models{view:"installed"}` and `resident` return a slim per-model set;
231
- `includeVerbose:true` returns the full records.
232
-
233
- ### The memory gate
234
-
235
- A model load has to fit before it starts, so a new load cannot push the machine into swap:
236
-
237
- ```mermaid
238
- flowchart TD
239
- T(["Task admitted"]) --> R{"Model already<br/>resident?"}
240
- R -->|"yes"| Run(["Run on the resident runner<br/>no new memory"])
241
- R -->|"no"| P{"OS memory pressure,<br/>or swapping on a large load?"}
242
- P -->|"yes"| Hold["Hold the load"]
243
- P -->|"no"| F{"Fits in available memory<br/>and leaves the reserve free?"}
244
- F -->|"yes"| Load(["Load, then run"])
245
- F -->|"no"| U["Unload idle runners"]
246
- U --> F2{"Fits now?"}
247
- F2 -->|"yes"| Load
248
- F2 -->|"no"| Hold
249
- Hold --> W{"Room freed before<br/>the deadline?"}
250
- W -->|"yes"| P
251
- W -->|"no"| X(["503 naming the hold<br/>and the largest memory users"])
252
- ```
253
-
254
- Resident models keep serving through a hold, except at critical OS memory pressure. Load estimates
255
- come from model metadata (including the K/V cache at the requested context), and Ollama stays the
256
- final authority on memory. `--low-memory advisory` admits a tight load with a warning instead of
257
- waiting. Details: [Architecture](docs/ARCHITECTURE.md#managed-task-execution).
258
-
259
- ## What to offload
260
-
261
- Offload bounded work whose result your agent can check; keep judgment in the agent.
262
-
263
- | Offload | Keep in your agent |
264
- |---|---|
265
- | Embeddings, search and deduplication | Small lookups (describing the task costs more than doing it) |
266
- | OCR and image reading | High-stakes judgment: security review, design, merge decisions |
267
- | Bulk rewrites, summaries, classification of many files | Edits across files |
268
- | Questions about workspace files (`delegate_research`) | Final verification of any local answer |
269
-
270
- Many independent items: `run_task {tasks}`. Long work: `run_task {defer:true}` then `task_jobs`.
271
- Treat local answers as candidates and spot-check some before relying on the rest.
360
+ An explicit `model` always wins over routing; FreeLlama never swaps in another model unless you
361
+ list one in `fallbackModels`. The memory
362
+ gate, admission and routing are described in [Architecture](https://github.com/bgauryy/FreeLlama/blob/main/docs/ARCHITECTURE.md).
272
363
 
273
364
  ## Safety
274
365
 
275
- - Never pulls a model without approval for one exact tag and size; never deletes one unless you name
276
- the exact installed tag.
277
- - Checks each load against live available memory; a load that does not fit waits, then is refused
278
- with a reason, and resident models keep serving.
279
- - Unloads only models it warmed or that you name; idle models are unloaded under memory pressure.
366
+ - Never pulls a model without approval for one exact tag and its size. Never deletes one unless you
367
+ name the exact installed tag.
368
+ - Never swaps in another model on its own: an explicit `model` always wins, and a `fallbackModels`
369
+ chain moves on only after a refusal before execution, so no work is replayed.
370
+ - Checks each load against live free memory. A load that does not fit waits, then is refused with
371
+ the reason; models already loaded keep serving.
372
+ - Unloads only models it loaded, or models you name. Idle models are unloaded under memory pressure.
280
373
  - Holds CPU-bound work on a busy or hot machine and names the signal in the receipt.
281
- - Binds to loopback; for remote access see [Production](docs/PRODUCTION.md).
374
+ - Binds to loopback. The gateway refuses browser requests from other origins and rebound DNS names.
375
+ Over HTTP it reads no files and fetches no URLs. For remote access, see
376
+ [Production](https://github.com/bgauryy/FreeLlama/blob/main/docs/PRODUCTION.md).
282
377
 
283
378
  ## Documentation
284
379
 
285
380
  | Topic | Page |
286
381
  |---|---|
287
- | All guides | [Documentation index](docs/README.md) |
288
- | CLI commands and flags | [CLI](docs/CLI.md) |
289
- | MCP tools, schemas, agent workflow | [MCP reference](packages/mcp/README.md), [MCP configuration](packages/mcp/CONFIGURATION.md) |
290
- | Operating procedure for agents | [FreeLlama skill](skills/freellama/SKILL.md) |
291
- | Features, routing and admission in depth, why FreeLlama | [Features](docs/FEATURES.md) |
292
- | How it compares with Ollama, llama.cpp, llama-swap, LocalAI | [Comparison](docs/COMPARISON.md) |
293
- | Choosing a model | [Model selection](docs/MODEL_SELECTION.md), [local model catalog](docs/LOCAL_MODELS.md) |
294
- | Model forms, measured results | [Model forms and results](docs/MODEL_FORMS_AND_RESULTS.md) |
295
- | Recipes per job | [Cookbooks](docs/cookbooks/README.md) |
296
- | CPU/GPU setup and placement | [CPU/GPU routing](docs/CPU_GPU_ROUTING.md) |
297
- | Queues, memory, live tuning | [Monitoring](docs/MONITORING.md) |
298
- | Faster, lighter local models; Ollama settings | [Tuning](docs/TUNING.md) |
299
- | Background jobs and recovery | [Deferred jobs](docs/DEFERRED_JOBS.md) |
300
- | History, affinity, warming | [Scopes and warming](docs/SCOPES_AND_WARMING.md) |
301
- | Deployment and releases | [Production](docs/PRODUCTION.md) |
302
- | Build from source, operating notes | [Build and notes](docs/BUILD_AND_NOTES.md), [Testing](docs/TESTING.md) |
303
- | Architecture and ownership | [Architecture](docs/ARCHITECTURE.md) |
304
- | Embedding the Rust core | [Rust core](packages/rust-core/README.md) |
382
+ | All guides | [Documentation index](https://github.com/bgauryy/FreeLlama/blob/main/docs/README.md) |
383
+ | Current ratings, evidence and remaining priorities | [Assessment](https://github.com/bgauryy/FreeLlama/blob/main/docs/ASSESSMENT.md) |
384
+ | End-to-end feature review and Ollama resource strategy | [Ollama review](https://github.com/bgauryy/FreeLlama/blob/main/docs/OLLAMA_REVIEW.md) |
385
+ | Every API on one page: MCP tools, agent commands, gateway, CLI, control API | [Every API](https://github.com/bgauryy/FreeLlama/blob/main/docs/API.md) |
386
+ | `freellama run`, `chat`, `gateway`: flags, virtual models, endpoints | [Agent commands](https://github.com/bgauryy/FreeLlama/blob/main/docs/AGENT_CLI.md) |
387
+ | Operator commands (`serve`, `doctor`, `catalog`…) and flags | [CLI](https://github.com/bgauryy/FreeLlama/blob/main/docs/CLI.md) |
388
+ | MCP tools, schemas, configuration | [MCP reference](https://github.com/bgauryy/FreeLlama/blob/main/packages/mcp/README.md), [MCP configuration](https://github.com/bgauryy/FreeLlama/blob/main/packages/mcp/CONFIGURATION.md) |
389
+ | Operating procedure for agents | [FreeLlama skill](https://github.com/bgauryy/FreeLlama/blob/main/skills/freellama/SKILL.md) |
390
+ | Features, routing and admission in depth | [Features](https://github.com/bgauryy/FreeLlama/blob/main/docs/FEATURES.md) |
391
+ | Actual vendor checks, numbers, limits and protocol | [Benchmark](https://github.com/bgauryy/FreeLlama/blob/main/docs/BENCHMARK.md) |
392
+ | Choosing a model | [Model selection](https://github.com/bgauryy/FreeLlama/blob/main/docs/MODEL_SELECTION.md), [local model catalog](https://github.com/bgauryy/FreeLlama/blob/main/docs/LOCAL_MODELS.md) |
393
+ | Explicit bounded text tasks on a second engine | [Managed llama.cpp](https://github.com/bgauryy/FreeLlama/blob/main/docs/LLAMACPP.md) |
394
+ | Check accuracy and public local-model tool-calling results | [Reliability](https://github.com/bgauryy/FreeLlama/blob/main/docs/RELIABILITY.md) |
395
+ | Model forms, measured results | [Model forms and results](https://github.com/bgauryy/FreeLlama/blob/main/docs/MODEL_FORMS_AND_RESULTS.md) |
396
+ | Recipes per job | [Cookbooks](https://github.com/bgauryy/FreeLlama/blob/main/docs/cookbooks/README.md) |
397
+ | CPU/GPU setup and placement | [CPU/GPU routing](https://github.com/bgauryy/FreeLlama/blob/main/docs/CPU_GPU_ROUTING.md) |
398
+ | Queues, memory, live tuning | [Monitoring](https://github.com/bgauryy/FreeLlama/blob/main/docs/MONITORING.md) |
399
+ | Faster, lighter local models; Ollama settings | [Tuning](https://github.com/bgauryy/FreeLlama/blob/main/docs/TUNING.md) |
400
+ | Background jobs, durable receipts and idempotency | [Deferred jobs](https://github.com/bgauryy/FreeLlama/blob/main/docs/DEFERRED_JOBS.md) |
401
+ | Writing your own workflows | [Local prompts](https://github.com/bgauryy/FreeLlama/blob/main/docs/PROMPTS.md#your-own-workflows) |
402
+ | History, affinity, warming | [Scopes and warming](https://github.com/bgauryy/FreeLlama/blob/main/docs/SCOPES_AND_WARMING.md) |
403
+ | Deployment and releases | [Production](https://github.com/bgauryy/FreeLlama/blob/main/docs/PRODUCTION.md) |
404
+ | Build from source, tests and evals | [Build and notes](https://github.com/bgauryy/FreeLlama/blob/main/docs/BUILD_AND_NOTES.md), [Testing](https://github.com/bgauryy/FreeLlama/blob/main/docs/TESTING.md) |
405
+ | Production panic/lock review and Windows memory evidence | [Rust resource audit](https://github.com/bgauryy/FreeLlama/blob/main/docs/RUST_RESOURCE_AUDIT.md) |
406
+ | Architecture and ownership | [Architecture](https://github.com/bgauryy/FreeLlama/blob/main/docs/ARCHITECTURE.md) |
407
+ | Embedding the Rust core | [Rust core](https://github.com/bgauryy/FreeLlama/blob/main/packages/rust-core/README.md) |
305
408
 
306
409
  ## License
307
410
 
308
- Copyright (c) 2026 Guy Bary. Licensed under [Apache-2.0](LICENSE-APACHE) or [MIT](LICENSE-MIT),
411
+ Copyright (c) 2026 Guy Bary. Licensed under [Apache-2.0](https://github.com/bgauryy/FreeLlama/blob/main/LICENSE-APACHE) or [MIT](https://github.com/bgauryy/FreeLlama/blob/main/LICENSE-MIT),
309
412
  at your option.