Skip to main content
This is the path we recommend, and the one every production integration has used. You already run a coding agent — Claude Code, Codex, Cursor, or another. It has your codebase, your component library, your CMS client, your conventions and your git history. Our onboarding agent has none of that and has to discover it from scratch inside a repository it has never seen. So do not switch tools. Hand your agent the prompt below, let it work on a branch, and review the diff the way you review any other diff.
What this costs. On a real site, expect a developer and an agent to spend a few days — most of it in step 3 below, marking up renderers across a design system. The prompt makes the work correct and ordered. It does not make it short.

Start here: install the skills

Run that in your repo, then tell your agent: “add Avocado Studio to this site.” It writes four skills into .claude/skills/ and .agents/skills/avocado routes, and avocado-integrate is the one for this job — plus an AGENTS.md that points at them. Nothing else is touched: no routes, no config, no dependencies. Your own AGENTS.md is never overwritten.
Why not just paste the prompt below? Because a web page cannot be versioned against what npm serves, and ours drifted — the quickstart said 0.11.9 while the registry served 0.13.1, and the guides for existing sites taught a registerBlock call that does not compile. The skills ship inside the packages, so an 0.13.1 install carries 0.13.1’s instructions, and re-running the command after an upgrade replaces them.
The prompt further down is still here and still correct — it is the fallback for an agent with no skill support, and it is worth reading whichever route you take, because it says what the work actually is.

Before you start

  • Node 22+ and your usual package manager.
  • Next.js 15 or 16, App Router. If you are on 16, the agent must use src/proxy.ts rather than src/middleware.ts and give config as a static object literal — Next 16 reads it by static analysis and cannot read one returned from a factory.
  • Your own dev server, for the last step only. In library mode — the shape most integrations use — the orchestrator is not a service you start: it is mounted inside your own app at http://localhost:3000/api/avocado, so it is up exactly when next dev is. Steps 1–6 below never talk to it at all. If your project has no orchestrator mounted yet, the quickstart’s route is the whole of it. http://localhost:4200 is the standalone server’s address, and it is what avocado-register defaults to — pass --orchestrator unless that is really what you are running.
  • The editor UI, also for the last step only, and it is a process you start: npx @avocadostudio-ai/cli start. See Open it. Nothing in steps 1–7 needs it, which is why it is easy to reach the end without it.
  • One siteId, spelled the same in three places: createSitePage, the createOrchestrator mount, and avocado-register --id. They disagree and the page asks for a draft session the orchestrator never seeded — which looks like the editor showing published content for no reason.
  • An Anthropic, OpenAI or Google API key on the orchestrator. Avocado runs on your keys; it never resells tokens.
  • A branch. The agent will touch your route files. Give it somewhere to be wrong.

The prompt

You do not need this if you ran npx @avocadostudio-ai/skills above — the avocado-integrate skill covers the same ground and stays in step with the version you installed. Use this when your agent has no skill support, or when you want to read the whole job in one place before starting it. Copy this into your coding agent. Replace the bracketed placeholders. Delete the sections that do not apply to your site — the CMS section if your content is in files, the multilingual section if your site is one language.

Reading the docs from a local checkout

If your agent is behind a proxy or you would rather it read from disk, point it at the docs-site/ directory of your Avocado checkout instead of the URLs:

Give the agent Avocado’s own tools

The MCP server exposes 49 tools over Model Context Protocol — stdio or Streamable HTTP — and works with any MCP host, including Claude Code, Codex, Cursor and Claude Desktop. Connecting it during the integration gives your agent two things the docs cannot:
  • Real pages and real blocks. It can read the site’s actual content and manifest from the orchestrator instead of guessing from the code.
  • avocado-check-editing-surface. The panel-coverage QA check as a tool, so the agent can grade its own work between passes rather than at the end.

When the agent gets stuck

After the agent finishes

If it ran step 7, the site is already registered and appears in the editor’s dashboard on the next open or refresh. Otherwise run it yourself:
The script will:
  1. Read .env.local for DRAFT_MODE_SECRET and generate a random one if it is missing.
  2. Fill in NEXT_PUBLIC_DEFAULT_SITE_ID, NEXT_PUBLIC_SITE_NAME and NEXT_PUBLIC_EDITOR_ORIGIN if absent.
  3. POST the site config to <ORCHESTRATOR_URL>/sites/register.
  4. Write ORCHESTRATOR_URL once that POST has been answered — an address nothing replied at is a guess, and writing it would pin it for every later run.
  5. Print any warnings — most usefully a secret mismatch against the editor’s build-time VITE_SITE_DRAFT_SECRET.
Steps 1–2 do not depend on reaching anything, so an unreachable orchestrator leaves them done and the command exits 0 saying which half happened.
Registration is optional in library mode. A library-mode mount already knows the one site it is mounted in and reports it from GET /sites whether or not anyone registered it. What registration adds is the name, preview URL and purpose in the orchestrator’s registry — worth having, not a gate. Skipping it does not stop the site loading in the editor.

Open it

Two processes, in two terminals. The integration you just reviewed is only half of what has to be running: it makes your app editable, and the editor UI is a separate program that talks to it.
Your Next.js app on http://localhost:3000, with the orchestrator mounted inside it at /api/avocado.
This is the one thing in library mode you do start yourself. The orchestrator is not a process — it is mounted inside your app — so it is easy to finish the integration, open http://localhost:4100 and find nothing listening, having started everything the integration mentioned. Pass --orchestrator. The CLI defaults to http://localhost:4200, the standalone server, which is not what this project runs. --preview is the origin the editor loads in its iframe — your site. Then open http://localhost:4100, pick the site, and send one edit from the chat panel to confirm the round trip.

Troubleshooting

If your agent cannot finish, the fallback is not to start over by hand — it is to narrow the scope. Get steps 1–2 landed and verified, then do the renderer markup block by block, checking coverage after each one.