You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-foundry/agents/concepts/capability-hosts.md
+123Lines changed: 123 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,14 @@ Capability hosts follow a hierarchy where more specific configurations override
50
50
2.**Account-level capability host** - Provides shared defaults for all projects under the account.
51
51
3.**Project-level capability host** - Overrides account-level and service defaults for that specific project.
52
52
53
+
## Understand capability host constraints
54
+
55
+
When creating capability hosts, be aware of these important constraints to avoid conflicts:
56
+
57
+
-**One capability host per scope**: Each account and each project can only have one active capability host. Attempting to create a second capability host with a different name at the same scope will result in a 409 conflict.
58
+
59
+
-**Configuration updates are not supported**: If you need to change configuration, you must delete the existing capability host and recreate it.
60
+
53
61
54
62
## Recommended setup
55
63
@@ -79,6 +87,7 @@ PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{
79
87
}
80
88
}
81
89
```
90
+
82
91
**Project capability host**
83
92
84
93
This configuration overrides service defaults and any account-level settings. All agents in this project will use your specified resources:
If you're experiencing issues when creating capability hosts, this section provides solutions to the most common problems and errors.
149
+
150
+
### HTTP 409 Conflict errors
151
+
152
+
#### Problem: Multiple capability hosts per scope
153
+
154
+
**Symptoms:** You receive a 409 Conflict error when trying to create a capability host, even though you believe the scope is empty.
155
+
156
+
**Error message:**
157
+
```json
158
+
{
159
+
"error": {
160
+
"code": "Conflict",
161
+
"message": "There is an existing Capability Host with name: existing-host, provisioning state: Succeeded for workspace: /subscriptions/.../workspaces/my-workspace, cannot create a new Capability Host with name: new-host for the same ClientId."
162
+
}
163
+
}
164
+
```
165
+
166
+
**Root cause:** Each account and each project can only have one active capability host. You're trying to create a capability host with a different name when one already exists at the same scope.
167
+
168
+
**Solution:**
169
+
1.**Check existing capability hosts** - Query the scope to see what already exists
170
+
2.**Use consistent naming** - Ensure you're using the same name across all requests for the same scope
171
+
3.**Review your requirements** - Determine if the existing capability host meets your needs
172
+
173
+
**Validation steps:**
174
+
```http
175
+
# For account-level capability hosts
176
+
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/capabilityHosts?api-version=2025-06-01
177
+
178
+
# For project-level capability hosts
179
+
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/projects/{projectName}/capabilityHosts?api-version=2025-06-01
180
+
```
181
+
182
+
#### Problem: Concurrent operations in progress
183
+
184
+
**Symptoms:** You receive a 409 Conflict error indicating that another operation is currently running.
185
+
186
+
**Error message:**
187
+
```json
188
+
{
189
+
"error": {
190
+
"code": "Conflict",
191
+
"message": "Create: Capability Host my-host is currently in non creating, retry after its complete: /subscriptions/.../workspaces/my-workspace"
192
+
}
193
+
}
194
+
```
195
+
196
+
**Root cause:** You're trying to create a capability host while another operation (update, delete, modify) is in progress at the same scope.
197
+
198
+
**Solution:**
199
+
1.**Wait for current operation to complete** - Check the status of ongoing operations
200
+
2.**Monitor operation progress** - Use the operations API to track completion
201
+
3.**Implement retry logic** - Add exponential backoff for temporary conflicts
202
+
203
+
**Operation monitoring:**
204
+
```http
205
+
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/operationResults/{operationId}?api-version=2025-06-01
206
+
```
207
+
208
+
### Best practices for conflict prevention
209
+
210
+
#### 1. Pre-request validation
211
+
Always verify the current state before making changes:
212
+
- Query existing capability hosts in the target scope
213
+
- Check for any ongoing operations
214
+
- Understand the current configuration
215
+
216
+
#### 2. Implement retry logic with exponential backoff
0 commit comments