⌘K
Open Mighty Back to Agents
✦
What can you do with this Agent?▾
Accurately convert natural language requirements into multi-level, standardized Mermaid diagrams, supporting end-to-end visualization of system architecture and business processes.
Agent Demo
✦
你好,我是你的 Markdown 与 Mermaid 流程/架构图专家。将自然语言需求解析为规范化 Mermaid 代码,支持业务流程、时序图与系统架构的多层分解与着色规则,能自动拆分复杂逻辑为 L0/L1 图组,输出可直接嵌入文档或评审的代码块,请描述你的场景与关注点。
Y
Please draw a user login flowchart including error handling and cache write.
✦
Diagram 1: [User Login Main Flow]
```mermaid
%%{init: {"flowchart": {"defaultRenderer": "elk"}}}%%
graph TD
%% Core / Main flow (cool blue background + deep blue text)
classDef main fill:#eff6ff,stroke:#3b82f6,color:#1e3a8a,stroke-width:2px
%% Decision / Configuration nodes (soft orange background + brown-orange text)
classDef check fill:#fff7ed,stroke:#f97316,color:#9a3412,stroke-width:2px
%% Success / End nodes (eye-friendly green background + deep green text)
classDef success fill:#f0fdf4,stroke:#22c55e,color:#14532d,stroke-width:2px
%% Error / Exception nodes (alert red background + deep red text)
classDef error fill:#fef2f2,stroke:#ef4444,color:#7f1d1d,stroke-width:2px
%% General / External systems (muted gray background + charcoal text)
classDef default fill:#f8fafc,stroke:#94a3b8,color:#334155,stroke-width:2px
Start([User opens login page]) --> Input[Enter username and password]
Input --> Request(Submit login request)
Request --> Check{Are username and password correct?}
Check -- No --> Fail[Display error and clear password field]
Fail --> Input
Check -- Yes --> Token[Generate Access Token]
Token --> Cache[(Write to Redis cache)]
Cache --> Success([Redirect to application homepage])
class Start,Input,Request,Token main;
class Check check;
class Cache default;
class Fail error;
class Success success;
```
Y
I need a simple system architecture diagram: Client -> API Gateway -> Auth Service -> User Service -> User Database, annotate rate limiting/circuit breaker dependency.
✦
Diagram 1: [System Architecture and Data Flow]
```mermaid
%%{init: {"flowchart": {"defaultRenderer": "elk"}}}%%
graph LR
%% Core / Main flow (cool blue background + deep blue text)
classDef main fill:#eff6ff,stroke:#3b82f6,color:#1e3a8a,stroke-width:2px
%% Decision / Configuration nodes (soft orange background + brown-orange text)
classDef check fill:#fff7ed,stroke:#f97316,color:#9a3412,stroke-width:2px
%% Success / End nodes (eye-friendly green background + deep green text)
classDef success fill:#f0fdf4,stroke:#22c55e,color:#14532d,stroke-width:2px
%% Error / Exception nodes (alert red background + deep red text)
classDef error fill:#fef2f2,stroke:#ef4444,color:#7f1d1d,stroke-width:2px
%% General / External systems (muted gray background + charcoal text)
classDef default fill:#f8fafc,stroke:#94a3b8,color:#334155,stroke-width:2px
Client((Client)) -->|HTTP Request| APIGW((API Gateway))
APIGW -->|Forward| Auth[Auth Service]
Auth -->|Validate and return token| UserSvc[(User Service)]
UserSvc -->|Read/Write| DB[(User Database)]
APIGW -.->|Dependency: Rate limiting / Circuit breaker| CircuitBreaker[(Circuit Breaker / Rate Limiter)]
class Client,APIGW,Auth,UserSvc main;
class DB default;
class CircuitBreaker check;
```
Y
Help me design a complex download and retry engine that includes configuration validation, segmented downloads, checksums, configurable retry and backoff strategies, and error branches. The logic is very complex and needs layered presentation.
✦
Diagram 1: [L0 Main Flow - Download Engine Overview]
```mermaid
%%{init: {"flowchart": {"defaultRenderer": "elk"}}}%%
graph LR
%% Core / Main flow (cool blue background + deep blue text)
classDef main fill:#eff6ff,stroke:#3b82f6,color:#1e3a8a,stroke-width:2px
%% Decision / Configuration nodes (soft orange background + brown-orange text)
classDef check fill:#fff7ed,stroke:#f97316,color:#9a3412,stroke-width:2px
%% Success / End nodes (eye-friendly green background + deep green text)
classDef success fill:#f0fdf4,stroke:#22c55e,color:#14532d,stroke-width:2px
%% Error / Exception nodes (alert red background + deep red text)
classDef error fill:#fef2f2,stroke:#ef4444,color:#7f1d1d,stroke-width:2px
%% General / External systems (muted gray background + charcoal text)
classDef default fill:#f8fafc,stroke:#94a3b8,color:#334155,stroke-width:2px
Start([Receive download request]) --> Validate[Configuration and permission validation]
Validate --> Segmenter[Segmentation and scheduling]
Segmenter --> Engine[Core download and retry engine]
Engine --> Validator[Integrity validation (checksum/signature)]
Validator -- Success --> Store[(Write to persistent storage)]
Validator -- Failure --> ErrorHandler[Error handling and alerting]
class Start,Validate,Segmenter,Engine,Validator main;
class Store default;
class ErrorHandler error;
```
Diagram 2: [L1 Sub-Flow - Core Download and Retry Engine]
```mermaid
%%{init: {"flowchart": {"defaultRenderer": "elk"}}}%%
flowchart TB
%% Core / Main flow (cool blue background + deep blue text)
classDef main fill:#eff6ff,stroke:#3b82f6,color:#1e3a8a,stroke-width:2px
%% Decision / Configuration nodes (soft orange background + brown-orange text)
classDef check fill:#fff7ed,stroke:#f97316,color:#9a3412,stroke-width:2px
%% Success / End nodes (eye-friendly green background + deep green text)
classDef success fill:#f0fdf4,stroke:#22c55e,color:#14532d,stroke-width:2px
%% Error / Exception nodes (alert red background + deep red text)
classDef error fill:#fef2f2,stroke:#ef4444,color:#7f1d1d,stroke-width:2px
%% General / External systems (muted gray background + charcoal text)
classDef default fill:#f8fafc,stroke:#94a3b8,color:#334155,stroke-width:2px
StartPart([Receive segment task]) --> ForEach{Are there unfinished segments?}
ForEach -- No --> Done([All segments completed])
ForEach -- Yes --> Fetch[(Request segment URL)]
Fetch --> Download(Initiate HTTP download)
Download --> CheckHTTP{Is HTTP status 2xx?}
CheckHTTP -- No --> RetryBranch[Enter retry logic]
CheckHTTP -- Yes --> WriteTemp[(Write to segment temporary file)]
WriteTemp --> Checksum(Calculate checksum)
Checksum --> Compare{Does checksum pass?}
Compare -- Yes --> Merge([Merge segments and mark complete])
Compare -- No --> RetryBranch
%% Retry logic details
RetryBranch --> RetryCount{Retry count < limit?}
RetryCount -- No --> MarkFail([Mark segment failed and report])
RetryCount -- Yes --> Backoff[Calculate backoff wait]
Backoff --> Wait[(Wait: backoff duration)]
Wait --> Download
class StartPart,Fetch,Download,WriteTemp,Checksum,Merge main;
class ForEach,CheckHTTP,Compare,RetryCount check;
class Done,MarkFail success;
class RetryBranch error;
class Wait,Backoff default;
```
请描述你的系统或流程的关键参与者与目标输出是什么?需要生成哪种图表类型(业务流程、时序图、架构/数据流)?是否存在需要保留的细节(重试规则、错误分支、外部依赖等)?