Files
Ran Shemtov f6fab281ae feat: langgraph cloud (#918)
* feat(runtime): rename remoteActions argument to remoteEndpoints

* feat(remote-actions): integrate langgraph-cloud as a remote action for CoAgents

* feat(runtime): rename remoteActions argument to remoteEndpoints

* feat(remote-actions): integrate langgraph-cloud as a remote action for CoAgents

* feat(sdk-js): add SDK for LangGraph JS support

---------

Co-authored-by: Markus Ecker <markus.ecker@gmail.com>
Co-authored-by: Ariel Weinberger <weinberger.ariel@gmail.com>
2024-11-27 13:31:58 +01:00

1.3 KiB

CoAgents Agent Q&A Example

This example demonstrates sending a question to the user that gets rendered in an alert.

You can find an online demo of this example here.

These instructions assume you are in the coagents-qa-native/ directory

Running the Agent

First, install the dependencies:

cd agent
poetry install

Then, create a .env file inside ./agent with the following:

OPENAI_API_KEY=...

IMPORTANT: Make sure the OpenAI API Key you provide, supports gpt-4o.

Then, run the demo:

poetry run demo

Running the UI

First, install the dependencies:

cd ./ui
pnpm i

Then, create a .env file inside ./ui with the following:

OPENAI_API_KEY=...

Then, run the Next.js project:

pnpm run dev

Usage

Navigate to http://localhost:3000.

LangGraph Studio

Run LangGraph studio, then load the ./agent folder into it.

Make sure to create teh .env mentioned above first!

Troubleshooting

A few things to try if you are running into trouble:

  1. Make sure there is no other local application server running on the 8000 port.
  2. Under /agent/email_agent/demo.py, change 0.0.0.0 to 127.0.0.1 or to localhost