Back to Learning AI Out Loud PracticalX Home
XE
PracticalX
X = Learning AI Out Loud
Day 19 of 30 · Knowledge Hub Toolkit
C4 for Agentic AI —
A Working Reference
Where we place AI in our C4 diagram reveals how deliberately we've designed what we're building.
Arc 4 · AI and Architecture · Where does AI sit in your C4 diagram?

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.

Arc 3 closed the security arc. Arc 4 opens with architecture — specifically, how to make AI visible in the diagrams your organisation already uses to reason about systems.
Deep Dive · Full Article
Representing AI Agents in C4 — A Practical Approach Worth Considering
📐
The New C4 Elements for Agentic AI

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 DSL Starter

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.

agentic-ai-system.dsl
💡
Standard C4 relationship arrows assume synchronous deterministic calls. For agent-initiated actions, annotate the relationship explicitly as "autonomous action" — as shown above. This is a pragmatic convention while official notation guidance is still emerging from the C4 community.
The C4 AI Architecture Review Checklist

Six questions to ask before signing off any C4 diagram that includes AI.

Current Score
0 / 12
Answered
0 / 6
Context Level
Context · Model Provider
Our model provider appears as an external system in the context diagram with data flow and residency implications noted
Container Level
Container · Separation
The orchestration layer, agent container, and model container are represented as distinct deployable units
Container · Blast Radius
The blast radius of every agent container is visible — we can draw what it can reach in under 10 minutes
Component Level
Component · Named Elements
The prompt template layer, tool registry, memory store, and guardrails layer are named as components inside each agent container
Component · Guardrails
The guardrails layer is explicitly represented — including if it is currently absent
Relationships
Relationships · Autonomous Actions
Agent-initiated autonomous actions are annotated distinctly from standard synchronous calls
Your Result
An imperfect diagram that shows where your AI agents sit is significantly more valuable than a clean diagram that pretends they aren't there.
Read the full article: Representing AI Agents in C4 — A Practical Approach Worth Considering →
Series Progress
Day 19 / 30