| name | Oracle Diagram Generator |
| description | Generate professional OCI architecture diagrams with verified Oracle styling and icons |
| version | 3.0.0 |
Oracle Diagram Generator - Complete Reference
Purpose
Generate professional, accurate OCI architecture diagrams using official Oracle icons and styling.
VALIDATED: Python Diagrams Library with OCI Icons
✅ WORKING SOLUTION (Tested January 2026)
The Python diagrams library has official OCI icons built-in. Combined with Graphviz for layout, this produces professional architecture diagrams programmatically.
Setup (One-Time)
curl -L -o miniconda.sh "https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh"
chmod +x miniconda.sh
./miniconda.sh -b -p $HOME/miniconda3
$HOME/miniconda3/bin/conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main
$HOME/miniconda3/bin/conda install -y graphviz
$HOME/miniconda3/bin/pip install diagrams
Quick Generate
python generate_oci_diagram.py --type rag --output /path/to/diagram
python generate_oci_diagram.py --type agent --output /path/to/diagram
python generate_oci_diagram.py --type platform --output /path/to/diagram
Understanding Icon Approaches
| Approach | Quality | Icons | Automation |
|---|
| Python diagrams | ⭐⭐⭐⭐⭐ | Official OCI built-in | Full |
| Mermaid.js | ⭐⭐⭐⭐ | Text-based styling | Full |
| Draw.io template | ⭐⭐⭐ | User drags from library | Partial |
| Draw.io with emojis | ⭐ | Unprofessional | Full |
What Claude CANNOT Do with Draw.io:
- Generate base64-encoded stencil paths (they're binary)
- Reference icons by name like
mxgraph.oci.compute_vm (doesn't exist)
What Claude CAN Do:
- Generate Python
diagrams code (HAS built-in OCI icons) ✅
- Create Mermaid.js diagrams (good for documentation)
- Generate Draw.io XML structure (user adds icons manually)
- Create ASCII diagrams for quick visualization
Recommended Approach by Use Case
| Use Case | Best Method | Quality |
|---|
| Customer presentations | Python diagrams → PNG | ⭐⭐⭐⭐⭐ |
| Documentation/README | Mermaid.js | ⭐⭐⭐⭐ |
| Interactive editing | Draw.io template + manual icons | ⭐⭐⭐⭐ |
| Quick planning | ASCII art | ⭐⭐⭐ |
| DON'T USE | Draw.io with emojis | ⭐ |
Python Diagrams: Complete OCI Icon Reference
Compute
from diagrams.oci.compute import VM, BM, Container, OKE, Functions, InstancePools
Database
from diagrams.oci.database import Autonomous, DatabaseService, Dcat
Network
from diagrams.oci.network import LoadBalancer, Vcn, InternetGateway, ServiceGateway, Drg
Storage
from diagrams.oci.storage import ObjectStorage, BlockStorage, FileStorage
Security
from diagrams.oci.security import Vault, CloudGuard, IDCloud
Monitoring
from diagrams.oci.monitoring import Telemetry, Events, Notifications, Alarm
DevOps
from diagrams.oci.devops import ResourceManager
GenAI (Use Generic Placeholder)
from diagrams.generic.compute import Rack
Method 1: Python Diagrams (Recommended)
The diagrams library has official OCI icons built-in.
Installation
pip install diagrams
brew install graphviz
apt install graphviz
Available OCI Icons
from diagrams.oci.compute import VM, BM, Container, OKE, Functions, InstancePools
from diagrams.oci.database import Autonomous, DatabaseService, Dcat
from diagrams.oci.network import LoadBalancer, Vcn, InternetGateway, ServiceGateway, Drg
from diagrams.oci.storage import ObjectStorage, BlockStorage, FileStorage
from diagrams.oci.security import Vault, CloudGuard, IDCloud
from diagrams.oci.monitoring import Telemetry, Events, Notifications, Alarm
from diagrams.oci.devops import ResourceManager
Complete Example: Enterprise RAG Platform
from diagrams import Diagram, Cluster, Edge
from diagrams.oci.compute import Container, Functions
from diagrams.oci.database import Autonomous
from diagrams.oci.network import LoadBalancer, InternetGateway
from diagrams.oci.storage import ObjectStorage
from diagrams.oci.security import Vault
from diagrams.generic.compute import Rack
from diagrams.onprem.client import Users
graph_attr = {
"bgcolor": "#FFFFFF",
"fontcolor": "#312D2A",
"splines": "ortho",
"dpi": "150"
}
with Diagram("OCI Enterprise RAG Platform", show=False, direction="TB",
graph_attr=graph_attr, outformat="png"):
users = Users("Users")
with Cluster("OCI Region"):
igw = InternetGateway("IGW")
lb = LoadBalancer("LB")
with Cluster("Application Tier"):
apps = [Container("Chat UI"), Container("RAG API")]
with Cluster("AI Tier"):
genai = Rack("OCI GenAI\\nCohere Command A")
embed = Rack("OCI GenAI\\nCohere Embed 4")
with Cluster("Data Tier"):
adb = Autonomous("ADB 23ai\\nVector Search")
storage = ObjectStorage("Documents")
vault = Vault("Secrets")
users >> igw >> lb >> apps
apps[1] >> Edge(color="#C74634") >> genai
apps[1] >> Edge(color="#C74634") >> adb
storage >> embed >> adb
Method 2: Mermaid.js (Documentation)
Good for embedding in Markdown documentation.
RAG Architecture
flowchart TB
subgraph VCN["OCI Virtual Cloud Network"]
subgraph Public["Public Subnet"]
LB[Load Balancer]
end
subgraph Private["Private Subnet"]
OKE[OKE Cluster]
FN[Functions]
end
subgraph AI["AI Services"]
GENAI[OCI GenAI]
EMBED[Embedding]
end
subgraph Data["Data Tier"]
ADB[(ADB 23ai<br/>Vector Search)]
OBJ[Object Storage]
end
end
Users --> LB --> OKE
OKE --> GENAI --> ADB
OBJ --> FN --> EMBED --> ADB
style LB fill:#C74634,color:#fff
style ADB fill:#C74634,color:#fff
style GENAI fill:#C74634,color:#fff
Agent Orchestration
flowchart TB
HUB[OCI GenAI Agent Hub]
subgraph Orchestration
SUP[Supervisor Agent<br/>Cohere Command A]
end
subgraph Specialists
A1[Data Agent]
A2[SQL Agent]
A3[Code Agent]
A4[Report Agent]
end
subgraph Tools
T1[Select AI]
T2[REST APIs]
T3[Functions]
end
ADB[(ADB 23ai)]
HUB --> SUP --> A1 & A2 & A3 & A4
A1 & A2 & A3 & A4 -.-> T1 & T2 & T3
T1 --> ADB
style HUB fill:#C74634,color:#fff
style SUP fill:#C74634,color:#fff
style ADB fill:#C74634,color:#fff
Method 3: Draw.io Template (User Adds Icons)
Generate structure, user drags official icons from OCI Library.
Template Structure
<mxfile host="app.diagrams.net">
<diagram name="OCI Architecture" id="arch-001">
<mxGraphModel dx="1200" dy="800" grid="1" gridSize="10">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="title" value="OCI Enterprise Platform"
style="text;fontSize=24;fontStyle=1;fontColor=#312D2A"
vertex="1" parent="1">
<mxGeometry x="40" y="20" width="400" height="40" />
</mxCell>
<mxCell id="vcn" value="Virtual Cloud Network (VCN)"
style="rounded=1;dashed=1;fillColor=#f5f4f2;strokeColor=#C74634;strokeWidth=2"
vertex="1" parent="1">
<mxGeometry x="40" y="80" width="800" height="500" />
</mxCell>
<mxCell id="lb-placeholder" value="[DRAG: Load Balancer]"
style="rounded=1;dashed=1;fillColor=#fff5f3;strokeColor=#C74634"
vertex="1" parent="1">
<mxGeometry x="100" y="120" width="80" height="80" />
</mxCell>
<mxCell id="adb-placeholder" value="[DRAG: Autonomous DB]"
style="rounded=1;dashed=1;fillColor=#fff5f3;strokeColor=#C74634"
vertex="1" parent="1">
<mxGeometry x="400" y="400" width="80" height="80" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
User Workflow:
- Save XML as
.drawio
- Open in Draw.io
- Import OCI Library: File → Open Library From → Device →
OCI Library.xml
- Drag official icons to replace placeholders
- Adjust and export
Official Oracle Colors
| Color | Hex | CSS Variable | Usage |
|---|
| Oracle Red | #C74634 | --oracle-red | Primary brand, icons |
| Oracle Red Dark | #8B2500 | --oracle-red-dark | Emphasis |
| OCI Teal | #2d5967 | --oci-teal | Secondary elements |
| Oracle Black | #312D2A | --oracle-black | Text, lines |
| Oracle Gray | #9e9892 | --oracle-gray | Borders |
| Background | #f5f4f2 | --oracle-bg | Containers |
| White | #FFFFFF | | Canvas background |
What NOT To Do
❌ Don't Use Emojis as Icons
<mxCell value="🗄️" style="text;fontSize=24" />
<mxCell value="⚡" style="text;fontSize=24" />
❌ Don't Use Dark Backgrounds
<mxGraphModel background="#0D1117">
❌ Don't Claim Non-Existent Shape Names
shape=mxgraph.oci.compute_vm
shape=mxgraph.oci.autonomous_database
❌ Don't Use Generic Rectangles for OCI Services
<mxCell value="ATP" style="rounded=1;fillColor=#C74634" />
Quality Checklist
Before Generating
Structure
Visual (for Python/final output)
Content
Setup Guide
Python Diagrams Setup
pip install diagrams
brew install graphviz
apt install graphviz
choco install graphviz
Draw.io OCI Library Setup
- Download: OCI-Style-Guide-for-Drawio.zip
- Extract ZIP
- In Draw.io: File → Open Library From → Device →
OCI Library.xml
- Icons appear in left sidebar under "OCI"
Resources
Version 2.0.0 - Corrected icon approach, added Python diagrams as primary method