Obi Jam
Building Obi — a family-facing AI chief of staff running on a Mac Mini harness. Custom Node.js orchestrator, Discord transport, Claude API + Ollama, no framework. Real lessons from replacing a hosted agent platform with code you own.
18 articles
- Discord Image Attachments → Claude Vision in Five Lines Route Discord image attachments to Claude's vision API. Detect by content type, build image content blocks, send images before text.
- Channel-Aware Command Enrichment for Discord Agents Commands in a specific channel get auto-injected with project context. Same command, different channel, different behavior — no user effort required.
- Building Per-Skill LLM Cost Tracking Into Your Agent A JSONL-per-month cost logger that tags every API call by skill and user. Know exactly what each capability costs — not just total spend.
- Prompt Caching for Multi-Skill Agents — Split Stable vs Dynamic Your agent's identity doesn't change per request. Mark it for caching. Keep skill instructions in the dynamic block. Save 90% on repeated input tokens.
- Graceful Module Disable Pattern for Always-On Agents How to pause agent capabilities without deleting code or polluting health checks with stale data.
- Validate AI-Parsed Output Before Your Code Touches It When Claude vision extracts structured data from images, missing fields silently corrupt downstream math. A validation gate catches it.
- Building a Morning Brief: Multi-Source Agent Briefings How to build a daily agent briefing that pulls from Google Calendar and Vikunja, formats it for Discord, and posts at 6:30am automatically.
- Discord Markdown Gotchas for Bot Messages Discord headings need blank lines before them, markdown links generate embed previews, and messages over 2000 chars get rejected silently.
- Natural Language Date Parsing: The Same-Day Weekday Bug When your reminder parser sees '~wed 10pm' on a Wednesday, it schedules next week instead of today. A one-character fix.
- Self-Hosted Open Source as Agent Infrastructure Run Vikunja and Google Calendar locally and your agent gets task management, scheduling, and reminders for $0/month — no SaaS, no vendor lock-in.
- Your Agent Is Hallucinating Answers Instead of Running Tools When command routing fails silently, the LLM fills the gap with confident fabrications. The user never knows the tool didn't run.
- Build Your Own Agent Harness: A Layer-by-Layer Primer How to build an always-on AI agent runtime from scratch — transport, personality, LLM routing, skills, memory, and uptime — by validating one layer at a time.
- Claude for Thinking, Ollama for Doing Route complex reasoning to Claude API and cheap tasks to local Ollama. Your agent doesn't need its best brain for every message.
- Conversation Memory Is Context Not History Your agent doesn't need to remember every message. A sliding window of recent context beats an ever-growing archive.
- Keep Your Agent Runtime Under 400 Lines If you can't diagnose a problem in your agent runtime in 30 minutes, your codebase is too big. Simplicity is a reliability feature.
- Make Your Agent Transport a Swappable Layer Define a transport interface once. Discord today, iMessage tomorrow. Your orchestrator should never know which wire it's talking through.
- Separate the Harness from the Agent Your agent runtime should know nothing about who it's running. Split machine from mind and every agent gets portable.
- Your VPS Is Costing You More Than the Invoice The real cost of a rented server isn't the monthly bill. It's the maintenance time that could go toward building the product.