# AI in Umbraco

`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](/files/jKjXd04jETrGqBjuMrfH)

## 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/CsjcmxdUtF0FQzJNPka6" %}
[Overview](/ai-in-umbraco/getting-started/getting-started.md)
{% endcontent-ref %}

## Core Concepts

Understand how Umbraco.AI is structured:

{% content-ref url="/pages/Vpac5aZV6zjB2OoUS8kY" %}
[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/Cb44030Ogfc8iNOszlqK" %}
[Overview](/ai-in-umbraco/using-the-api/using-the-api.md)
{% endcontent-ref %}

## Extending

Create custom providers, middleware, and tools:

{% content-ref url="/pages/t4glNazeUOzoPMJXjr9J" %}
[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: 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.umbraco.com/ai-in-umbraco/readme.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.
