Fully Local Ollama Agent (No Cloud)
This playbook builds an agent that runs entirely on a local Ollama provider through the Pi SDK runtime, with journal memory backed by local embeddings and a sandbox that blocks all non-localhost network traffic. No cloud API keys, no outbound calls.
Who this is for
Section titled “Who this is for”A privacy-focused user with no cloud API budget who wants the whole stack — chat model, embeddings, and recall — to stay on their own machine.
An agent that runs entirely on a local Ollama provider via the Pi SDK runtime, with journal memory using local embeddings and no outbound network.
Features used
Section titled “Features used”runtime.local-providers— register Ollama and reference it asollama:<model>runtime.multi-backend— the Pi SDK bridge that drives the local providermemory.journal— hybrid (BM25 + vector) recall with static, non-decaying salience, no LLM requiredmemory.embeddings-config— local Ollama embeddings for the journal tiersandbox.network-policy— restrict runtime commands to localhost
Configuration
Section titled “Configuration”Every key below is verified against the config blueprint. The providers map registers Ollama; runtime.model references it as ollama:llama3.1:8b. Journal memory needs an embeddings block, and sandbox.network.mode: "localhost" keeps all runtime command traffic on-box.
{ "runtime": { "model": "ollama:llama3.1:8b" }, "providers": { "ollama": { "type": "ollama", "baseUrl": "http://localhost:11434", "enabled": true, "models": [ { "name": "llama3.1:8b", "capabilities": { "context_window": 32768 } } ] } }, "memory": { "mode": "journal", "path": "./.mono-agent/memory", "embeddings": { "provider": "ollama", "model": "nomic-embed-text:v1.5", "endpoint": "http://localhost:11434", "dim": 768 } }, "sandbox": { "mode": "native", "network": { "mode": "localhost" } }}- Pull both models locally:
ollama pull llama3.1:8b && ollama pull nomic-embed-text:v1.5 - Scaffold the agent:
mono-agent init --model ollama:llama3.1:8b --memory journal - Add the
providersentry for Ollama and thememory.embeddingsblock, then setsandbox.network.modetolocalhost. - Run
mono-agent validateto confirm Ollama is reachable and both models are pulled. - Run
mono-agent start— keep the webhook channel as the zero-credential smoke channel. curlthe webhook endpoint and confirm a response generated by the local model.
Smoke test
Section titled “Smoke test”Related
Section titled “Related”- Local providers
- Runtime backends
- Embeddings
- Capture and recall
- Sandbox
- Webhook channel
- Artifacts and traces — confirm no outbound network in the run artifact
- Skills and the mono-agent-composer — scaffold this config end to end