A demonstration project that combines LangServe, LangGraph, and FastAPI to create an AI agent with a modern UI. The project uses assistant-ui and Next.js Vercel AI SDK for a seamless chat interface.
This project showcases:
langserve-assistant-ui/
├── backend/ # FastAPI + LangServe server
└── frontend/ # Next.js + assistant-ui client
Go to ./backend and create .env file. Follow the example in .env.example.
The backend is built using the LangChain CLI and utilizes LangGraph's create_react_agent for agent creation.
cd backend
poetry install
poetry run python -m app.serverThe frontend is generated using the assistant-ui CLI tool and implements Vercel AI SDK's useChat hook with assistant-ui's Thread component.
cd frontend
yarn install
yarn devYou can query tools directly using simple prompts:
Example: "What is the stock price of Apple?"

The agent can process more complex queries requiring multiple steps:
Example: "What is the weather in San Francisco?"

Feel free to open issues or submit pull requests if you have suggestions for improvements.