> For the complete documentation index, see [llms.txt](https://docs.commercelayer.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.commercelayer.io/ai/build-with-ai.md).

# Build with AI

Commerce Layer is built for programmatic commerce — precise, composable, and API-first since day one. That same foundation is what makes it a natural fit for the [agentic era](https://commercelayer.io/agentic-commerce): a platform that agents can interact with reliably, because its surface area is well-defined, its [data model](https://docs.commercelayer.io/data-model/) is consistent, and its behavior is documented and predictable.

AI agents are a new kind of client of the API — one that discovers resources, validates queries, reads documentation, and executes operations autonomously, without someone manually translating intent into API calls. The same rules that apply to human integrators apply here: correct authentication, correct resource types, correct payloads. The difference is that agents need that knowledge surfaced programmatically, in a form they can act on at inference time.

This is what Commerce Layer's AI integrations are built around: giving agents the same foundation experienced integrators rely on, encoded as tools they can call.

Today, that surface includes MCP servers for different parts of the platform, tools for testing and debugging them, and guidance for securing agent access in production.

### Available tools and guides

Commerce Layer's AI tooling is designed around real integration work. You can connect agents to operational APIs, analytics endpoints, and the documentation itself, then validate behavior with dedicated debugging tools and secure the whole setup with scoped access.

<table><thead><tr><th width="175.23828125">Area</th><th>Overview</th></tr></thead><tbody><tr><td><a href="/pages/lFxlkjPkJkUOuWyGfHW0">MCP servers</a></td><td>Start here to connect AI clients to Commerce Layer through purpose-built servers. Depending on the server, agents can operate on commerce data, run analytics queries, or retrieve live documentation.</td></tr><tr><td><a href="/pages/j7c0qvqIaqpxWh4y791L">MCP inspector</a></td><td>An open-source inspector that gives you a direct way to validate connections and inspect available tools before involving an AI client. It is useful for debugging schemas, inputs, and failed calls in isolation.</td></tr><tr><td><a href="/pages/wMNIWB0Mt6tJem5AuLHL">Security</a></td><td>This section covers the controls that matter in production. It explains token scoping, approval patterns, and guardrails for limiting what agents can access or change.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.commercelayer.io/ai/build-with-ai.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
