Skip to content

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.

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.

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" }
}
}
  1. Pull both models locally: ollama pull llama3.1:8b && ollama pull nomic-embed-text:v1.5
  2. Scaffold the agent: mono-agent init --model ollama:llama3.1:8b --memory journal
  3. Add the providers entry for Ollama and the memory.embeddings block, then set sandbox.network.mode to localhost.
  4. Run mono-agent validate to confirm Ollama is reachable and both models are pulled.
  5. Run mono-agent start — keep the webhook channel as the zero-credential smoke channel.
  6. curl the webhook endpoint and confirm a response generated by the local model.