All projects

04Personal R&DMulti-agentLocal-first

Yousef HQ

A one-person “AI office” on a local GPU: 16 agents scout and verify Gulf B2B leads and produce bilingual Arabic/English AI content, while a human approves every outward action.

Role
Sole builder — architecture, safety rules, approvals, models and local infra; code written with Claude Code under my rules (Oct–Nov 2026)
Stack
Claude Code (subagents, skills, hooks, MCP) · Hermes Agent · Qwen models on LM Studio · Python 3.13 · SQLite FTS5/BM25 · Whisper · Playwright · ffmpeg · Remotion · Three.js
16role agents in 4 wings
$0local inference per run
−82%prompt tokens (17,349 → 3,036)
1/6 → 6/6claims-gate pass rate
1,825automated tests
16/16safeguard breaks caught

The problem

One engineer can’t watch Gulf news and tender sources for commercial signals by hand, and producing correct bilingual AI teaching content is slow and easy to get wrong: invented numbers, generic “AI slop” and broken right-to-left rendering.

What I built

  • Agent office. 16 role agents (Chief of Staff, Scout, Researcher, Reviewer, Offer Strategist, Copywriter, Art Director, Publisher, Analyst…) with least-privilege tools, file-based handoffs, a mailbox and heartbeats, shown live on a 3D dashboard.
  • “Python computes, the model phrases.” Every number comes from code into a capped fact sheet; the local Qwen model only rewrites it, and a claims validator rejects any number, date or status word without proof, falling back to rule-written text.
  • Lead radar. Scouting, Arabic/English normalisation, fuzzy dedup, verbatim-quote verification on the live page and explainable 10-dimension scoring: 465 URLs → 44 candidates → 5/5 records verified.
  • Humans approve everything. Fail-closed Claude Code hooks, approval only from an interactive terminal, a PIN-gated dashboard (scrypt, lockout, CSRF), and no send code at all; mutation tests catch 16/16 deliberate safeguard breaks.

Hard problems solved

A local model silently overflowing

LM Studio reloaded the model at 4,096 context while the agent prompt was 17K tokens. I made cron jobs tool-less with capped inputs (−82% tokens), added a preflight check and a 30-minute self-healing watchdog: the morning job runs in 38 s.

Empty answers from a reasoning model

The local Qwen model spent up to 3,000 tokens thinking and returned nothing. reasoning_effort “none”, a finish-reason check and a deterministic fallback brought a 20-token answer in 2.6 s.

Screens

More details
  • The “Python computes, the model phrases” claims gate went from a 1/6 to a 6/6 pass rate (39 unit tests).
  • The Scout pre-filter cut 465 sitemap URLs to 44 candidates.
  • The local model runs on one RTX 3090 Ti with 65,536-token context.