/sitecore-platform:sitecoreai-agentfrom Sitecore Platform (SitecoreAI)
Provides high-level REST actions for Sitecore content management, personalization experiments, and brief generation via the SitecoreAI Agent API. Replaces multiple low-level API calls with single marketer-level outcomes.
Ships in Sitecore Platform (SitecoreAI). Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Business-level actions on Sitecore content, experiments, personalization, and briefs. One call replaces 3–5 low-level Pages/Sites calls. Prefer this over the raw Pages/Sites APIs whenever the task maps to a marketer-level outcome.
https://edge-platform.sitecorecloud.io/stream/ai-agent-api
(Unchanged from v1 — the spec servers block still lists this single production server.)
The Agent API uses a single security scheme: HTTPBearer — HTTP bearer with bearerFormat: JWT. Every operation in the spec is secured with HTTPBearer: [].
Client-credentials flow (default — service principal). OAuth 2.0 client-credentials → JWT Bearer. See the sitecoreai-auth skill for token acquisition (it is the source of truth for the host/token/scope mechanics):
POST https://auth.sitecorecloud.io/oauth/tokengrant_type=client_credentials, fixed audience=https://api.sitecorecloud.ioaccess_token as Authorization: Bearer {JWT} + Accept: application/json.expires_in: 86400) — cache per sitecoreai-auth § 5.The client-credentials response carries scope: xmcloud.cm:admin.
Authorization-code flow (optional — user-delegated). The Agent API also supports the OAuth 2.0 authorization-code flow for acting as a user. This requires an OAuth app registration submitted to Sitecore Support, requesting these exact scope strings (from the spec's Authorization section):
| Scope | Covers |
|---|---|
xmcloud.cm:admin | Content management (pages, content, components, assets, jobs) |
personalize.exp:mng | Manage personalization experiences / experiments |
personalize.tmpl:r | Read personalization condition templates |
personalize.pos:mng | Manage personalization point-of-sale / placement |
ai.org.bri:r | Read briefs (org scope) |
ai.org.bri:w | Write briefs (org scope) |
co.briefs:r | Read briefs (collaboration) |
co.briefs:w | Write briefs (collaboration) |
ai.org.brd:r | Read brand kits (org scope) |
cmp.sites:read | Read sites (added to the list by 2026-10) |
platform.tenants:list | List tenants (added to the list by 2026-10) |
For most Marketplace apps and backend automations the client-credentials flow is correct and simpler; reach for authorization-code only when a per-user audit trail / per-user permissions are required.
info.version is v2.0. Most paths are prefixed /api/v1/...; personalization now exposes a parallel /api/v2/... lane for the two endpoints that changed shape (create variant, list variants by page). The /api/v1 personalization create + list-by-page are deprecated (announced removal 2026-08-04) — use the /api/v2 equivalents. The /api/v1/briefs/generate endpoint is also deprecated (announced removal 2026-09-20) in favour of /api/v1/brief/generate. All three are past their date and still in the 2026-10-01 spec (deprecated: true); do not build on them.
Resource groups: Sites · Pages · Content · Components · Assets · Environments · Experiments · Personalization · Flow definitions · Brand Kits · Brand contexts · Briefs · Jobs.
The full path × method table is in references/endpoints.md; request bodies and key response fields per operation are in references/schemas.md. Both are regenerated from the spec — read them when you need an exact path, method or field name; the sections below carry what the spec does not say.
The spec declares one explicit error response per operation plus the bearer-auth default:
| Status | Meaning |
|---|---|
422 | Unprocessable entity — HTTPValidationError ({ detail: ValidationError[] }, each { loc, msg, type }). The catch-all for malformed bodies / bad params (e.g. a non-integer version). |
401 | Unauthorized — implied by HTTPBearer; expired/invalid JWT. Re-auth per sitecoreai-auth § 6. |
201 | Returned on successful creates (pages, content, components, datasources, experiments, personalization variants, briefs, flow-variant setup, job revert). |
The spec does not enumerate
429or5xxshapes — rate limits are undocumented (see Pitfalls).
POST /pages/create → get pageId.GET /pages/{pageId}/placeholders/{ph}/allowed-components → find usable component IDs.POST /pages/{pageId}/components for each placement.POST /components/{componentId}/datasources → attach content.POST /pages/{pageId}/components/{componentId}/datasource → bind.For bulk scenarios the higher-level "create_page_with_components" pattern combines these — check the OpenAPI spec for composite endpoints.
Language traps (measured 2026-10-02). DELETE /content/{id} removes every language version, and so does MCP delete_content {language}: the whole item went. Never use it to drop one language. add-language returns no version number. v2 has no translate operation (use Authoring translatePage or the Pages API; sitecoreai-localization).
The job id is client-supplied, not returned in the body: send a stable x-sc-job-id request header on every call of a sequence (the spec declares it on nearly every operation). To undo the whole sequence:
POST /api/v1/jobs/{jobId}/revert
This is the safety net for autonomous agents — always surface the jobId to the user and keep it for the audit trail.
Full recipe (audiences, COPY / SWAP / HIDE, publish, verify, undo): sitecoreai-personalization. The Agent-API-level facts:
GET /personalization/condition-templates → pick a template (param keys = the placeholder labels in the template).POST /api/v2/personalization/{pageId}/versions with condition_groups → new flow + variant. Use v2 only: the deprecated v1 create (single condition_template_id + flat condition_params) returned 400 "Failed to update flow definition" for the multi-param utm_value template on 2026-09-22, where the identical params succeeded on v2. The flow is PRODUCTION at create and its supplied name is replaced by <page> <lang> - <PAGEID>.POST /flows/{flowId}/variants/{variantId} (COPY / SWAP / HIDE) and POST /flows/{flowId}/variants/reset (undo one component).POST /personalization/{pageId}/components/{componentId}/hide hides a component on the default variant; it needs an existing personalization on the page.Two variant ids — the variant endpoints want the 32-hex one. A flow carries transpiledVariants[].ref (dashed uuid, the "variant ref") and the template variant id (32-hex, no dashes, in templateRenderTask.input.template / traffic.splits[].template). The spec text says to pass the ref; live, GET /flows/{flowId}/variants/{variantId} with the dashed ref returns 400 "Requires template Variant Id, not variant ref", and the setup write succeeded with the 32-hex id (2026-10-01).
"None" is a 404. GET /api/v2/personalization/by-page/{pageId} on a page with no personalization returns 404 Not Found, not []. Treat it as "none"; GET /flows/by-page/{pageId} returns [] and is the better existence check.
No delete, pause or archive for experiences. There is no endpoint to remove an EXPERIENCE flow; PUT /experiments/{flowId} with archived: true on one returned 500 and changed nothing. reset leaves a Default-only ruleset in __Final Renderings, and the flow keeps answering decisions. Removal is a Pages UI task — tell the user.
Confirmed empirically + via the OpenAPI bundle (a Marketplace app build, 2026-04-22). The public reference is silent on all three; document them here until upstream fixes land.
Query parameters:
| Param | Type | Required? | Default | Notes |
|---|---|---|---|---|
version | integer | yes | — | Must be an integer. "latest" returns 400 "Input should be a valid integer"; omission returns 400 "Field required". Pass 1 when you don't want to surface a version selector. |
width | integer | no | 1200 | Rendered viewport width (also controls output image width). |
height | integer | no | — | EXACT output-image height — not a viewport hint, not a minimum. Taller page content is cropped; shorter content gets solid-color padding at the bottom. Consumers who want "whole page" must pick a generous value (4000–8000 px) and trim whitespace client-side. |
language | string | no | en | Language code for the rendered page. |
No fullPage query parameter exists. The fullPage: true field in the response body (below) is informational only — it describes rendering mode, not a togglable input. Do not document it or pass it as a query param.
Response body shape:
{
"type": "png",
"fullPage": true,
"encoding": "base64",
"timestamp": "2026-04-22T13:47:00.233131",
"screenshot_base64": "<base64 string>"
}
The image payload is under screenshot_base64 — not image, not data. The string is bare base64 (no data:image/png;base64, prefix); add the prefix client-side if you need a data URL.
sitecoreai-auth skill, § 5.x-sc-job-id is mandatory for audit. A call made without it cannot be reverted as part of a job.POST /pages/create that succeeds in page creation but fails on a follow-up component add will still return a 201 on the page. Always check the operations array in the response or via GET /jobs/{jobId}/operations.GET /pages/search, GET /components). Passing siteId vs. siteName differs per endpoint — always check the path.429 + 5xx.Full schema: api-docs.sitecore.com/_bundle/sai/agent-api/@v2.0/index.yaml. The Agent API bundle is version-pinned: the unversioned _bundle/sai/agent-api/index.yaml returns 404.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub chris1415/sitecore-skills-pocs --plugin sitecore-platform17 skills in this plugin
/sitecoreai-authOAuth client-credentials auth for the SitecoreAI APIs (Agent, Pages, Publishing, Sites): automation client, token endpoint, scopes, env vars, caching, 401s. Load before the first API call. Not head-app Edge context ids./sitecoreai-brand-voiceWrites Sitecore page content in a brand's voice and identity, taken from the PRD or spec or a Sitecore brand kit, never guessed. Sets register (brand, marketing, technical-neutral). Use for copy on a brand or client site. Not page structure./sitecoreai-cli-cloud-workflowSitecore CLI against a SitecoreAI tenant: login, project and environment lookup, connect, ser pull and push, and their silent traps. Use when pulling, pushing or moving a site between tenants, or on CLI environment errors./sitecoreai-content-compositionInventory-first page composition via the Marketer MCP: inventory the site's real components, then compose a page by choosing and ordering them, with the verified add-component recipe. Use when authoring or extending a page, not a single field./sitecoreai-edge-admin-webhooksExperience Edge Admin API: admin client, token, webhook CRUD (OnEnd vs OnUpdate), settings, cache clear, which webhook fits which job. Use when registering, testing or debugging a publish webhook. Not head-app revalidation code./sitecoreai-edge-graphql-capturecurl recipes for Experience Edge GraphQL: endpoint, introspection depth trap, complexity vs pagination, ComponentQuery budget, site, route and layout queries. Use to capture a snapshot, probe live data without the SDK or debug Edge queries.Other plugins' skills for the same job