# AgentServiceAnnotation

- Kind: `class`
- Package: [Aspire.Hosting.AgentFramework.DevUI](/reference/api/csharp/aspire.hosting.agentframework.devui.md)
- Version: `1.8.0-preview.260528.1`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/microsoft/agent-framework/tree/e9a606344adbe5e41d9376b1f8508da593ea6c3b)
- Implements: `IResourceAnnotation`

An annotation that tracks an agent service backend referenced by a DevUI resource.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public class AgentServiceAnnotation
    : Aspire.Hosting.ApplicationModel.IResourceAnnotation
{
    // ...
}
```

## Remarks

This annotation is used to configure DevUI to aggregate entities from multiple agent service backends. Each annotation represents one backend that DevUI should connect to for entity discovery and request routing.

## Constructors

- [AgentServiceAnnotation(IResource, string?, IReadOnlyList<AgentEntityInfo>)](/reference/api/csharp/aspire.hosting.agentframework.devui/agentserviceannotation/constructors.md#constructor-iresource-string-ireadonlylist-agententityinfo) -- Initializes a new instance of the [AgentServiceAnnotation](/reference/api/csharp/aspire.hosting.agentframework.devui/agentserviceannotation.md) class.

## Properties

- [Agents](/reference/api/csharp/aspire.hosting.agentframework.devui/agentserviceannotation/properties.md#agents) : [IReadOnlyList<AgentEntityInfo>](/reference/api/csharp/aspire.hosting.agentframework.devui/agententityinfo.md) `get` -- Gets the list of agents declared by this backend.
- [AgentService](/reference/api/csharp/aspire.hosting.agentframework.devui/agentserviceannotation/properties.md#agentservice) : `IResource` `get` -- Gets the agent service resource that exposes AI agents.
- [EntityIdPrefix](/reference/api/csharp/aspire.hosting.agentframework.devui/agentserviceannotation/properties.md#entityidprefix) : `string?` `get` -- Gets the prefix to use for entity IDs from this backend.
