Running 22 LLM agents 24/7 without going broke: habit-first, salience gates, shared cached prefix
Jealous-Asparagus518 · reddit · 2026-09-12
A developer running a persistent island of 22 AI citizens (1 sim minute = 1 real minute, potentially 31,680 calls/day) published their actual cost-saving architecture: habit-first execution in code for routine minutes, a salience gate that only triggers model calls on notable perceptions, a model ladder (Haiku 4.5 for routine thoughts, bigger models for high-stakes decisions and nightly reflection) with a daily ceiling, shared cached prefixes padded past Haiku's 4,096-token minimum plus persona blocks, and strict JSON schemas (strip nulls for openai/ models on OpenRouter or they 400). Hard-won lesson: every non-Anthropic model stalled the island at 06:00 due to missing request timeouts—add AbortSignal first. Everything is Apache-2.0 open source with a keyless mock brain.
More from coding & agent
- Runway rebrands to cfo.ai, launches AI CFO agent Ari with agent-native launch — garrytan · 2026-09-12
- Open-source thesys-core highlights RAG answers directly inside long PDFs — Flat-Phone-1596 · 2026-09-12
- Teknium shares Hermes agent tip: use /steer to correct mid-run without interrupting — Teknium · 2026-09-12
- Frontier model for planning, local Qwen for coding: a hybrid dev workflow experiment — kirisoraa · 2026-09-12
- Codex + Astra xhigh tackle MazeBench: static BFS solver nets 44 gems in ~2 hours — xeophon · 2026-09-12
- Real2sim first, then real: user reproduces Astra controlling a robot arm to paint — ZeYanjie · 2026-09-12