AI architecture overview: draw a repository's architecture with AI
Have AI read a public repository on GitHub, GitLab, Bitbucket or Azure DevOps and draw what the system is made of and how its parts connect. What it reads, what it costs in AI credits, how caching by commit works, and what to do when it fails.
Most diagrams Flowgraph Studio draws from a repository come straight from its files, with no AI: Compose services, Kubernetes manifests, CI pipelines, SQL migrations, module dependencies. They show exactly what the files spell out. An AI architecture overview answers a different question: "What is this system made of, and how do its parts talk to each other?" Flowgraph reads a digest of the repository, Claude describes the parts and connections it finds, and the app draws them as a flowchart you can edit like any other diagram.
Plan: Pro and Pro Max. Each overview uses 5 AI credits, or none when one of the same commit was already made. Pro includes 100 AI credits a month and Pro Max 300 (see AI credits).
Hosts: public repositories on GitHub, GitLab, Bitbucket and Azure DevOps. Private repositories work too, after you agree for each one (see below).
What an overview shows
An overview is a flowchart of the system's parts and how they connect:
- Parts are things that run or hold data: apps and services, background jobs and scheduled tasks, databases, caches, queues, file storage, the clients people use (a browser app, a mobile app, a command-line tool), and outside services it calls, such as a payment provider or an email API. For a library or a single program, the parts are its main modules.
- Connections are interactions the files show, labelled in a few words: "HTTP", "SQL", "jobs", "webhooks", "reads".
- Groups are real boundaries the files show, such as a deployment ("Kubernetes cluster"), a tier ("Frontend", "Backend") or a package in a monorepo.
Each part shows its main technology where the files say, with an icon where there is one. An overview has at most 16 parts, 40 connections and 8 groups; 5 to 12 parts is usual. It also has a title, a one- or two-sentence summary, and a note on what the AI couldn't see.

Make an overview
- In Projects, choose Import repository, paste the repository's address and choose Scan repository. For a large repository, paste the address of one folder instead (see the guides for GitHub, GitLab, Bitbucket and Azure DevOps).
- In the scan result, find AI architecture overview. It shows the price and your balance, such as "Uses 5 credits (100 left this month), or none if one of this commit was already made."
- Choose Make overview. Flowgraph reads the code and asks the AI. This can take a minute.
- The overview joins the list of diagrams to add, ticked. Add it with the others, and open it like any other diagram.

Signed out, the row offers Sign in. On Free, it says the overviews are included in Pro and Pro Max and offers Upgrade. A folder from your computer has no AI overview; its diagrams are all drawn without AI.
Under it, AI request flow traces one request through the code as a sequence diagram instead. It costs the same and is cached the same way. See AI request flow: trace a route through the code.
What it reads
Flowgraph's server reads the repository from its host at the commit you scanned, and builds a digest for the AI, most important first:
- an outline of the folders;
- the README, and architecture notes near the top (
architecture.md,design.md,overview.md), up to 8,000 characters each; - manifests and configuration, such as
package.json,pyproject.toml,go.mod,pom.xml,.csprojfiles, Dockerfiles, Compose files, CI workflows, Terraform and Kubernetes manifests, up to 6,000 characters each; - the start of the main source files: where programs start, and files in folders such as
routes/,handlers/andcontrollers/, their first 200 lines and at most 8,000 characters each.
At most 80 files are read, and the digest is at most about 150,000 characters. The overview cites only files whose text was in it.
When the code is in TypeScript, JavaScript, Python, Java, Go or C#, your browser first reads its structure, as for the module dependencies and the route map: which files import which, and the routes with their handlers. Only those names are sent with the request, never the code. Flowgraph then reads the files that matter most, where the program starts and the files most others import, instead of choosing by name, and tells the AI the real imports and routes. It reads no more of the code than without them. For other languages, or when the code can't be read, files are chosen by name and place.
What it never reads
Before anything is sent, for public and private repositories alike:
- Files that hold credentials are left out:
.envfiles, keys and certificates, credential and secrets files,.tfvars, service account keys, encrypted files, folders such as.sshand.aws, and Kubernetes Secret manifests. - Values that look like secrets are replaced with
[removed]: cloud access keys, tokens from GitHub, GitLab, Stripe, Slack and AI providers, private keys, and written-out passwords. - Tests, examples, fixtures, mocks, scripts, migrations and generated code aren't read as source, since they describe the code rather than being it.
- Large files aren't read: source files over 200 KB, configuration over 300 KB, or a README over 500 KB.
The digest goes to Anthropic, our AI provider, which writes the overview. The repository's files aren't kept.
Cached by commit
A commit never changes, so an overview of a public repository is kept for 30 days for that commit and folder, and shared: the next person to make one of the same commit gets it at once, and it isn't charged. The row says so: "or none if one of this commit was already made". Flowgraph still asks the host about the repository each time, so one that has been deleted or made private stops being served.
Overviews of private repositories are never cached or shared with other accounts, so each one uses its credits.
How it differs from the diagrams drawn without AI
| Diagrams from the files | AI architecture overview | |
|---|---|---|
| How it's made | Read from configuration and code by rules, no AI | Claude reads a digest and describes the parts |
| What it shows | Exactly what one kind of file says: services, pipelines, tables, imports, routes | The whole system's parts and connections, across kinds of files |
| Same commit, same result | Always | Cached for 30 days; Regenerate may give a different answer |
| Plan | Every plan (adding them needs an account) | Pro and Pro Max |
| Cost | Free | 5 AI credits, or none from the cache |
| Who reads the files | Your browser draws them (private repositories through your connection) | Flowgraph's server reads them and sends a digest to the AI |
| Keep it current | Refresh redraws from the latest commit and shows what changed | Regenerate makes a new one beside it |
Use both. The overview is a quick map of an unfamiliar codebase; the diagrams from the files are the exact record of one part of it.
Check it against the code
An overview describes only what the files it read show, so it can miss a part or misread how two parts connect. Open it and choose From GitHub in the editor's top bar (or From GitLab, From Bitbucket, From Azure DevOps). The panel lists each part with what it does and the files it was read from, linked to the host at that commit, and above them the AI's note on what it couldn't see, such as folders that weren't read or a README claim the code didn't confirm.
Regenerate it
AI overviews aren't refreshed like the other diagrams. Instead, Regenerate in the From GitHub panel reads the branch's latest commit and makes a new overview as a new diagram beside the earlier one, named with its commit. It always asks the AI again, so it uses 5 AI credits even when an overview of that commit is in the cache. It needs room for one more diagram in your plan.
Limits, and when it fails
If an overview fails on our side, its credits are given back. The message says what to do:
- "…didn't send the repository's files just now, so no overview was made and nothing was counted." The host failed to send many of the files. Try again in a minute.
- "…is limiting how often Flowgraph can read repositories right now." Try again in a few minutes.
- "The overview was too large to finish." Scan one folder of the repository instead.
- "The AI couldn't find enough parts and connections to draw." An overview needs at least two parts and one connection. Scan the folder that holds the application.
- "Flowgraph couldn't find code or configuration to read in this repository." There is nothing it can describe.
- "Too many requests. Wait a minute and try again." Too many AI requests from your account in a short time.
- Not enough credits. The row says how many you have left, and Buy credits appears under the button. An overview already in the cache is still free, and one that costs more than you have is refused before anything is sent to the AI.
Choose Try again in the row after a failure.
Private repositories
With Pro and Pro Max, connect the host first (see Private repositories), then scan the repository and choose Make overview as above.
The first time, for each repository, Flowgraph asks before any of its code is read for AI. It says that excerpts of code will be sent to Anthropic, that they aren't used to train models, and that Anthropic may keep them for up to 30 days for safety monitoring. Choose Agree and make overview, or Not now. Your answer is remembered for that repository; to withdraw it, find the repository under AI overviews allowed in Account and choose Withdraw.
A private overview is read with your own connection, made for you alone, and never cached. Before it is added, you choose the names people will see, including the Description, written by the AI.
For how credits work and how to buy more, see AI credits.
More guides
- Edit Mermaid diagrams visually in VS CodeDrag, connect and restyle a Mermaid diagram on Flowgraph's canvas inside VS Code, and every change is written back into the .mmd file or Markdown block as ordinary code.
- Keep a diagram's style in its code with %% flowgraph-themeOne comment line keeps a Mermaid diagram's Flowgraph theme in the file, so it looks the same in your repository, in VS Code, from the CLI and through the render API.
- Preview Flowgraph diagrams in VS Code, with icons, layout and your themeInstall the Flowgraph Studio extension to preview Mermaid files and Markdown blocks in VS Code as Flowgraph draws them, see mistakes in plain words, and export SVG or PNG.