Skip to content
LangChain
0:08:05
1 050
27
4
Last update : 22/12/2024

🚀 Launch Your Own AI-Powered Canvas: A Local Open Canvas Setup

Table of Contents

Ever dreamed of having your own AI-powered creative space? Open Canvas lets you interact with an AI through chat, generating and modifying text and code directly on a canvas. This guide simplifies the local setup process, turning you into an AI canvas maestro! 🎨

🗝️ Key Ingredients: Gathering Your Supplies

Before diving in, let’s gather the essential ingredients for our AI recipe. Think of it like prepping for a coding culinary adventure! 🧑‍🍳

  • Yarn: The package manager that ties everything together. Make sure it’s installed on your system.
  • API Keys: You’ll need keys for OpenAI and Anthropic (and optionally Google Vertex AI and Fireworks) to unlock the power of these LLMs.
  • Supabase Account: This free service handles user authentication, acting as the gatekeeper to your canvas.
  • LangGraph CLI: This command-line tool orchestrates the LangGraph server, the brains behind the operation.
  • LangSmith Account: Provides the API key needed for LangGraph CLI, connecting you to the LangChain ecosystem.

🏗️ Building the Foundation: Setting Up Authentication

Supabase is our authentication fortress. Setting it up is straightforward:

  1. Create a new Supabase project (e.g., “Open Canvas”).
  2. Navigate to Project Settings -> API and copy your Project URL and Anonymous API Key. These are your secret codes! 🤫
  3. In your .env file (copied from .env.example), paste these keys into the corresponding fields.
  4. Enable email authentication in the Supabase Authentication settings. You can optionally add GitHub and Google logins too.

🧠 Wiring the Brain: Running the LangGraph Server

The LangGraph server is the heart of Open Canvas. Here’s how to bring it to life:

  1. Install the LangGraph CLI using the command from the LangGraph documentation.
  2. Run langraph up --watch -d -p 54367 (including your LangSmith API key if not already set in your environment). This command summons the server, ready to process your AI requests. 🪄

🎨 Painting the Interface: Starting the Web Server

With the backend ready, let’s launch the visual interface:

  1. Run yarn dev in your terminal. This command paints the canvas onto your screen, ready for your creative input. 🖌️
  2. Open your browser and navigate to the local URL (usually http://localhost:3000).

✨ Unleashing Your Creativity: Interacting with Open Canvas

Now the fun begins! Type your requests into the chat window and watch the AI generate text or code on the canvas. Try something like “Write me a to-do app in React” and witness the magic! ✨

🧰 Resource Toolbox

Here are the essential tools for your Open Canvas journey:

  • Open Canvas GitHub Repository: Your central hub for all things Open Canvas.
  • LangSmith: Sign up for a free account to get your LangSmith API key.
  • LangGraph CLI: Download and install the command-line interface.
  • Supabase: Create a free account to manage user authentication.
  • OpenAI: Get your OpenAI API key to access their powerful language models.
  • Anthropic: Obtain your Anthropic API key for another LLM option.
  • Google Vertex AI: (Optional) Get your Google Vertex AI API key for additional model access.
  • Fireworks: (Optional) Obtain your Fireworks API key for another LLM option.
  • Yarn: Download and install the Yarn package manager.

By following these steps, you’ll have your own local instance of Open Canvas, ready to bring your AI-powered ideas to life. Experiment, explore, and create! 🎉

Other videos of

Play Video
LangChain
0:18:36
1 897
76
2
Last update : 21/12/2024
Play Video
LangChain
0:33:13
1 179
48
1
Last update : 22/12/2024
Play Video
LangChain
0:09:40
186
11
1
Last update : 13/11/2024
Play Video
LangChain
0:04:14
2 823
119
8
Last update : 16/11/2024
Play Video
LangChain
0:05:38
2 268
48
2
Last update : 07/11/2024
Play Video
LangChain
0:05:19
856
14
0
Last update : 07/11/2024
Play Video
LangChain
0:06:15
3 498
62
7
Last update : 30/10/2024
Play Video
LangChain
0:08:58
256
26
2
Last update : 30/10/2024
Play Video
LangChain
0:19:22
2 137
102
11
Last update : 16/10/2024