# AgentServiceAnnotation Properties

- Package: [Aspire.Hosting.AgentFramework.DevUI](/reference/api/csharp/aspire.hosting.agentframework.devui.md)
- Type: [AgentServiceAnnotation](/reference/api/csharp/aspire.hosting.agentframework.devui/agentserviceannotation.md)
- Kind: `Properties`
- Members: `3`

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

## Agents

- Name: `Agents`
- Modifiers: `get`
- Returns: [IReadOnlyList<AgentEntityInfo>](/reference/api/csharp/aspire.hosting.agentframework.devui/agententityinfo.md)

Gets the list of agents declared by this backend.

```csharp
public IReadOnlyList<AgentEntityInfo> Agents { get; }
```

## Remarks

When non-empty, the DevUI aggregator uses these declarations to build the entity listing without querying the backend. When empty, the aggregator falls back to calling `GET /v1/entities` on the backend for discovery.

## AgentService

- Name: `AgentService`
- Modifiers: `get`
- Returns: `IResource`

Gets the agent service resource that exposes AI agents.

```csharp
public IResource AgentService { get; }
```

## EntityIdPrefix

- Name: `EntityIdPrefix`
- Modifiers: `nullable` `get`
- Returns: `string?`

Gets the prefix to use for entity IDs from this backend.

```csharp
public string? EntityIdPrefix { get; }
```

## Remarks

When `null`, the resource name will be used as the prefix. Entity IDs will be formatted as "{prefix}/{entityId}" to ensure uniqueness across multiple agent backends.
