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

# AI in Umbraco

Umbraco.AI is a provider-agnostic AI integration layer for Umbraco CMS, built on Microsoft.Extensions.AI.

`Umbraco.AI` brings AI capabilities to your Umbraco CMS installation through a flexible, provider-agnostic architecture. Whether you want to integrate OpenAI, Azure OpenAI, or other AI services, Umbraco.AI provides a consistent API and backoffice experience.

![Umbraco AI](https://583970477-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCHKT9bQhbR3swAdBvil4%2Fuploads%2Fgit-blob-78ccd1dafeaf4faa2224eb0af23a88feb3658ff9%2Fbackoffice-ai-section-overview.png?alt=media)

## Key Features

* **Provider-agnostic** - Install provider packages for the AI services you use
* **Profile-based configuration** - Create reusable profiles for different use cases
* **Built on Microsoft.Extensions.AI (M.E.AI)** - Uses standard M.E.AI types like `IChatClient` and `ChatMessage`
* **Extensible middleware** - Add logging, caching, rate limiting, and custom behavior
* **Backoffice integration** - Manage connections and profiles through the Umbraco UI

## Getting Started

New to Umbraco.AI? Start here:

{% content-ref url="/pages/GbUPDyng2rItuosRfou7" %}
[Overview](/ai-in-umbraco/getting-started/getting-started.md)
{% endcontent-ref %}

## Core Concepts

Understand how Umbraco.AI is structured:

{% content-ref url="/pages/BEfNpZDOI0FB08Kb0PbN" %}
[Core Concepts](/ai-in-umbraco/concepts/concepts.md)
{% endcontent-ref %}

## Using the API

Learn how to use AI services in your code:

{% content-ref url="/pages/kG9f21vN8PrODKWYDAuo" %}
[Overview](/ai-in-umbraco/using-the-api/using-the-api.md)
{% endcontent-ref %}

## Extending

Create custom providers, middleware, and tools:

{% content-ref url="/pages/5RF950rwyy2Qhh7MhSyS" %}
[Overview](/ai-in-umbraco/extending/extending.md)
{% endcontent-ref %}

## Quick Example

{% code title="ChatController.cs" %}

```csharp
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.AI;
using Umbraco.AI.Core.Chat;

[ApiController]
[Route("/api/chat")]
public class ChatController : Controller
{
    private readonly IAIChatService _chatService;

    public ChatController(IAIChatService chatService)
    {
        _chatService = chatService;
    }

    [HttpPost]
    public async Task<IActionResult> Chat([FromBody] string message)
    {
        var messages = new List<ChatMessage>
        {
            new(ChatRole.User, message)
        };

        var response = await _chatService.GetChatResponseAsync(
            chat => chat.WithAlias("quick-chat"),
            messages);

        return Ok(response.Text);
    }
}
```

{% endcode %}

## Requirements

* Umbraco CMS 17.1 or later
* .NET 10.0 or later
* At least one AI provider package (for example, `Umbraco.AI.OpenAI`)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.umbraco.com/ai-in-umbraco/readme.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
