Draft
Conversation
Implements a new TypeAgent agent (excalidraw-agent) that uses an LLM to convert source materials (markdown, plain text, Visio XML, Mermaid, and architecture descriptions) into valid Excalidraw JSON diagrams. Includes createDiagram and exportDiagram actions, with output defaulting to the user's Documents folder. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Excalidraw Agent for AI-Powered Diagram Generation
Summary
Adds a new excalidraw TypeAgent that converts documentation, markdown, Visio XML exports, Mermaid
diagrams, and plain-text architecture descriptions into https://excalidraw.com/ diagram files using
AI. The agent integrates with the existing TypeAgent dispatcher and agent provider infrastructure.
What's Changed
New package: ts/packages/agents/excalidraw/
architecture), optional diagramTitle, and optional outputPath
instructs the LLM to output valid Excalidraw JSON (type, version, elements[], appState). Writes the
resulting .excalidraw file to the user-specified path, or defaults to ~/Documents/ with a timestamped
filename.
Agent registration: ts/packages/defaultAgentProvider/
Usage Examples
▎ "Create an Excalidraw diagram from this architecture document"
▎ "Convert this Mermaid diagram to an Excalidraw file and save it to C:\diagrams\arch.excalidraw"
▎ "Turn this Visio XML into an Excalidraw diagram"
Testing
Notes
(cross-platform: works on Windows and Unix)
arrows, colors, layout) to maximize diagram quality