This example contains a Travel Planner application with search capabilities using CoAgents.
These instructions assume you are in the coagents-travel/ directory
This agent is already hosted in LangGraph Platform. However, if you'd like to run it yourself first, install the dependencies:
cd agent
poetry installThen, create a .env file inside ./agent with the following:
OPENAI_API_KEY=...
GOOGLE_MAPS_API_KEY=...
IMPORTANT: Make sure the OpenAI API Key you provide, supports gpt-4o.
Then, run the demo:
poetry run demoFirst, install the dependencies:
cd ./ui
pnpm iThen, create a .env file inside ./ui with the following:
OPENAI_API_KEY=...
NEXT_PUBLIC_CPK_PUBLIC_API_KEY=...
If you need a CopilotKit API key, you can get one here
Then, run the Next.js project:
pnpm run devNavigate to http://localhost:3000.
Run LangGraph studio, then load the ./agent folder into it.
Make sure to create the .env files mentioned above first!
A few things to try if you are running into trouble:
- Make sure there is no other local application server running on the 8000 port.
- Under
/agent/travel/demo.py, change0.0.0.0to127.0.0.1or tolocalhost