The conceptual foundation: roles, guardrails, topology, memory, and security for building usable agent systems.
Full content
## Core idea
A useful AI agent is not a magic personality. It is a **work unit with a contract**.
That contract should define:
- mission
- boundaries
- inputs
- outputs
- allowed tools
- success criteria
## The four-layer model
### 1. Orchestrator
The coordinator that decides what should happen next.
### 2. Specialists
Agents with narrow expertise like research, building, reviewing, or writing.
### 3. Guards
Verification and safety layers: fact-checking, schema validation, QA, security review.
### 4. Memory layer
A context system that stores current state, durable memory, and open threads.
## Design principles
### Narrow role design
One agent, one job. If it needs more than one sentence to describe, it is probably too broad.
### Least privilege
Give each agent only the minimum tools it needs.
### Clear outputs
Every agent should return a predictable structure.
### Separated policy
Keep role, guardrails, and procedure conceptually separate.
## Security principles
- Do not spread secrets across prompts or memory files
- Put external write actions behind approval
- Prefer deterministic checks over vibes
- Limit memory exposure by agent role
- Document repeated failures and convert them into process
## Why this matters
Most agent failures are not model failures. They are architecture failures: unclear ownership, too much permission, fuzzy outputs, and weak memory boundaries.
## Related sections
- Practical build workflow
- Topology patterns and diagrams
- Reusable templates for personal and family agents