Created: 6 Nov 2025, last update: 6 Nov 2025
Sitecore Agent API for SitecoreAI a.k.a XM Cloud
The new Agent API for XM Cloud / SitecoreAI is a major improvement over the Pages API and Authoring API, especially when it comes to working with layouts.
While the Authoring API handles layout data in XML, both the Pages API and the Agent API use JSON, which makes it easier to work with in modern workflows. What makes the Agent API really stand out is the number of available and well-designed endpoints.
For example, the Pages API provides a Create a page endpoint, but it does not allow you to pass additional fields in the same request, requiring a second call. Both the Authoring API and the new Agent API include a Create a page endpoint where you can include all fields directly.
To summarize the main differences:
|
API
|
Type
|
Layout Data Format
|
|
Authoring API
|
GraphQL
|
XML
|
|
Pages API
|
REST
|
JSON
|
|
Agent API
|
REST
|
JSON
|
Authentication
At the moment, the Agent API can only be accessed using a token obtained via the Automation Client from the Sitecore Cloud Portal. A Sitecore CLI login does not provide the required scope for this API. This might change in the future, which would make authentication more accessible and developer-friendly. Now you need to be a Admin or Organization Owner in the portal to create a key for an enviorement.
Working with Layouts
What really sets the Agent API apart are its layout-related methods. It provides endpoints such as Retrieve a list of components available for a specific site and List allowed components for a placeholder, which make it much easier to automate page composition or integrate with AI-driven tools.
There is also an Add a component to a page method that simplifies the process of adding components programmatically. However, you can only add one component per call with this method, which can be slow if you need to generate thousands of complex pages. See Agent API docs for all end points.
AI-Powered Migration
At Sitecore Symposium 2025, during the Sitecore Previews session, Sitecore addressing the challenge of migrating existing content, stories, and structures from other platforms, which can be a daunting, month-long process. Sitecore's solution is a new SitecoreAI Pathway that makes the move to SitecoreAI significantly faster and simpler.
Key highlights:
- Simplified Migration: The AI-driven process allows content migration from any CMS to Sitecore AI in days instead of months. AI handles the heavy lifting, reducing cost and complexity so marketers can focus on creation rather than migration.
- AI-Guided Process: The interface uses AI to intelligently map old content structures to new ones, providing a smooth and intuitive experience.
- Sitemap Upload: Users can upload a sitemap to give the AI additional context, improving output accuracy.
- Smart Grouping: The AI groups current content and lets users select or deselect what to migrate.
- Quality Assurance: Unmatched components are flagged for manual review, ensuring quality and consistency.
- Test Migration: A test mode allows migrating a subset of pages first, so teams can validate the output before committing to a full migration.

I have already completed several migrations using the older Authoring API, with only a small amount of AI assistance. Thanks to experience and having sample code available in Sitecore Commander, I was able to reduce migration time to around ten days, depending on the complexity, and partly by not migrating everything in full. The main challenge has always been the layout data, with varying column structures, components used only a few times, and many different variations. I can’t wait to try the new migration tool. I am also curious to see whether it will support incremental updates.
Using the API in C# with Visual Studio
In addition to the new Sitecore Agentic Studio, you can also use the Sitecore Agent API directly in for example C# in Microsoft Visual Studio. This enables full use of C# and Visual Studio’s AI Copilot integration and advanced debugging tools to execute and automate Sitecore tasks programmatically.
For working examples of the Agent API and other Sitecore APIs, check out the Sitecore Commander project, which includes several practical C# implementations.