> 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/extending/extending.md).

# Overview

Umbraco.AI is designed to be extensible. You can add support for new AI providers, customize the request pipeline with middleware, and create custom tools for AI agents.

## Extension Points

<table data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Custom Providers</strong></td><td>Add support for AI services not included out of the box</td></tr><tr><td><strong>Middleware</strong></td><td>Add logging, caching, rate limiting, and custom behavior</td></tr><tr><td><strong>Custom Tools</strong></td><td>Create tools that AI agents can use to perform actions</td></tr><tr><td><strong>Agent Workflows</strong></td><td>Create multi-agent orchestration workflows for orchestrated agents</td></tr><tr><td><strong>Custom Guardrail Evaluators</strong></td><td>Create evaluators for domain-specific safety and compliance rules</td></tr><tr><td><strong>Notifications</strong></td><td>Subscribe to entity lifecycle events for validation and automation</td></tr></tbody></table>

## When to Extend

### Create a Custom Provider When

* You need to connect to an AI service without an existing provider
* You want to use a self-hosted AI model
* You need custom authentication or API handling

### Create Middleware When

* You want to log all AI requests and responses
* You need to cache responses for identical requests
* You want to add rate limiting or retry logic
* You need to modify requests or responses globally

### Create Custom Tools When

* You want AI agents to interact with your systems
* You need to expose business logic to AI
* You want to enable AI to query databases or APIs

### Create Agent Workflows When

* You need multi-agent orchestration (e.g., writer + editor pipelines)
* You want to compose agents into sequential or parallel workflows
* You need custom agent collaboration patterns

### Subscribe to Notifications When

* You need to validate operations before they execute
* You want to audit changes for compliance
* You need to trigger automation in response to events
* You want to maintain data consistency across systems

## Architecture Overview

```mermaid
graph TD
    A["Your Code\n(IAIChatService / IAIEmbeddingService)"] --> B[Middleware Pipeline]
    B --> C["Provider\n(OpenAI / Azure / Your Provider)"]
    C --> D[AI Service API]
```

## In This Section

{% content-ref url="/pages/t81kgFidUzkrBzZJNlBk" %}
[Custom Providers](/ai-in-umbraco/17.latest/extending/providers.md)
{% endcontent-ref %}

{% content-ref url="/pages/N4LXpwRynV3Mb2b4wgjD" %}
[Middleware](/ai-in-umbraco/17.latest/extending/middleware.md)
{% endcontent-ref %}

{% content-ref url="/pages/XZhEyNUkW0WF7dDBmH4H" %}
[Custom Tools](/ai-in-umbraco/17.latest/extending/tools.md)
{% endcontent-ref %}

{% content-ref url="/pages/7y8Nqo6LhRDHyDYF80eR" %}
[Workflows](/ai-in-umbraco/17.latest/add-ons/agent/workflows.md)
{% endcontent-ref %}

{% content-ref url="/pages/Kl6zEOp61XG127fd1apO" %}
[Notifications](/ai-in-umbraco/17.latest/extending/notifications.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/extending/extending.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.
