DS DevShelfHub Projects · AI tools
Articles / Build Your Own Private AI Assistant with OpenClaw and Ollama

AI Engineering

Build Your Own Private AI Assistant with OpenClaw and Ollama

By DevShelfHub

Run a fully local AI assistant on your own machine — pair OpenClaw with Ollama, pick the right model for your hardware, schedule Telegram digests via cron, and weigh the privacy trade-offs versus cloud LLMs.

Build Your Own Private AI Assistant with OpenClaw and Ollama

Introduction

Most of us run the same five or six tasks through ChatGPT or Claude every day — summarise a paper, draft a blog, scan AI news, schedule a reminder. Every one of those prompts ships your text to a server somewhere. For repetitive, low-stakes work, that’s a strange trade. You don’t need a frontier model to read three RSS feeds and stitch them into a Telegram message, but you keep paying the privacy tax anyway.

This guide walks through building a fully local private AI assistant using OpenClaw as the agent runtime and Ollama as the local model server. No OpenAI key. No Claude key. The model runs on your machine, the agent runs on your machine, and your data never leaves the box. By the end you’ll have a setup that can write blog drafts, ping you a daily AI news digest on Telegram via cron, and call tools — all without a paid LLM subscription.

Table of contents

  • What OpenClaw is
  • What Ollama is
  • Why pair OpenClaw with Ollama
  • Hardware you actually need
  • Install Ollama
  • Pull a local model
  • Launch OpenClaw with Ollama
  • Point OpenClaw at your local model
  • Picking the right local model
  • Build your first agent — a Substack blog writer
  • Schedule a daily AI news digest to Telegram
  • Privacy benefits of going local
  • Limitations versus cloud models
  • Best practices
  • Common mistakes to avoid
  • Conclusion
  • Frequently asked questions

What OpenClaw is

OpenClaw is an open-source agent runtime — think of it as a self-hosted alternative to the Claude desktop app or ChatGPT’s “agent mode.” You give it a model, point it at some tools, and it runs an agentic workflow: it reads your instruction, plans steps, calls tools, writes files, and reports back.

What it can do out of the box

  • Read, write, and edit local files
  • Run code in a sandboxed workspace
  • Search the web and fetch URLs
  • Analyse PDFs and other documents
  • Schedule tasks via cron-style jobs

Channels it can talk through

  • WhatsApp, Telegram, Discord, Slack, Signal
  • Custom GPTs and chat front-ends
  • Spotify and other personal tooling
  • Anything reachable through an HTTP API

The default install ships configured for an OpenAI key, but that’s a convenience — not a requirement. Swap the model provider and you have a self-contained agent that never phones home.

What Ollama is

Ollama is the easiest way to run open-source LLMs on your own machine. It bundles model download, quantisation, GPU offload, and an OpenAI-compatible HTTP API into a single binary. You install it once, pull a model, and you have a local http://localhost:11434 endpoint that speaks the same protocol most agent frameworks already expect.

The catalogue is wide — Llama 3.1, DeepSeek, Qwen, Mistral, Phi, and a steady stream of new releases. Quality has improved fast enough that an 8B–30B local model is now genuinely usable for the kind of repetitive, structured work most people throw at a paid API.

Why pair OpenClaw with Ollama

OpenClaw needs a brain. Ollama provides one without an API key or a billing portal. The combination gives you three things that a cloud setup can’t:

Privacy by default

Prompts, intermediate tool calls, and outputs all stay on your machine. Nothing is logged on a vendor’s server, nothing is used for future training, and nothing leaks if a third-party breach hits your provider.

Zero per-token cost

Once the model is downloaded, inference is electricity. Run the same agent ten thousand times a month and the marginal cost is your power bill, not a $200 API invoice.

Always-on availability

No rate limits, no provider outages, no “model overloaded” errors. If your machine is on, your agent is on. Cron jobs that run at 9 a.m. every day just work.

Hardware you actually need

Local inference is the part where dreams collide with VRAM. Before you install anything, sanity-check your machine against the model class you want to run.

Minimum (7B–8B models)

  • 16 GB system RAM
  • A modern CPU or 8 GB+ VRAM GPU
  • ~10 GB free disk per model
  • Apple Silicon (M-series) works well thanks to unified memory

Comfortable (30B–70B models)

  • 64–128 GB system RAM
  • A high-VRAM GPU (24 GB+) or an M-series Mac with 64 GB+
  • 50–80 GB free disk per model
  • Quiet thermals — sustained inference will spin fans

If you only have 8–16 GB of RAM, stick to a quantised 7B model and keep agent tasks short. Trying to fine-tune on the same machine you’re running an agent on is a fast way to freeze the system.

Install Ollama

Head to ollama.com and either download the platform installer or run the one-line installer from your shell.

macOS & Linux

Bash
curl -fsSL https://ollama.com/install.sh | sh

Windows (PowerShell)

Text
winget install Ollama.Ollama

Once it’s running, confirm the daemon is up:

Bash
ollama --version
curl http://localhost:11434/api/tags

Pull a local model

A fresh Ollama install has no models on disk. Pull one before you wire up the agent. A safe starting set:

Text
# Solid all-rounder, ~5 GB
ollama pull llama3.1:8b

# Good at code and tool use, ~5 GB
ollama pull qwen2.5:7b

# Lightweight for low-spec machines, ~2 GB
ollama pull phi3:mini

Check what’s installed:

Text
ollama list

You should see a table with each model name, ID, size, and modification time. That table is what OpenClaw will offer you when picking a brain.

Launch OpenClaw with Ollama

OpenClaw ships as an Ollama-compatible app, so the install is a single command once Ollama is running:

Text
ollama run openclaw

The first launch downloads the OpenClaw runtime and asks you to pick a default model from the ones in your ollama list. Pick a model that handles tool calls well — Qwen 2.5, Llama 3.1, or any MiniMax/DeepSeek variant tuned for function calling. Confirm when it asks to create a workspace backup.

After a minute or two you’ll see the runtime announce a local URL:

Text
http://127.0.0.1:18789

Open it in a browser. That’s your private assistant.

Point OpenClaw at your local model

OpenClaw defaults to OpenAI GPT-class models. Switch it over before you do anything else:

  1. Open the OpenClaw web UI at http://127.0.0.1:18789.
  2. Click the model selector in the chat header.
  3. Under Local models, pick the Ollama model you pulled earlier (e.g. qwen2.5:7b).
  4. Save. The selector should now show the local model name instead of OpenAI GPT.

Send a quick smoke test:

Text
Hi, tell me what you can do.

A healthy install will respond with a short rundown of its capabilities — file editing, web search, PDF analysis, code execution — and may surface a few tool calls in the process. If you see those, the runtime is talking to the model correctly.

Picking the right local model

Open-source models are not interchangeable. The pick depends on what you want the agent to do.

General agent work

Qwen 2.5 (7B/14B), Llama 3.1 (8B), or MiniMax variants tend to handle structured tool calls well and behave reliably across multi-step workflows.

Writing & summarisation

Llama 3.1 (8B/70B) and Mistral 7B produce clean prose. Useful when the agent is mostly drafting blog content, summaries, or email replies.

Code-heavy tasks

DeepSeek-Coder, Qwen 2.5-Coder, and Codestral are the ones to try when the agent will write or edit code. They won’t match Claude or GPT-class models on hard problems, but they handle boilerplate well.

Low-spec machines

Phi-3 Mini, Gemma 2B, and quantised 7B builds keep memory pressure low. Performance is rougher, but they keep an agent usable on a laptop with 16 GB of RAM.

A practical rule: pick the smallest model that completes your task at acceptable quality. Larger models mean longer latency, more heat, and a bigger window for the model to wander off-task.

Build your first agent — a Substack blog writer

OpenClaw treats every chat as a way to either run a task or define a reusable skill. Asking it to “create me an agent” isn’t a special command — it’s a normal instruction that triggers tool calls behind the scenes.

The first prompt

Text
Create an agent that writes a detailed, technical, professional blog post
when I give it a topic. The output should be Markdown that I can paste
into Substack. Only generate the blog content — no publishing automation.

OpenClaw will spawn a new skill, ask a few clarifying questions (Substack URL, API tokens, tone), and write a skill.md file in its workspace that captures the agent definition. After it commits the skill, ask it to use the new agent:

Text
Write me a blog post on vectorless RAG.

The agent will write Markdown to a file inside the workspace, then echo it back into the chat. Copy the Markdown into Substack’s editor and you’re done. Nothing about the draft left your machine.

Schedule a daily AI news digest to Telegram

The real payoff of a local agent is automation. OpenClaw can register cron-style jobs that fire on a schedule, call tools, and send the result to a channel. Here’s the prompt to set one up:

Text
Every day at 9:00 AM IST, search the internet for the most trending AI
topics, write a detailed technical blog post about them, and send the
full content to my Telegram channel. Use the Tavily API for search.

OpenClaw replies with a plan and asks for three things:

Tavily API key

Free tier is enough for daily digests. Paste it into the chat when asked — OpenClaw stores it locally as a secret, not in plaintext history.

Telegram bot token

Open Telegram, search @BotFather, send /start then /newbot, and paste the token it returns.

Channel / chat ID

The chat the bot should post into. Add the bot to your channel, post a test message, then ask OpenClaw to resolve the chat ID from the bot’s update feed.

Once those are set, run a dry run before letting the cron fire on its own:

Text
Run and test the daily AI digest now, and send the result to Telegram.

If the message lands in your channel with the full blog body (not just a headline list), the wiring is correct. From here it runs on its own — as long as your machine is on and Ollama is up.

Privacy benefits of going local

The pitch “your data stays on your machine” is easy to say and worth unpacking. The concrete benefits of a local setup look like this:

  • No vendor logs. Cloud LLM providers retain prompts for at least a few days for abuse detection. Local inference has no such pipeline — nothing is written to a remote server.
  • No training contamination. Even with opt-out flags, vendor policies change. A local model can’t be silently re-trained on your data.
  • Sensitive work is safe by default. Personal journals, draft contracts, medical notes, internal company docs — you can run them through the agent without a compliance review.
  • Offline operation. A long flight, a flaky hotel network, a data-residency policy — none of them break the assistant.

Limitations versus cloud models

Local is the right answer for a lot of tasks, but it’s not the right answer for all of them. Be honest about where the gap is.

Where local falls behind

  • Complex coding tasks — Claude and GPT-class models still dominate
  • Long-context reasoning beyond 32K tokens
  • Frontier benchmarks: math olympiad, hard research synthesis
  • Image, audio, and video understanding at the level of GPT-4o or Gemini

Where local wins

  • Repetitive prompts at high volume
  • Structured extraction over your own documents
  • Daily automations and scheduled agents
  • Privacy-sensitive workloads
  • Cost-sensitive experiments — iterate without watching a meter

A pragmatic split many builders settle on: keep a paid Claude or GPT subscription for hard one-off reasoning, and run the daily, repetitive, privacy-sensitive 80% on a local stack.

Best practices

Do this

  • Start with a 7B–8B model and only scale up when you hit a real quality wall
  • Pin model versions in your skill definitions so behaviour stays reproducible
  • Keep secrets out of the chat — use OpenClaw’s vault or environment variables
  • Version-control the workspace folder so agent skills survive reinstalls
  • Test cron jobs by running them manually first
  • Watch system temps — sustained inference will throttle thermally on laptops

Avoid this

  • Pulling a 70B model on a 16 GB machine and wondering why it crashes
  • Running multiple agents and a fine-tune job on the same GPU at the same time
  • Leaving the Telegram bot token in plaintext in a shared workspace
  • Treating a 7B local model as a drop-in replacement for Claude Opus
  • Forgetting to set a cap on agent loop iterations — runaway agents waste cycles fast

Common mistakes to avoid

  • Picking the biggest model you can technically run. A 70B model that takes 40 seconds per reply will kill your enthusiasm. A 7B that replies in two seconds will actually get used.
  • Skipping the smoke test after a model swap. Models behave very differently on tool calls. Always send a “list what you can do” prompt right after switching to confirm the agent still wires through to its tools.
  • Shutting the machine down at night. If your morning cron depends on the agent being up, plug the machine in and disable sleep, or move the setup to a small always-on box (a Mac mini or a NUC is enough).
  • Trusting the model on facts it can’t see. Local models hallucinate more than frontier ones. For anything fact-dependent — news, papers, prices — have the agent call a search tool first, not answer from memory.
  • Ignoring observability. When a daily cron silently breaks three weeks in, you want logs. Keep the OpenClaw workspace logged and check it weekly.

Conclusion

Running your own assistant locally used to be a research project. With OpenClaw and Ollama it’s an afternoon of work and a few gigabytes of disk. The combination handles the kind of small, repetitive, schedule-driven AI work that quietly eats up most people’s ChatGPT bills — blog drafts, news digests, file edits, simple agents — without sending anything to a cloud provider.

Keep a paid model on the side for the hard problems. Run the rest at home. The privacy, cost, and automation upside compounds quickly once you have a daily cron or two firing reliably. Open source models are improving on a steeper curve than the gap to frontier models — whatever feels rough today will likely feel solid by your next pull.

Explore More on DevShelf

Build Your Own Private AI Assistant with OpenClaw and Ollama FAQ

Do I need a GPU to run this?

No, but it helps. CPU-only inference works for 7B models, with replies taking 5–20 seconds. Apple Silicon Macs and any modern NVIDIA GPU with 8 GB+ of VRAM bring that down to one or two seconds, which is the point where local feels comparable to cloud.

Can I use OpenClaw without Ollama?

Yes — OpenClaw also supports OpenAI, Anthropic, and other model providers via API keys. But that defeats the privacy angle. If you want a fully local stack, Ollama is the simplest backend.

Will a 7B local model be good enough for real work?

For summarisation, drafting, file edits, structured extraction, and orchestrating tool calls — yes. For deep reasoning, complex coding, or long-document synthesis, a frontier cloud model still wins. Match the model to the task instead of trying to make one model do everything.

How do I update models when new versions drop?

Pull the new tag with ollama pull modelname:tag and switch OpenClaw’s default model to the new one. Old versions stay on disk until you remove them with ollama rm.

Can the agent really run cron jobs while my computer is asleep?

No — if the machine is asleep, both Ollama and OpenClaw are paused. Either keep the machine awake (disable sleep, plug it in) or host the stack on an always-on box. A small Mac mini or a Linux NUC works well as a 24/7 agent host.

Is it safe to expose OpenClaw to the internet?

Not by default. The web UI assumes local-only access. If you want to reach it remotely, put it behind a VPN (Tailscale is the easy option) rather than opening the port publicly. The agent can execute code on your machine — treat that surface accordingly.

Can I move this setup to the cloud later?

Yes. The same Ollama + OpenClaw stack runs on any Linux server with a GPU. The trade-off is cost — a 24/7 GPU droplet is meaningfully more expensive than running on your own hardware. Start local, prove the workflow, then move to the cloud only if you genuinely need remote access or higher availability.