r/opencode • • 18d ago

I built a 13-agent personal assistant in 4 days with OpenCode — 136 commits, ~19k lines, what worked and what didn't

I've been using OpenCode (Go plan, DeepSeek V4.1 Flash) as the only coding agent for a self-hosted project and wanted to share the numbers and the parts that surprised me.

![img](d4o26qkutl0i1)

What it is: a private "agent hub" — a web app where each bot has a name, avatar, prompt, model and its own tool permissions. 13 agents for real life: news digest, email/calendar, homelab, mining rigs, shopping/wishlist, documents, photos, energy, fishing, cooking. 65 tools in total (files, web, SSH, browser automation, email, calendar, scheduler, memory, skills, OCR, artifacts, vault).

Stack: FastAPI + SQLite + vanilla JS SPA, systemd, one Proxmox LXC, PWA behind Cloudflare Access. No framework, no build step.

Numbers: 136 commits between Nov 4 and Nov 8, version 1.38.0. server.py is ~13.7k lines, app.js ~5.8k. Everything written through OpenCode, with me reviewing and deciding.

Things that worked well

  • AGENTS.md with hard rules (scope, no secrets in git, changelog + journal entry after every change, one commit per phase). Once those rules existed, the agent stopped drifting.
  • Letting it read its own changelog before a new feature. The changelog became the project memory; regressions dropped a lot.
  • Small, explicit requirements instead of "make it nicer". UI work especially.
  • Tests as a gate. python3 -m unittest discover -s tests after every phase caught most of the breakage before deploy.

Things that didn't

  • Left alone, it happily appends to the biggest file. I had to ask for splits explicitly.
  • Long CSS/JS diffs are where it hallucinates selectors and event handlers. Screenshots or a precise "this element, this behavior" description were required.
  • Without a rule, it invented URLs in answers. I ended up adding server-side verification: every http(s) link in a reply must exist in the tool results, otherwise it's stripped.
  • It will happily build the happy path and skip error states unless asked.

Interesting bits

  • Per-agent Chrome tabs over CDP, with a lock per (user, agent, task) so parallel bots don't fight over the same page.
  • Parallel @bot1 @bot2 handoffs, streamed with asyncio.as_completed so the fastest bot answers first instead of waiting for the slowest.
  • Vision fallback: image upload to a text-only model goes through a vision model + tesseract OCR, so the agent still gets the content.
  • Sandboxed HTML artifacts (allow-scripts, no allow-same-origin) for interactive charts.
  • Action approvals per tool type, daily token budget, audit log for every tool call.

It's a personal LAN project, not a product, and the repo is private for now. Happy to go deeper on any part — the tool/approval model and the browser tab isolation are the two things I'd rebuild the same way.

1 Upvotes

0 comments sorted by