Work from your AI app

Ask your AI app to draft and change your diagrams, follow its work in Penna, and see what it's told.

Once your AI app is connected, ask it in your own words to work on your diagrams. You watch the changes land in Penna, and every change is saved to the diagram's history.

Ask for a diagram or a change

Ask for things like:

  • "Draft an employee onboarding process in Penna."
  • "Add a credit check before approval in the loan diagram."

When you say "this diagram", the AI takes it to mean the one open in the app. See What to ask for requests that work well.

What the AI can do

  • List your diagrams, and see which one is open in the app.
  • Open a diagram in the app, so you can watch while it works.
  • Create a diagram of any kind: a BPMN process, a sequence diagram, an ER diagram or a flowchart. It opens the new diagram in the app.
  • Copy a diagram or start from a template. Name a diagram you can open, paste its link, or name one of the app's templates, and the AI makes a copy of your own to change.
  • Read and edit a diagram. It can rewrite the whole diagram in its code: Flowmark for a process, sequence code, schema code or Mermaid. Or it can make small edits that keep everything else as it was.
  • Show a diagram in the chat as a card you can change and export from, with the elements its answer is about lit. See The diagram in the chat.
  • Change the layout as the canvas menu does: tidy up, put back one thing you moved, set the spacing and the detail level.
  • Give the diagram in another format: the same SQL, Mermaid, PlantUML or BPMN XML that Export downloads, or the JOIN between two tables.
  • Link an element to another diagram by its name, such as a step to the sequence diagram that shows how it's done. See Links between diagrams.
  • Read the history: list the versions, say what changed since one, and give an ER diagram's migration SQL.
  • Read and answer comments: reply in a thread, and resolve it once you agree. See Comments.
  • Look up guidance for each kind: the syntax, the modeling or drawing style, common patterns, and reference diagrams for many business domains. See Guidance topics.
  • Read and save your team's context: the business context, learnings and Model, and the names in your diagrams the Model doesn't have yet.

It's told to follow every learning in each diagram it writes, including the team's Style. It saves a learning, a Model name or the business context only when you ask or agree.

Your AI app also offers two prompts:

  • Bring my context to Penna gathers what the chat knows about your business, shows it to you, and saves it once you agree. See Bring your context.
  • Build my Model in Penna drafts your team's Model from your diagrams, context and learnings. It asks only about what it's unsure of, and saves once you agree.

Follow its work

Any tab of Penna you have open updates live as the AI works. The status bar names the app while it does, such as "Claude is editing the diagram" or "ChatGPT is editing the diagram". An app Penna doesn't know by name shows as "Your AI app".

The assistant panel lists each change under the app's name, one line each. Every change is saved to the diagram's version history with the app's name beside it, and Undo in the app takes it back.

When the AI creates, opens, reads or changes a diagram, its result ends with a link to that diagram in Penna. You can open it from the chat in one click. In chats that show it, a diagram card appears too.

Which diagram it changes

Every tool that reads or changes a diagram names it by its id (diagram_id). Paste a diagram's link from the app's address bar and the AI uses it as that id. Switching to another diagram in the app while the AI works never redirects its changes. They still go to the diagram it was working on.

If you and the AI change the same diagram at the same moment, its change is refused. It's told to read the diagram again and retry.

The AI can't change a teammate's diagram that's shared with you to view only. It's told to suggest asking the owner for edit access, or making a copy of your own, which it can make for you.

How it checks its work

After each change the AI gets the same modeling checks you see in the app. It's told to fix the errors before it finishes.

When a fix depends on what you meant, such as a step connected to nothing, it's told to ask you first.

What the AI is told

When your AI app connects, it gets a short set of instructions, a list of tools and guidance it can look up. The instructions say which kind of diagram fits a request, and the order the tools go in.

Some apps shorten or ignore a server's instructions. So each tool also says what it's for and the rule it must follow. create_diagram says which kind fits, and lookup_guidance which guide to read first.

The rest comes back when the AI uses a tool. Creating or reading a diagram returns a summary of that kind's rules, its syntax and the edits it can make. The full syntax is one lookup away.

Keeping all that out of the tool list keeps the list small. Adding a kind or a tool costs your AI app little.

read_context asks to be called before the first change, for your team's business context, learnings and Style. Listing, creating or reading a diagram reminds the AI when your team has saved some.

On this page