agentleFS
AnthropicKnown publisheranthropics/claude-quickstarts/managed-agents/roadtrip-planner/CLAUDE.md

claude-quickstarts / roadtrip-planner

CLAUDE.md18k starsChanged 2 months agoMITView on GitHub

A Next.js chat built directly on a Managed Agent session: no chat framework, the event log is the app state. Teaches session event streaming (event_deltas), vault credential injection_location, per-session agent_with_overrides, and multiagent coordinator rosters. The planner calls the National Park Service and Windy APIs with keys it never holds, then hands its draft to a second agent for a quick critique. That second agent is an Opus reviewer running as a session thread. 1. Invoke /claude-api first. It loads the…

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use it as the source of truth for any SDK call you write or edit here.

    line 15
  2. Distinctive:

    Don't guess field names.

    line 16
  3. Very specific:

    Every route that takes the session cookie goes through ownedSession() before any other API call, and refuses when it returns null.

    line 53
  4. Distinctive:

    No database. If a change needs one, it does not belong in this quickstart.

    line 81

≈ “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

Road trip planner (Claude Managed Agents + Next.js)

A Next.js chat built directly on a Managed Agent session: no chat framework, the event log is the app state. Teaches session event streaming (event_deltas), vault credential injection_location, per-session agent_with_overrides, and multiagent coordinator rosters. The planner calls the National Park Service and Windy APIs with keys it never holds, then hands its draft to a second agent for a quick critique. That second agent is an Opus reviewer running as a session thread.

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

  1. Invoke /claude-api first. It loads the Managed Agents API reference (agents, environments, sessions, events, vaults, credentials, webhooks). Use it as the source of truth for any SDK call you write or edit here. Don't guess field names.
  2. Read ./skill.md and walk the user through it in order. It has the key signups, the provisioning step, a pointer to the four README steps, and the debugging table.
  3. The files worth reading before changing anything are src/lib/use-managed-agent-session.ts (the client runtime: one EventSource, the SDK accumulator, the re-sync-on-connect habit), agents/setup.sh (where each credential's injection_location is set), and agents/roadtrip-planner.md (the planner prompt and the multiagent roster, which names agents/plan-reviewer.md by path). src/lib/transcript.ts is the one fold both first paint and live streaming render through. src/lib/client.ts holds ownedSession(), the check every route runs on the session cookie.

Provisioning is ./agents/setup.sh (ant 1.34 or later, jq): it runs ant apply --yes agents environments vaults, which creates the environment, vault, reviewer, and planner from those directories and records their IDs in claude-lock.json (read by src/lib/resources.ts), then adds the two vendor keys to the vault as credentials, skipping any the vault already holds. On re-runs apply publishes file edits onto the same resources. If it prints refusing to apply, a resource was changed or archived in the Console: show the user the reason before reaching for --force. A new resource is one more file in agents/, environments/, vaults/, or memory_stores/ (add that directory to the apply line), one more getter in src/lib/resources.ts, and one more archive line in agents/teardown.sh.

Invariants to preserve when editing

  • The stream is a tail, not a replay, and previews are never persisted: every EventSource (re)connect re-fetches the event log (via /api/session) before trusting the tail. Do not "optimize" that fetch away. It is the entire resume story.
  • Previews are speculative. The accumulator's snapshot retires when the buffered agent.message with the same id lands in the log, an orphan event_delta (attached mid-generation) is dropped, and an errored span.model_request_end discards the open snapshot.
  • One fold (transcript.ts) renders both history and live state. If a new event type should render, it goes in the fold, not in a second mapping.
  • Every route that takes the session cookie goes through ownedSession() before any other API call, and refuses when it returns null. The cookie is browser input and the server's credentials can see every session in the workspace. A new route that touches a session uses it too.
  • src/proxy.ts gates every /api/* route: Host must be loopback or in ALLOWED_HOSTS, and Origin must match Host. The routes spend the server's credentials with no login, so a new route goes under /api/ to stay behind it.
  • The model override is checked against src/lib/models.ts on the server. The picker and the check share that one list.
  • web_search and web_fetch stay disabled on the agent. With them on, the model answers from the open web and the vault demo proves nothing.
  • The reviewer stays tool-free: its toolset is deny-by-default (default_config: {enabled: false}), and the prompt says the same. The review must come from the draft alone. A poisoned draft must have no tool to reach, and the rail must not fill with a second agent's curls.
  • The handoff is prompt-triggered. The planner's "Review step" prompt section decides when to message the reviewer. The user never asks and the app sends nothing. Weaken that section and step 4 silently disappears.
  • The environment's allowed_hosts and each credential's allowed_hosts both list the vendor host, as exact hosts with no wildcards. Drop either and the calls fail differently.
  • The header's model picker shows session.agent.model from the API response, never client state. An override must be visible as the resolved snapshot or the demo proves nothing.
  • Secrets reach the vault through the heredocs in agents/setup.sh and nowhere else. Never write a vendor key into a YAML or agent file (ant apply sends those whole) or pass one as a CLI flag.
  • No database. If a change needs one, it does not belong in this quickstart.

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.