C4 doesn't have an official standard for representing AI agents yet. This toolkit is a working reference — the element types, the DSL starter, and the review checklist we're using while that standard emerges. Adapt it to your own context.
These element types extend standard C4 notation to accommodate AI agents, models, and orchestration layers.
| Element Name | C4 Level | Description | Technology Examples |
|---|---|---|---|
| Model Provider | Context | External system. Any third party provider your system sends data to for inference. Has interfaces, SLAs, and data residency implications. | OpenAI, Anthropic, AWS Bedrock, Azure OpenAI |
| Orchestration Container | Container | The coordination layer. Manages agent behaviour, sequences tool calls, maintains state, and routes between agents. The conductor, not the musician. | LangChain, AutoGen, LlamaIndex, Microsoft Agent Framework |
| Agent Container | Container | The autonomous actor. Defined goal, defined tools, defined permission scope. Its blast radius — everything it can reach — should be visible at this level. | Any custom agent built on an orchestration framework |
| Model Container | Container | The inference layer. Separately deployable with its own latency profile, cost model, and data handling characteristics. | Hosted API, locally running model, fine-tuned model endpoint |
| Prompt Template Layer | Component | The instructions that define agent behaviour. Treat changes to this layer with the same rigour as a code deployment. | System prompts, few-shot templates, chain-of-thought scaffolds |
| Tool Registry | Component | Every tool the agent can invoke. Each entry is a capability — and a potential blast radius extension. | API connectors, file system access, database queries, web search |
| Memory Store | Component | What the agent retains across sessions. Governs what it remembers, who can read it, and whether retention is appropriate. | Vector databases, session stores, conversation history |
| Guardrails Layer | Component | Constraints on agent behaviour. If this layer is absent — that is an architectural decision and belongs on the diagram. | Content filters, permission boundaries, output validators |
Structurizr uses a text format called DSL — Domain Specific Language — to define architecture diagrams as code. This means your architecture lives in version control, changes are tracked, and diagrams can be generated automatically.
The starter below implements the three container types and four component types from the reference card above. Copy it, substitute your own system and component names, and you have a working C4 model for your AI system in minutes.
Six questions to ask before signing off any C4 diagram that includes AI.