> 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/17.latest/reference/services.md).

# Services

Umbraco.AI provides core services for AI operations. All services are registered with dependency injection and can be injected into controllers, composers, or other services.

## Available Services

| Service                                                                                      | Purpose                                        |
| -------------------------------------------------------------------------------------------- | ---------------------------------------------- |
| [IAIChatService](/ai-in-umbraco/17.latest/reference/services/ai-chat-service.md)             | Chat completions (streaming and non-streaming) |
| [IAIEmbeddingService](/ai-in-umbraco/17.latest/reference/services/ai-embedding-service.md)   | Text embedding generation                      |
| [IAIProfileService](/ai-in-umbraco/17.latest/reference/services/ai-profile-service.md)       | Profile CRUD operations                        |
| [IAIConnectionService](/ai-in-umbraco/17.latest/reference/services/ai-connection-service.md) | Connection management                          |

## Usage Pattern

All services follow standard dependency injection patterns:

{% code title="Using Services" %}

```csharp
using Umbraco.AI.Core.Chat;
using Umbraco.AI.Core.Profiles;

public class MyController : Controller
{
    private readonly IAIChatService _chatService;
    private readonly IAIProfileService _profileService;

    public MyController(IAIChatService chatService, IAIProfileService profileService)
    {
        _chatService = chatService;
        _profileService = profileService;
    }

    public async Task<IActionResult> Chat()
    {
        var messages = new[] { new ChatMessage(ChatRole.User, "Hello") };
        var response = await _chatService.GetChatResponseAsync(
            chat => chat.WithAlias("content-chat"),
            messages);
        return Ok(response.Message.Text);
    }
}
```

{% endcode %}

## In This Section

{% content-ref url="/pages/Q5462CpV9lHviLkq3N20" %}
[IAIChatService](/ai-in-umbraco/17.latest/reference/services/ai-chat-service.md)
{% endcontent-ref %}

{% content-ref url="/pages/esVus3j8yrb7sbAxEKkF" %}
[IAIEmbeddingService](/ai-in-umbraco/17.latest/reference/services/ai-embedding-service.md)
{% endcontent-ref %}

{% content-ref url="/pages/eqW8nT7TeM18qbgkUrnO" %}
[IAIProfileService](/ai-in-umbraco/17.latest/reference/services/ai-profile-service.md)
{% endcontent-ref %}

{% content-ref url="/pages/COH207fEvjDPFCyjFge3" %}
[IAIConnectionService](/ai-in-umbraco/17.latest/reference/services/ai-connection-service.md)
{% endcontent-ref %}


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.umbraco.com/ai-in-umbraco/17.latest/reference/services.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
