Software factory / Architecture
Ask an agent about the architecture
The Architecture tab gives you a map of a repository. Then you have a question that the map does not answer, for example: which package do you change to add an API route?
5 min read
The architecture chat is an agent in a panel next to the Architecture tab. You ask a question in plain words. The agent answers from the architecture view and the code of the repository, and it can draw a diagram for you.
You need to be signed in, with read access to the code of the repository.
1. Open the chat
- Open the Architecture tab of the repository. See Read the architecture of a repository.
- Click Ask about the architecture, in the header. If you are not signed in, the button opens the sign-in page, and then brings you back to the tab. Click it again.
The panel opens on the right of the page. On a small screen, it covers the page. To close it, click the close button or press Escape.
The button is on every tab: Overview, Diagrams and Packages. The panel stays open when you change the tab. If the button is not there, an admin turned off the architecture chat for the repository or its organization.
2. Ask a question
Type your question in the box at the bottom of the panel, and press Enter. Shift+Enter makes a new line.
In a new chat, you can also click an example question. The examples change with the tab that you are on. For example, Overview has Where do I start reading?
Each question also tells the agent which tab you are on.
3. Read the answer and the diagram
Above the answer, small lines show what the agent read, for example "Read the architecture view" or "Read src/server.ts". Use them to open the same files yourself.
When a picture helps, the agent draws a diagram in the answer: a title, a few bullets, and a graph of boxes and arrows. Move the pointer over a box, and the parts that do not connect to it fade.
4. Start a new chat
The forge saves your chat for you. Close the panel or reload the page, and your chat is still there when you open the panel again. The chat is your own. The other people of the repository do not see it.
To start again, click New chat. The saved messages go.
Done
You ask about the parts of a repository in plain words. The agent answers from the view and the code, and it draws a diagram when a picture helps. Your chat waits for you the next time that you open the panel.
What the agent reads
The agent reads only this repository, at the commit of the architecture view:
- the architecture view: the overview, the packages, the diagrams, and the skills of each package
- the folders and the files of the repository, up to 64 KiB of text from one file
Before the first view, it reads the files at the tip of the default branch.
What it cannot do
- It only reads. It cannot change, push or run anything.
- It answers only about this repository.
- The chat is on the Architecture tab only. The REST API, MCP and the
srcCLI do not have it. Your coding agent reads the view itself, as Read it from your agent shows.
Limits
- The PR chat and the architecture chat share one daily limit. Each person can use 1,000,000 tokens of both chats together in a UTC day, with any model. After that, the chat says "You reached the chat limit for today. The PR chat and the architecture chat share it. It starts again at 00:00 UTC."
- On a model that the forge pays for, the cost counts toward the monthly spend cap of the repository owner. The factory agents use the same cap. At the cap, the chat says that the owner used its monthly model spend. It answers again next month, or when an admin picks a model with their own key.
- In a long chat, the model gets a summary of the older messages. You still see every message.
For admins: turn it off or change the model
The architecture chat is on by default. When the forge has an AI Gateway set up, its default model is Claude Haiku 5.5 (anthropic/claude-haiku-5.5 on Workers AI). Without one, it is Workers AI with the model @cf/deepseek-ai/deepseek-v4.1-flash-1017. It has no trigger: it runs only when a person sends a question.
- Open the repository, then Agents. In the sidebar, click Agents under Software factory.
- Find Architecture chat. Its row is below the agents and the PR chat.
- To remove the chat from the Architecture tab, turn off its switch. It saves at once.
- To use another model, click Settings. Pick the Model provider, the Model and the Reasoning, as for an agent. Default uses the default of the provider.
- Click Save Architecture chat.
On an organization, the Architecture chat row is on the Software factory tab. See Factory settings.
Note
A model with your own key does not count toward the monthly spend cap of the owner. Add the key in Provider keys first: see Add a model key. The daily limit of each person holds for every model.