Chat History
Chat History for AI SDK
Overview
With the help of assistant-cloud, you can add thread management and thread history capabilities to assistant-ui. This guide will walk you through the process of integrating assistant-cloud with the AI SDK by Vercel.
Prerequisites
You need an assistant-cloud account to follow this guide. You can sign up here: https://cloud.assistant-ui.com/
Setting up assistant-cloud project in your react project:
- Create a new project on the assistant-cloud dashboard and copy the Frontend API URL (
https://proj-[ID].assistant-api.com
) from the settings page. - Add the url as an environment variable
NEXT_PUBLIC_ASSISTANT_BASE_URL
- Create a client side AssistantCloud instance. Note: this will create an anonymous user id that is tied to the user's browser session. For connecting to an auth provider to persist threads for a user based on a workspace and/or user id, look at Cloud Authorization Docs.