This is a modified version of Excalidraw that includes a powerful AI Chatbot Assistant to help you create diagrams, flowcharts, and shapes using natural language. Simply describe what you want to create, and the AI will generate it on the canvas for you!
⭐ Built on top of the amazing Excalidraw project!
This repository is a fork of the original Excalidraw by the Excalidraw team. All the core features, whiteboard functionality, and collaboration capabilities are from the original project. I've only added the AI Chatbot Assistant feature on top of it.
All credit for the base application goes to the original Excalidraw team! 🙌
The AI Chatbot is your intelligent companion for creating diagrams and getting help with Excalidraw. It can:
- Create diagrams and flowcharts from text descriptions
- Generate shapes and elements based on your requests
- Answer questions about Excalidraw features and shortcuts
- Modify existing elements on the canvas
- Support image attachments for visual context
- Maintain chat history across sessions
There are two ways to open the AI Chatbot:
- Keyboard Shortcut: Press the
C
key (without any modifiers) - UI Button: Click the AI button in the toolbar
Once the chatbot is open, you can:
- Type your request in the input field
- Attach images by clicking the paperclip icon or dragging & dropping images
- Paste images directly into the input field using Ctrl+V / Cmd+V
- Ask questions about Excalidraw features and shortcuts
- Request diagrams like "Create a login flowchart" or "Draw a system architecture diagram"
Here are some examples of what you can ask the AI:
"Create a user authentication flowchart"
"Draw a simple process diagram with 3 steps"
"Add a rectangle with the text 'Database'"
"Create a system architecture with microservices"
"How do I export my drawing?"
"What keyboard shortcuts are available?"
C
- Open/Close AI AssistantEnter
- Send messageShift + Enter
- New line in messageEscape
- Close AI Assistant
The chatbot supports multiple AI providers and models:
- GPT-5 (Default)
- Gemini 2.5 Pro - Most capable model
- Gemini 2.5 Flash - Faster responses
- Claude Sonnet 4.5 - Latest and most capable
- Claude Opus 4 - High-quality responses
- Claude Sonnet 4 - Balanced performance
- Claude 3.7 Sonnet - Previous generation
- Grok 4 - Latest Grok model
- Grok 3 - Previous generation
To use the AI features, you need to set up API keys in your environment:
- Create a
.env.development
file in theexcalidraw-app
directory - Add your API keys:
# OpenAI
VITE_OPENAI_API_KEY=your_openai_api_key_here
# Google
VITE_GOOGLE_API_KEY=your_google_api_key_here
# Anthropic
VITE_ANTHROPIC_API_KEY=your_anthropic_api_key_here
# xAI
VITE_XAI_API_KEY=your_xai_api_key_here
You only need to add keys for the providers you want to use.
- ✅ Multi-model support - Switch between different AI models
- ✅ Image attachments - Attach up to 5 images per message
- ✅ Chat history - Automatically saved to localStorage
- ✅ Export chat - Save your conversations
- ✅ Canvas context awareness - AI understands what's on your canvas
- ✅ Smart element creation - Automatically positions and sizes elements
- ✅ Element updates - Modify existing elements on the canvas
- ✅ Flowchart generation - Create complex flowcharts with arrows and labels
- ✅ Error handling - Clear error messages and fallbacks
- Rectangles, circles, diamonds, and other shapes
- Text elements with custom styling
- Arrows with labels
- Complete flowcharts and diagrams
- System architecture diagrams
- Process flows
- Decision trees
- And much more!
-
Clone this repository
-
Install dependencies:
yarn install
-
Set up your API keys in
.env.development
(see Configuration above) -
Start the development server:
yarn start
-
Open your browser and press
C
to open the AI Assistant!
- The AI understands context from your existing canvas elements
- You can ask the AI to modify elements you've already created
- Use specific language for better results (e.g., "blue rectangle" instead of just "shape")
- The AI will automatically position new elements to avoid overlaps
- Chat history is saved automatically, but you can clear it anytime
- Switch between AI models to find the one that works best for you
- The chatbot requires an active internet connection
- API usage is subject to the provider's rate limits and quotas
- Different models may produce different results - experiment to find what works best
- The AI is designed specifically for Excalidraw and understands its element types and styling
Built with ❤️ on top of Excalidraw, React, and the latest AI models