maximus-openclaw-local
Skill1 starsChanged 4 months agoMITView on GitHub
Run OpenClaw and Maximus on a local model (Ollama, LM Studio, llama.cpp, MLX) so the agent actually sees its own prompt. Covers the current openclaw.json model schema, the 64K context floor, setting num_ctx where it takes effect, budgeting Maximus's per-run prompt, and local-primary/cloud-fallback routing. Use for 'run Maximus locally', 'OpenClaw with Ollama', 'local model in OpenClaw', 'no API key', 'agent ignores its instructions on a local model'.
In this repository49 other files it gives its agents.
- core/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- file-opsSkill
- maximus-agent-designSkill
- maximus-ai-cost-controlSkill
- maximus-ai-data-pipelineSkill
- maximus-ai-fluency-for-buildersSkill
- maximus-ai-product-specSkill
- maximus-ai-safety-governanceSkill
- maximus-ai-ux-patternsSkill
- maximus-brainSkill
- maximus-build-featureSkill
- maximus-chain-of-verificationSkill
- maximus-code-reviewSkill
- maximus-contact-intelligenceSkill
- maximus-counterparty-discoverySkill
- maximus-debug-incidentSkill
- maximus-deep-research-proSkill
- maximus-deep-researchSkill
- maximus-design-specSkill
- maximus-devops-shipSkill
- maximus-eval-and-testSkill
- maximus-fine-tuningSkill
- maximus-fintech-paymentsSkill
- maximus-investigative-researchSkill
- maximus-k3-model-selectionSkill
- maximus-k3-self-hostingSkill
- maximus-literature-reviewSkill
- maximus-llm-model-selectionSkill
- maximus-local-research-assistantSkill
- maximus-local-research-assistantSkill
- maximus-mlops-deploySkill
- maximus-ollama-opsSkill
- maximus-people-finder-recruiterSkill
- maximus-people-finderSkill
- maximus-plan-implementationSkill
- maximus-prompt-engineeringSkill
- maximus-python-scientificSkill
- maximus-rag-pipelineSkill
- maximus-replit-handoff-proSkill
- maximus-slm-evalSkill
- maximus-slm-local-finetuneSkill
- maximus-slm-local-stackSkill
- maximus-slm-tool-callingSkill
- maximus-transaction-analystSkill
- maximus-write-articleSkill
- memory-keeperSkill
- skill-templateSkill
- web-researchSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 52
Measure the prompt before choosing a context size: Run python {baseDir}/examples/measure_prompt.py <maximus-repo> (or the recipe in …
- Very specific: line 73
Every eligible skill costs tokens on every run, and a local box rarely needs the SEO or film packs.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Maximus — OpenClaw Local
A local model that cannot see the system prompt is not running Maximus. It is running a stranger who was handed the last page of the manual. This skill makes sure the whole manual fits, and proves it before anyone calls the setup done.
Purpose
Get OpenClaw plus the Maximus workspace running on a model you host, with the
context arithmetic shown and verified on the actual machine. The deliverable is
a working ~/.openclaw/openclaw.json, a runtime configured to match it, and a
measured statement of how much headroom is left for the task.
Scope boundary
| Need | Skill |
| Wire OpenClaw + Maximus to a local runtime | this skill |
| Pick the model / quant for your hardware | maximus-slm-local-stack |
| Operate Ollama itself (Modelfiles, server env, API) | maximus-ollama-ops |
| Make a small model call tools without breaking | maximus-slm-tool-calling |
| Prove the local model is good enough for the job | maximus-slm-eval |
The failure this skill exists to prevent
It is silent. Nothing errors. The agent just gets dumber and nobody can say why.
- OpenClaw assembles a system prompt on every run: tool list, skill list
(metadata only), and bootstrap files such as
AGENTS.mdandSOUL.md. - The Maximus-owned share alone —
core/,memory/, and every linked skill's description — measured about 7,900 tokens for the full core install on 2026-09-30, after a description trim that took it down from about 10,400. OpenClaw's own prompt and tool schemas come on top. - Ollama's default context on a machine with less than 23 GiB VRAM has been 4,096 tokens under every source checked (the docs also list 2,048 in one table; see references). A 12,000-token prompt at 4,096 reaches the model as its first few tokens plus its last ~2,046.
- Setting
num_ctxthrough the OpenAI-compatible endpoint does nothing. The field is discarded and the request still returns 200.
Result: the recommended "free, no API" path can run with most of Maximus cut out, and it looks like model weakness rather than misconfiguration.
Core workflow
- Measure the prompt before choosing a context size. Run
python {baseDir}/examples/measure_prompt.py <maximus-repo>(or the recipe inHOWTO.md). Add a margin for OpenClaw's own prompt and tools, then the task itself: documents, tool results, and the reply. - Set the floor at 64K. Ollama's OpenClaw integration docs recommend at least 64K context for local models. Below that, say plainly that the setup is degraded, and by how much.
- Check it fits in memory. 64K of FP16 KV cache on an 8B-class model is
several GB by itself. Use the VRAM math in
maximus-slm-local-stack. If it does not fit: quantize the KV cache toq8_0, pick a smaller model, or use a hybrid setup. Never quietly shrink the context. - Set context where it takes effect. For Ollama, either set a server-wide
OLLAMA_CONTEXT_LENGTH, or bakePARAMETER num_ctxinto a Modelfile and point OpenClaw at that model tag. Declare the same number ascontextWindowin the OpenClaw provider entry so OpenClaw's own budgeting (tool-result caps, compaction) matches reality. - Write the config in the current schema. The default model goes at
agents.defaults.model.primaryasprovider/model, fallbacks atagents.defaults.model.fallbacks, custom endpoints undermodels.providers.<id>. Template inHOWTO.mdrecipe 2. - Trim what OpenClaw injects. Link only the skills this machine needs.
Every eligible skill costs tokens on every run, and a local box rarely needs
the SEO or film packs.
skills.limits.maxSkillsPromptCharscaps the skill list if you want a hard ceiling. - Verify on the real run.
ollama psshows the loaded context; ask the agent to quote a line from the start ofSOUL.mdand one from the end of the skill list. If it cannot, the prompt is being truncated. - Decide the routing honestly. Local-primary with a cloud fallback suits most people. Local-only is right when data cannot leave the box, and then the capability ceiling must be stated, not hidden.
Security
Local does not mean safe. OpenClaw's first launch warns about tool access for a
reason: a small model follows injected instructions in a web page or file more
readily than a frontier model does. Keep the gateway on loopback, keep DM
access paired, and do not give a local model shell or send tools you would not
give an intern on day one. Binding Ollama to 0.0.0.0 exposes an
unauthenticated API to the network.
Anti-patterns
- Trusting a default context. Three published defaults disagree;
ollama psdoes not. - Passing
num_ctxthrough/v1/chat/completions. Silently ignored. - Declaring
contextWindow: 128000for a model served at 4K. OpenClaw then budgets for context that does not exist. - Linking every pack on a 16 GB laptop. You pay for their descriptions on every turn.
- Calling a truncation bug "the model is dumb." Measure first.
- Using the old top-level
agent.modelform. Current docs useagents.defaults.model.primary; the repo example was written before that.
Output
A config diff or full openclaw.json, the runtime change (env var or
Modelfile), a context budget table (Maximus prompt, OpenClaw overhead, task
headroom), the verification result from step 7, and a single sentence naming
the capability ceiling of the chosen model. Volatile facts come from
references/openclaw-local-2026-09.md; re-verify if it is more than about two
months old.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

