Skip to content

Commit

Permalink
feat: Add readme and nits for production
Browse files Browse the repository at this point in the history
  • Loading branch information
bracesproul committed Oct 10, 2024
1 parent daa342f commit 7ee9f56
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ LANGCHAIN_TRACING_V2=true
LANGCHAIN_API_KEY=

# LLM API keys
# Anthropic used for reflection
ANTHROPIC_API_KEY=
# OpenAI used for content generation
OPENAI_API_KEY=

# Vercel KV stores. Used for system prompt storage.
KV_REST_API_URL=
KV_REST_API_TOKEN=

# LangGraph Deployment
# LangGraph Deployment, or local development server via LangGraph Studio.
LANGGRAPH_API_URL=
NEXT_PUBLIC_LANGGRAPH_GRAPH_ID="agent"
65 changes: 64 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,64 @@
# Open Canvas
# Open Canvas

![Diagram of the Open Canvas graph](./public//lg_studio_graph_diagram.png)

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.

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.
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.
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.

## How to use

You can use our deployed version for free by visiting [open-canvas-lc.vercel.app](https://open-canvas-lc.vercel.app/)

or

You can clone this repository and run locally/deploy to your own cloud. See the next section for steps on how to do this.

## Development

Running or developing Open Canvas is easy. Start by cloning this repository and navigating into the directory.

```bash
git clone https://github.com/langchain-ai/open-canvas.git

cd open-canvas
```

Next, install the dependencies via Yarn:

```bash
yarn install
```

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.

After that, copy the `.env.example` file contents into `.env` and set the required values:

```bash
# LangSmith tracing (optional, but recomended.)
LANGCHAIN_TRACING_V2=true
LANGCHAIN_API_KEY=

# LLM API keys
# Anthropic used for reflection
ANTHROPIC_API_KEY=
# OpenAI used for content generation
OPENAI_API_KEY=

# Vercel KV stores. Used for system prompt storage.
KV_REST_API_URL=
KV_REST_API_TOKEN=

# LangGraph Deployment, or local development server via LangGraph Studio.
LANGGRAPH_API_URL=
```

Finally, start the development server:

```bash
yarn dev
```

Then, open [localhost:3000](http://localhost:3000) with your browser and start interacting!
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "streaming_chat_frontend",
"version": "0.1.0",
"name": "open_canvas",
"author": "Brace Sproul",
"homepage": "https://open-canvas-lc.vercel.app",
"repository": "https://github.com/langchain-ai/open-canvas",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
Binary file added public/lg_studio_graph_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7ee9f56

Please sign in to comment.