Dominic PajakBlog

2025-09-22

Agentic AI running locally on a Raspberry Pi 5

Got agentic AI running 100% locally on my Arm-based Raspberry Pi 5. It can check its own system state and run actions independently. Adding more tools means loads of potential, and of course security considerations. (It's using the LLM's training on shell commands; I didn't provide it a list.)

The loop is: Voice, Plan, Act, Observe, Summarise, Speak, Remember.

How it works

Rather than one big prompt doing everything, the agent is three narrow LLM calls that hand off to each other — a planner, a judge, and a summariser — all the same small model (Qwen3 1.7B) running under Ollama on the Pi. Keeping each call to a single job is what makes a 1.7B model dependable: every step has one checkable output.

How the agent works: one small model in three roles on the Raspberry Pi 5 — a planner picks the next shell command, the command runs locally, a judge scores whether it answered the question and loops back to try another command if not, then a summariser turns the output into one spoken sentence.
The same small model plays three roles, and nothing leaves the Pi.

When you speak, a quick check happens first: the question is embedded and compared against past answers in a semantic cache, so anything I've asked before comes straight back without running the model. On a miss, the loop kicks in:

The stack

Also published on LinkedIn.

#edge-ai#agentic-ai#raspberry-pi