Agent Capsule: "Agents as Data" pattern for production AI agents (gist)
The Agent Capsule pattern reimagines AI agent development by defining agents as folders of documents rather than code, enabling faster iteration through prompting instead of coding. It uses a coding agent like claude-code as the runtime engine, with agent behavior controlled by modifiable documents in a structured directory. The architecture separates agent definition from execution, supporting scalable, multi-user deployment with isolated workspaces and shared templates.
- ▪The Agent Capsule pattern defines AI agents as document folders instead of code, using a coding agent as the runtime engine.
- ▪Agents are built and modified through prompting, allowing rapid iteration without traditional code changes and deployments.
- ▪Each user gets an isolated workspace derived from a shared template, maintaining separation of state, preferences, and memory.
- ▪The architecture consists of an agent layer (template, workspace, memory) and an execution layer (orchestration, capsules) for secure, scalable operation.
- ▪Capsules are ephemeral, stateless processes that execute against a workspace, read instructions, perform actions, and update memory before exiting.
Opening excerpt (first ~120 words) tap to expand
Agent Capsule A pattern for building production AI agents as documents, not agent code. This document presents the core concept, offering a concise and accessible overview to guide implementation. The Core Idea Most production agents are built with an Agent SDK (OpenAI, LangChain, LangGraph, etc.). You write code for tool dispatch, memory, sub-agents, session state, and so on. Every new capability requires a code change and a deployment. The idea here is different: use an existing coding-agent (like claude-code) as agent's runtime engine, and define the agent as a folder of documents. This folder of documents could be also prompted using a coding agent - making the process of agent building, practically prompting.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at Gist.