I built a team of AI agents that runs on my 2018 laptop, and asks my phone before doing anything risky
My laptop is an i5-8265U with 16 GB of RAM, a GPU that's slower than its own CPU, and 10 GB free on C:. I wanted a personal AI system on it anyway: something that could research, write, read my email, use the browser, and run on a schedule. I also wanted it to never send, write, or click anything w

My laptop is an i5-8265U with 16 GB of RAM, a GPU that's slower than its own CPU, and 10 GB free on C:. I wanted a personal AI system on it anyway: something that could research, write, read my email, use the browser, and run on a schedule. I also wanted it to never send, write, or click anything without asking me first.
So I built Control: a self-hosted team of AI agents with a dashboard, an approval queue, and phone notifications. It stays within about 4 GB of RAM.
Repo: https://github.com/Ali-Atif07/control
The core loop is deliberately boring. Every model, whether it's a 3B local model or Claude, gets the same instruction:
To use a tool, reply with ONLY: {"tool": "<name>", "args": {...}} When done, reply with ONLY: {"final": "<answer>"} Enter fullscreen mode Exit fullscreen mode The orchestrator parses the reply. If it's a tool call, it checks whether the tool is risky. If it is, it waits for my approval in the database, runs the tool, and feeds the result back to the model. The loop repeats until the model returns final.
I didn't use any vendor's native function calling, because a local model and a CLI agent don't have it. A plain-text protocol works across all of them. The cost is that small models sometimes wrap the JSON in prose, so the parser looks for the first valid JSON object anywhere in the reply.
Agents are rows in a database, not classes. "Researcher" is a system prompt plus a model plus a list of allowed tools. That's why the dashboard can add, edit or delete agents while everything is running.
1. The agent I wrapped was quietly bypassing my safety layer. I use Claude Code as a "brain" by running claude -p and piping the prompt in. In the first test it answered a web question correctly… using its own built-in web search, not mine. When I asked it to write a file, it tried its own file tool. None of that went through my approval queue or my logs.
The fix was one flag, --tools "", which turns off its built-in tools so it has to use mine. The lesson: when you wrap an agent (not just a model), check what it can do on its own.
2. The GPU was 4× slower than the CPU. Ollama detected my MX130 and loaded the model onto it. It generated 2.1 tokens/s. CPU-only: 7.8 tokens/s. The GPU did save about 1.4 GB of RAM, so it became an optional "low-RAM mode" instead of the default. Measure before optimising.
3. Prompts can contradict tools. I added an email_send tool, and the agent kept making drafts instead. Its older system prompt still said "you may create drafts, but never claim an email was sent." When you add a capability, re-read the instructions too.
4. An agent needs a way to ask. My first real request was to send a client an email saying their website was done. It got stuck. The agent needed the website name and my name, but its only option was to end the task with a question I had nowhere to answer. Adding an ask_user tool fixed it: the question appears in the dashboard and on my phone, I type the answer, and the same task continues.
The test suite uses a scripted fake model: a provider that returns canned replies. It drives the real tool loop, approvals, questions and the email gate with no network and no API keys, so CI runs on GitHub's free Ubuntu and Windows runners.
script ( [ '{"tool": "email_send", "args": {...}}', '{"final": "sent"}' ] ) run_task ( client, "email a@example.com", auto_approve = True ) assert seen_approvals == [ "email_send" ] # still asked, despite auto-approve Enter fullscreen mode Exit fullscreen mode What's next Calendar integration and a daily "what's left" summary Vision for pages without text labels Better long-term memory between tasks The repo has a build log with one guide per phase, explaining why each piece is built the way it is and which bugs testing caught. If you're learning to build agents, that's probably the most useful part.
Repo: https://github.com/Ali-Atif07/control. Feedback, issues and stars are very welcome. What would you want an agent like this to do on your machine?