Architecture
Patterns, decisions, and reference material from building AI agent infrastructure in production.
Credential Isolation for AI Agents
Assume the agent will eventually be manipulated. Design so that even then it cannot leak what it never held: credentials live behind a vending proxy, egress is allowlisted, and the runtime is read-only.
patternai-agentssecuritysovereigntyCron over Bus: Boring Scheduling for Agent Systems
Agent systems reach for pub-sub buses and orchestration frameworks long before they need them. One host scheduler driving deterministic scripts — with completion flags and typed state for coordination — is easier to reason about, debug, and trust.
patternai-agentsoperationsreliabilityEvent Log as System of Record for AI Agents
Give the agent one append-only, hash-chained event log as its single source of truth. Briefs, dashboards, and memories become disposable projections — replayable, auditable, and tamper-evident.
patternai-agentsreliabilityLLM at the Edges, Determinism in the Middle
Confine model calls to the system's boundaries — extraction on the way in, prose on the way out — and keep everything between them deterministic code. Anything arithmetic is never the model's job.
patternai-agentsreliabilityllm-opsLocal-First Model Routing with Explicit Escalation
Run the local model as the default for everything, and make frontier-model escalation an explicit, visible decision — never a silent fallback triggered by the presence of an API key.
patternai-agentssovereigntyllm-opsOpenClaw Architecture: Anatomy of a Personal AI Agent
How OpenClaw is built — the Gateway process, the workspace file system, the 8 auto-loaded files, the config surface, and the system prompt assembly that turns markdown into a running agent.
referenceai-agentsopenclawThe Advisory-Only Agent: A Structural Boundary for High-Stakes Domains
When an AI agent operates in a domain where mistakes are expensive and irreversible, make execution structurally impossible — not a config flag. The agent proposes, briefs, and alerts; a human pulls every trigger.
patternai-agentssafetyagent-designThe Auto-Loaded Context Contract
Every agent framework loads a fixed set of context at session start — and silently ignores everything else. Treat that set as a contract: design your agent's knowledge around what is guaranteed to be present after any restart or compaction.
patternai-agentsagent-design