← 返回功能页
系统架构图
ENGINEERING ap-diagrams Draw.io CLI
系统架构图
自动绘制
描述架构 → AI 布局 → 导出 SVG/PNG
① 用自然语言描述 ② Agent 构建 draw.io 图形 ③ 导出 SVG/PNG/PDF
// Agent 会话日志
U
"绘制微服务架构:API 网关 → 认证、用户、订单服务。订单服务连接支付和通知服务。所有服务共享 Redis 缓存。"
AP
// 规划执行顺序
- → 创建微服务图模板
- → 添加 6 个带图标的服务节点
- → 用方向箭头连接各节点
- → 添加 Redis 缓存作为共享基础设施层
- → 应用暗色主题,导出 SVG + PNG
agentputer — ap-diagrams executor
$ ap-diagrams new --type microservice --theme dark
✓ Diagram initialized with microservice template
$ ap-diagrams add node --labels "Auth,User,Order" --row 2 --spacing 200
✓ 3 service nodes auto-positioned in row 2
$ ap-diagrams connect "API Gateway" --to "Auth,User,Order" --style arrow
✓ 3 connections wired with directional arrows
$ ap-diagrams export --svg --png --fit-page
✓ Exported: microservice-arch.svg + microservice-arch.png
elapsed: 31s
📐microservice-arch.svgVector editable
// 此场景支持的能力
☁️
云图标库
内置 AWS、GCP、Azure 和 Kubernetes 图标集,无需手动导入。
🔗
智能自动路由
连接线自动绕过节点,无需手动拖拽连接。
📊
多种图表类型
微服务、ER、网络拓扑、时序、UML、C4 模型全支持。
🎨
深色 & 浅色主题
专业图表主题,视觉风格统一。
📄
从代码/Schema 生成
直接从 SQL Schema 文件自动生成 ER 图。
✏️
可编辑的 SVG 输出
标准 SVG 文件,可在任何矢量工具中打开编辑。