cloud
Skill8 starsChanged 5 months agoMITView on GitHub
Sets up assistant-ui Cloud persistence and authorization with the assistant-cloud package and AssistantCloud client. Use when adding cross-session thread/message persistence, multi-device chat history, file uploads, or auth to an assistant-ui app: passing the cloud option to useChatRuntime (with AssistantChatTransport from @assistant-ui/react-ai-sdk), configuring AssistantCloud with authToken (JWT), apiKey plus userId/workspaceId (server-side), or anonymous mode, and wiring auth providers like NextAuth, Clerk, or Firebase. Covers cloud.threads.list/get/create/update/delete, cloud.threads.messages(threadId), cloud.files.generatePresignedUploadUrl, the aui/v0 message format, custom adapters (CloudMessagePersistence, createFormattedPersistence, ThreadHistoryAdapter, RemoteThreadListAdapter), auto title generation, external_id/metadata mapping, and env vars NEXT_PUBLIC_ASSISTANT_BASE_URL and ASSISTANT_API_KEY. For the thread-list sidebar UI itself use thread-list.
- Reads credentials
- Installs packages
- Sends data out
12 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- opensearch-project/opensearch-agent-skillstheir own version, first seen Nov 29, 2026
- fennih/hunterkittheir own version, first seen Nov 29, 2026
- browser-use/browser-usetheir own version, first seen Nov 9, 2026
- stunt-double/stuntdouble-mcptheir own version, first seen Nov 8, 2026
- guaracloud/agent-skillstheir own version, first seen Oct 25, 2026
- phnx-labs/.agentstheir own version, first seen Oct 11, 2026
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- utopusc/livinity-io★ 7281% same
Wrote their own version · 11
- browser-use/browser-use★ 122ksame name
- opensearch-project/opensearch-agent-skills★ 64same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
- guaracloud/agent-skills★ 2same name
- hunkdl/yeti-agent★ 1same name
- phnx-labs/.agents★ 1same name
- stunt-double/stuntdouble-mcp★ 1same name
- zyphr-labs/bounty-harness★ 1same name
- fennih/hunterkit★ 0same name
- hallucinaut/skills★ 0same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository16 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- public/llms-full.txtllms.txt
- public/llms.txtllms.txt
- assistant-uiSkill
- copilotsSkill
- markdownSkill
- observabilitySkill
- primitivesSkill
- react-mcpSkill
- runtimeSkill
- setupSkill
- speckit-agent-context-updateSkill
- streamingSkill
- thread-listSkill
- toolsSkill
- updateSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 111
Verify authToken returns valid token
- Very specific: line 112
Check baseUrl is correct
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
assistant-ui Cloud
Always consult assistant-ui.com/llms.txt for the latest API.
Cloud persistence for threads, messages, and files.
References
- ./references/persistence.md -- Thread and message persistence
- ./references/authorization.md -- Authentication patterns
- ./references/custom-persistence.md -- Self-hosted message persistence
- ./references/auth-integrations.md -- better-auth and Clerk integrations
Installation
npm install assistant-cloudQuick Start
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>
);
}Authentication Options
// 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,
});Cloud API
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);
const messages = await cloud.threads.messages(threadId).list();
const { signedUrl, publicUrl } = await cloud.files.generatePresignedUploadUrl({
filename: "document.pdf",
});
await fetch(signedUrl, { method: "PUT", body: file });Environment Variables
NEXT_PUBLIC_ASSISTANT_BASE_URL=https://api.assistant-ui.com
ASSISTANT_API_KEY=your-api-key # Server-side onlyCommon Gotchas
Threads not persisting
- Pass
cloudto runtime - Check authentication
Auth errors
- Verify
authTokenreturns valid token - Check
baseUrlis correct
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

