Help us improve
Share bugs, ideas, or general feedback.
From assistant-ui
Sets up cloud persistence for chat threads, messages, and files with JWT, API key, or anonymous auth in assistant-ui React apps. Use for thread persistence, file uploads, or authentication.
npx claudepluginhub assistant-ui/skills --plugin assistant-uiHow this skill is triggered — by the user, by Claude, or both
Slash command
/assistant-ui:cloudThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Always consult [assistant-ui.com/llms.txt](https://assistant-ui.com/llms.txt) for latest API.**
Implements multi-thread chat management in assistant-ui using React components for thread lists, switching, CRUD operations, and custom UI with cloud or local support.
Implements OpenAI Assistants API v2 for stateful chatbots using threads, runs, Code Interpreter, File Search, RAG, and vector stores. Handles polling, errors like active runs, and migration to Responses API.
Uploads, downloads, and manages CloudBase storage objects from browser apps using @cloudbase/js-sdk. Covers temporary URLs, file management, and security domain setup.
Share bugs, ideas, or general feedback.
Always consult assistant-ui.com/llms.txt for latest API.
Cloud persistence for threads, messages, and files.
npm install assistant-cloud
import { AssistantCloud } from "assistant-cloud";
import { useChatRuntime, AssistantChatTransport } from "@assistant-ui/react-ai-sdk";
import { AssistantRuntimeProvider } from "@assistant-ui/react";
import { Thread } from "@/components/assistant-ui/thread";
import { ThreadList } from "@/components/assistant-ui/thread-list";
const cloud = new AssistantCloud({
baseUrl: process.env.NEXT_PUBLIC_ASSISTANT_BASE_URL,
authToken: async () => getAuthToken(),
});
function Chat() {
const runtime = useChatRuntime({
transport: new AssistantChatTransport({ api: "/api/chat" }),
cloud,
});
return (
<AssistantRuntimeProvider runtime={runtime}>
<ThreadList />
<Thread />
</AssistantRuntimeProvider>
);
}
// JWT Token (recommended)
const cloud = new AssistantCloud({
baseUrl: process.env.NEXT_PUBLIC_ASSISTANT_BASE_URL,
authToken: async () => session?.accessToken,
});
// API Key (server-side)
const cloud = new AssistantCloud({
baseUrl: process.env.ASSISTANT_BASE_URL,
apiKey: process.env.ASSISTANT_API_KEY,
userId: user.id,
workspaceId: user.workspaceId,
});
// Anonymous (public apps)
const cloud = new AssistantCloud({
baseUrl: process.env.NEXT_PUBLIC_ASSISTANT_BASE_URL,
anonymous: true,
});
// Thread operations
const threads = await cloud.threads.list();
await cloud.threads.create({ title: "New Chat" });
await cloud.threads.update(threadId, { title: "Updated" });
await cloud.threads.delete(threadId);
// Message operations
const messages = await cloud.threads.messages(threadId).list();
// File uploads
const { signedUrl, publicUrl } = await cloud.files.generatePresignedUploadUrl({
filename: "document.pdf",
});
await fetch(signedUrl, { method: "PUT", body: file });
NEXT_PUBLIC_ASSISTANT_BASE_URL=https://api.assistant-ui.com
ASSISTANT_API_KEY=your-api-key # Server-side only
Threads not persisting
cloud to runtimeAuth errors
authToken returns valid tokenbaseUrl is correct