Skip to content

Commit 7ee9f56

Browse files
committedOct 10, 2024
feat: Add readme and nits for production
1 parent daa342f commit 7ee9f56

File tree

4 files changed

+72
-5
lines changed

4 files changed

+72
-5
lines changed
 

‎.env.example

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ LANGCHAIN_TRACING_V2=true
33
LANGCHAIN_API_KEY=
44

55
# LLM API keys
6+
# Anthropic used for reflection
67
ANTHROPIC_API_KEY=
8+
# OpenAI used for content generation
9+
OPENAI_API_KEY=
710

811
# Vercel KV stores. Used for system prompt storage.
912
KV_REST_API_URL=
1013
KV_REST_API_TOKEN=
1114

12-
# LangGraph Deployment
15+
# LangGraph Deployment, or local development server via LangGraph Studio.
1316
LANGGRAPH_API_URL=
14-
NEXT_PUBLIC_LANGGRAPH_GRAPH_ID="agent"

‎README.md

+64-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,64 @@
1-
# Open Canvas
1+
# Open Canvas
2+
3+
![Diagram of the Open Canvas graph](./public//lg_studio_graph_diagram.png)
4+
5+
Open Canvas is an open source web application with built in memory powered by dual agents. It is inspired by [OpenAI's "Canvas"](https://openai.com/index/introducing-canvas/), but with a few key differences.
6+
7+
1. Open Canvas is open source and free to use. All the code, from the frontend, to the content generation agent, to the reflection agent is open source and MIT licensed.
8+
2. Built in memory. Open Canvas ships out of the box with a [reflection agent](https://langchain-ai.github.io/langgraphjs/tutorials/reflection/reflection/) which stores style rules and user insights in a [shared memory store](https://langchain-ai.github.io/langgraphjs/concepts/memory/). This allows Open Canvas to remember facts about you across sessions.
9+
3. Start from existing documents. Open Canvas allows users to start with a blank text, or code editor in the language of their choice, allowing you to start the session with your existing content, instead of being forced to start with a chat interaction. We believe this is an ideal UX because many times you will already have some content to start with, and want to iterate on-top of it.
10+
11+
## How to use
12+
13+
You can use our deployed version for free by visiting [open-canvas-lc.vercel.app](https://open-canvas-lc.vercel.app/)
14+
15+
or
16+
17+
You can clone this repository and run locally/deploy to your own cloud. See the next section for steps on how to do this.
18+
19+
## Development
20+
21+
Running or developing Open Canvas is easy. Start by cloning this repository and navigating into the directory.
22+
23+
```bash
24+
git clone https://github.com/langchain-ai/open-canvas.git
25+
26+
cd open-canvas
27+
```
28+
29+
Next, install the dependencies via Yarn:
30+
31+
```bash
32+
yarn install
33+
```
34+
35+
Then [install LangGraph Studio](https://studio.langchain.com/) which is required to run the graphs locally, or [create a LangSmith account](https://smith.langchain.com/) to deploy to production on LangGraph Cloud.
36+
37+
After that, copy the `.env.example` file contents into `.env` and set the required values:
38+
39+
```bash
40+
# LangSmith tracing (optional, but recomended.)
41+
LANGCHAIN_TRACING_V2=true
42+
LANGCHAIN_API_KEY=
43+
44+
# LLM API keys
45+
# Anthropic used for reflection
46+
ANTHROPIC_API_KEY=
47+
# OpenAI used for content generation
48+
OPENAI_API_KEY=
49+
50+
# Vercel KV stores. Used for system prompt storage.
51+
KV_REST_API_URL=
52+
KV_REST_API_TOKEN=
53+
54+
# LangGraph Deployment, or local development server via LangGraph Studio.
55+
LANGGRAPH_API_URL=
56+
```
57+
58+
Finally, start the development server:
59+
60+
```bash
61+
yarn dev
62+
```
63+
64+
Then, open [localhost:3000](http://localhost:3000) with your browser and start interacting!

‎package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
2-
"name": "streaming_chat_frontend",
3-
"version": "0.1.0",
2+
"name": "open_canvas",
3+
"author": "Brace Sproul",
4+
"homepage": "https://open-canvas-lc.vercel.app",
5+
"repository": "https://github.com/langchain-ai/open-canvas",
46
"private": true,
57
"scripts": {
68
"dev": "next dev",

‎public/lg_studio_graph_diagram.png

183 KB
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.