> 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/umbraco-ui-builder/17.latest/getting-started/configuration.md).

# Configuration

You can configure Umbraco UI Builder either via a Composer or in the `Program.cs`.

## Option 1: Configuring via a Composer

A Composer is a common approach for registering and configuring services in Umbraco during application startup.

To configure Umbraco UI Builder via a Composer:

1. Create a file called `UIBuilderComposer.cs` in your project.
2. Implement the `IComposer` interface and add the configuration inside the `Compose` method:

```csharp
using Umbraco.Cms.Core.Composing;
using Umbraco.UIBuilder.Extensions;

public class UIBuilderComposer : IComposer
{
   public void Compose(IUmbracoBuilder builder)
    {
       builder.AddUIBuilder(cfg =>
        {
           // Apply your configuration here
        });
    }
}
```

## Option 2: Configuring via `Program.cs`

You can also configure Umbraco UI Builder directly in `Program.cs` using the `AddUIBuilder` extension method.

To configure Umbraco UI Builder:

1. Open the `Program.cs` file in your project.
2. Locate the `CreateUmbracoBuilder()` method.
3. Add `AddUIBuilder` before `AddComposers()`.

```csharp
builder.CreateUmbracoBuilder()
    .AddBackOffice()
    .AddWebsite()
    .AddUIBuilder(cfg => {
       // Apply your configuration here
    })
    .AddDeliveryApi()
    .AddComposers()
    .Build();
```

## Example Configuration

For a complete sample configuration, see the [Creating your First Integration](/umbraco-ui-builder/17.latest/how-to-guides/creating-your-first-integration.md) article.

The `AddUIBuilder` method accepts a delegate function, allowing you to configure your solution using fluent APIs.


---

# 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/umbraco-ui-builder/17.latest/getting-started/configuration.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.
