agentleFS
AnthropicKnown publisheranthropics/claude-quickstarts/managed-agents/assistant-ui/CLAUDE.md

claude-quickstarts / assistant-ui

CLAUDE.md18k starsChanged 2 months agoMITView on GitHub

A Next.js chat app. assistant-ui renders everything; one Managed Agents session per conversation runs the analyst, and lib/managed-agents/reducer.ts folds each session's event log into the messages assistant-ui renders. The sidebar is the session list. There is no database. Needs Node 22+, @anthropic-ai/sdk 0.109.0 or later (event_deltas + session event helpers), and @assistant-ui/react 0.14.27 or later (the defineToolkit/Tools API and approvals on useExternalStoreRuntime). Pull exact shapes from the /claude-api skill's shared/managed-agents-*.md docs.

  • Reads credentials

Trending

More talk lately.about the whole repository

Dec 2025: 3 mentionsJan 2026: 4 mentionsFeb 2026: 2 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 1 mentionSep 2026: 7 mentionsOct 2026: 3 mentionsNov 2026: 2 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the anthropics/claude-quickstarts repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about anthropics/claude-quickstarts

The biggest 5 of 23 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 23

Talked about on GitHub and Bluesky (23 times).

On GitHub · 22

17 more on GitHub

The file

We split this CLAUDE.md into the rules it gives an agent

6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    After the base app works, offer extensions: Ask which (if any) they want, then edit agents/spreadsheet-analyst.md and run a bare ant apply …

    line 9
  2. Very specific:

    Multiagent red-team pass: add a multiagent: { type: "coordinator", agents: [...] } roster so the analyst hands its numbers to a toolless …

    line 10
  3. Very specific:

    MCP connector: add an mcp_servers entry plus an mcp_toolset.

    line 12
  4. Distinctive:

    Never use the "CMA" acronym.

    line 28
  5. Very specific:

    Every route under app/api/sessions/[id]/ must pass the id through ownedSession() (lib/owned-session.ts) before touching the API.

    line 29
  6. Very specific:

    Keep lib/managed-agents/reducer.ts pure: no fetch, no React, no clocks.

    line 30

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

assistant-ui × Claude Managed Agents

A Next.js chat app. assistant-ui renders everything; one Managed Agents session per conversation runs the analyst, and lib/managed-agents/reducer.ts folds each session's event log into the messages assistant-ui renders. The sidebar is the session list. There is no database. Needs Node 22+, @anthropic-ai/sdk 0.109.0 or later (event_deltas + session event helpers), and @assistant-ui/react 0.14.27 or later (the defineToolkit/Tools API and approvals on useExternalStoreRuntime).

When the user asks to set this up, get it working, or debug it

  1. Invoke /claude-api first. It is the source of truth for every SDK call in app/api/ and every field in agents/ and environments/ (agents, environments, sessions, events, files, resources). Don't guess field names; the beta surface moves.
  2. Read ./skill.md and walk the user through its Setup checklist step by step, then use its Gotchas and debugging table when something is off. It's written for exactly this.
  3. After the base app works, offer extensions. Ask which (if any) they want, then edit agents/spreadsheet-analyst.md and run a bare ant apply --yes, which publishes the edit as a new version the next session picks up:

    • Multiagent red-team pass: add a multiagent: { type: "coordinator", agents: [...] } roster so the analyst hands its numbers to a toolless reviewer. The handoff events (session.thread_created, agent.thread_message_sent/received) already arrive on the stream; the reducer currently ignores them, so this needs a rendering branch too.
    • Memory store: attach resources: [{ type: "memory_store", ... }] at session create so the analyst remembers per-dataset conventions across chats.
    • MCP connector: add an mcp_servers entry plus an mcp_toolset. MCP tools default to always_ask, so they light up the same approval gate for free.
    • ask_user human tool: a custom tool whose card renders buttons and answers user.custom_tool_result from the click (assistant-ui addResult), instead of auto-answering like show_chart.

    Pull exact shapes from the /claude-api skill's shared/managed-agents-*.md docs.

Commands

  • npm run dev — the app on http://localhost:3000 (binds localhost only)
  • ant apply --yes agents environments — one-time provisioning of the agent + environment into claude-lock.json (ant 1.30 or later; --yes because you have no terminal for its prompt; it needs ant auth login or an exported ANTHROPIC_API_KEY and does not read .env)
  • npm run typecheck — tsc --noEmit
  • npm run lint — eslint (the copy-in components/ are ignored on purpose)
  • npm test — the reducer's golden-turn test; run it whenever the event mapping changes

Conventions

  • Name the Anthropic SDK client client (const client = new Anthropic()), in code and in docs.
  • Never use the "CMA" acronym. Write "Managed Agents" or "Claude Managed Agents", and spell it out in identifiers and file names.
  • Every route under app/api/sessions/[id]/ must pass the id through ownedSession() (lib/owned-session.ts) before touching the API. File downloads additionally check the file belongs to that session. Don't add a session-less file route.
  • Keep lib/managed-agents/reducer.ts pure: no fetch, no React, no clocks. That's what keeps it testable and keeps replay identical to live.
  • components/assistant-ui/, components/ui/, hooks/, and lib/utils.ts are assistant-ui copy-in components (npx assistant-ui add ...). Regenerate them rather than hand-editing; put quickstart UI in components/tool-uis/ and app/.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.