Skip to main content

Command Palette

Search for a command to run...

Better Prompts Won't Fix Your AI Agents — Infrastructure Will

Updated
3 min read

Better Prompts Won't Fix Your AI Agents — Infrastructure Will

Every "how to work with AI agents" guide starts with prompt engineering. Be specific. Give examples. Set context.

That's fine for one agent, one session. It completely falls apart when you have 20 agents running concurrently, each with different contexts, hitting the same files, and none of them remembering what the others did.

Better prompts won't fix that. Infrastructure will.


The Problem Nobody Talks About

Here's what actually breaks when you run multiple agents:

  1. Concurrent file writes. Agent A reads a file. Agent B writes to it. Agent A's context is now stale.

  2. Credential access. Touch ID doesn't work from cron. Your agents can't unlock your password manager at 3am.

  3. Silent failures. An agent hits an error on a recurring cron job. You don't notice for three days.

  4. Context starvation. Your agent's context window fills with irrelevant details. It can't reason about the actual problem.

None of these are prompt problems. They're infrastructure problems.


The Four Tools That Fixed It

1. FactBase — Structured Knowledge, Not Flat Text

Memory as flat text fails at scale. "Python version is 3.11" gets buried under 50 other facts. Agents can't query it reliably.

Solution: SQLite database with WAL mode for concurrent access. Entity-attribute-value model. Every fact queryable by category, entity, keyword. Multiple agents read and write simultaneously without corruption.

GET /v1/facts?entity=python&attribute=path
→ /opt/homebrew/bin/python3.11

One agent discovers a fact. Every agent knows it.

2. Credential Proxy — API Keys Without Touch ID

Passwords stored in a local daemon. Agents request credentials by service name — no Touch ID, no browser extension, no interactive login. Cron jobs run unattended.

credential-proxy get "dev.to API"
→ api-key-here

The daemon holds the keys. The agents just ask.

3. Cron Guard — The Smoke Alarm for Your Agent Fleet

If 3+ consecutive cron runs fail, it alerts you. Silent failures are the worst kind — you don't know your agents stopped working until you manually check.

Pattern: watchdog script → checks last N run statuses → alerts on threshold. Zero config. Just runs.

4. Context Packer — Fit More Into Your Token Budget

A 2,500-file repo becomes an 8-file context pack. Preserves structure: important files, key decisions, dependency graph. Everything else summarized or excluded.

Your agent can actually reason about the project instead of drowning in file listings.


The Pattern

Everyone's optimizing prompts. I'm optimizing the environment agents run in. The prompt is 10% of the problem. The other 90% is:

  • Can the agent access the right files?
  • Can it authenticate to services without you?
  • Will you know if it breaks?
  • Can it fit the problem in its context window?

Fix those, and your prompts get 10x more effective — because the agent can actually act on them.


All four tools are open source. FactBase and Pitfall Registry are live at workswithagents.dev. Credential proxy, cron guard, and context packer live in ~/.hermes/. No courses. No pricing. Just infrastructure.

More from this blog

W

Works With Agents

25 posts