AI Features
Generate, refine, restyle and explain diagrams, chat with the AI Architect, and bring your own AI key.
Archgram's AI helps you draw, restyle, explain and document architecture. Every AI feature works in Mermaid, D2, Excalidraw, Draw.io and PlantUML. Features use credits from your plan, unless you use your own AI key.
AI Generate
Describe the architecture in the AI prompt bar and press Ctrl/⌘+Enter, or choose Generate with AI… in the command palette. Archgram writes a complete diagram in the format you are editing.
Effective prompts:
- Name the diagram type: "A C4 container diagram for..."
- Name the components: "...with a React SPA, Node.js API, PostgreSQL and Redis"
- Describe the relationships: "...the API reads sessions from Redis and writes orders to PostgreSQL"
- State the audience: "...suitable for business stakeholders"
Cost: 1 credit.
AI Refine
Improves the current diagram — more detail, clearer layout, missing relationships, more descriptive labels. Describe what you want ("add a cache and a queue") or leave it open.
Cost: 1 credit.
Refine Styles
Restyles the diagram — colours, shapes and emphasis — without changing its structure. Archgram's colour schemes can also recolour a diagram without using AI.
AI Explain
Writes a plain-English explanation of the current diagram: what it shows, what the main components do and which patterns are visible. Useful for onboarding and for the context section of an ADR.
Cost: 0.5 credits.
AI Architect (Chat)
The Chat panel is an architecture assistant that sees your current diagram. Ask about failure modes, scaling, trade-offs, or ask for a change and apply the diagram it proposes. Workspaces also have a shared AI chat. Available on Pro.
- "What are the failure modes of this architecture?"
- "Add a Redis cache in front of the database"
- "What would we need to change to handle 10× traffic?"
Cost: 1 credit per message.
AI Autocomplete
Turn on AI autocomplete in the code pane's settings. Archgram then suggests the next line as grey ghost text when you pause, or when you press Ctrl/⌘+→. Press Tab to accept and Esc to dismiss. Available on Pro for Mermaid, D2 and PlantUML.
Cost: 0.1 credits per suggestion.
Documentation, Slides and Repository Scan
Beyond the diagram itself, AI can generate a written document from it (Ctrl/⌘+Shift+D), a slide deck (Pro), and diagrams and ADRs from a repository (Pro). See Collaboration & Presenting and Git & Drive Sync.
Picture to Diagram
Turn a screenshot, a whiteboard photo or an exported image into an editable diagram (Pro). Open the Export menu and choose Import from picture (AI)…, or drop a picture anywhere on the editor. Choose the result as Mermaid (text you can diff and keep in Git), D2 or Excalidraw, optionally add a hint such as "left to right, ignore the legend", and review the draft before you keep it.
- PNG, JPEG, WebP and GIF pictures are accepted; large photos are shrunk in your browser before they are sent
- Pro includes 30 pictures a month, counted separately from your AI credits
- If the picture is not a diagram, nothing is created and you are told so
Plans and Credits
- Basic (free): 5 saved diagrams and 20 AI credits per month
- Plus: unlimited diagrams and 100 credits per month
- Pro: unlimited diagrams, 500 credits per month, plus the AI Architect, autocomplete, repository scan and picture to diagram
- Enterprise: unlimited credits and a workspace-level AI provider; contact sales
Credits reset monthly. See pricing for what each plan includes and Account, Plans & Support for what happens at a limit.
Bring Your Own AI
From Profile → AI you can use your own AI account for every AI feature, on every plan. Requests go to your provider and bill there, so they do not use your plan's credits, and they keep working after the monthly credits are used up.
- Paste an API key for OpenAI, Anthropic, Gemini, Groq or Mistral, or click Connect OpenRouter to authorise it in one step
- Pick a main and a fast model from the drop-down, or enter any model id with Other…
- Keys are verified when saved, stored encrypted, and never sent back to your browser; remove one at any time to return to the shared provider
- Workspace admins can set a shared key for the whole workspace, which the workspace chat and its diagrams use
About ChatGPT, Claude and Gemini subscriptions. A chat subscription (ChatGPT Plus, Claude Pro, Gemini Advanced) does not include API access, so it cannot be linked here. The closest options are OpenRouter (one sign-in, pay-as-you-go, many models) and a free Google AI Studio key for Gemini. Your key, your provider's terms and your provider's bill: Archgram only passes the request on.
Without a key of your own, AI uses Archgram's shared provider and counts against your plan.