Skip to content

Commit 6f1e6a7

Browse files
committed
RavenDB-25962 - Document DeleteAgent method in AI agents Client API
1 parent 9004ec8 commit 6f1e6a7

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

docs/ai-integration/ai-agents/creating-ai-agents/content/_creating-ai-agents_api-csharp.mdx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import ContentFrame from "@site/src/components/ContentFrame";
2929
* [Action tools](../../../../ai-integration/ai-agents/creating-ai-agents/creating-ai-agents_api.mdx#action-tools)
3030
* [Creating the Agent](../../../../ai-integration/ai-agents/creating-ai-agents/creating-ai-agents_api.mdx#creating-the-agent)
3131
* [Retrieving existing agent configurations](../../../../ai-integration/ai-agents/creating-ai-agents/creating-ai-agents_api.mdx#retrieving-existing-agent-configurations)
32+
* [Deleting an agent](../../../../ai-integration/ai-agents/creating-ai-agents/creating-ai-agents_api.mdx#deleting-an-agent)
3233
* [Managing conversations](../../../../ai-integration/ai-agents/creating-ai-agents/creating-ai-agents_api.mdx#managing-conversations)
3334
* [Setting a conversation](../../../../ai-integration/ai-agents/creating-ai-agents/creating-ai-agents_api.mdx#setting-a-conversation)
3435
* [Processing action-tool requests](../../../../ai-integration/ai-agents/creating-ai-agents/creating-ai-agents_api.mdx#processing-action-tool-requests)
@@ -745,6 +746,36 @@ You can also retrieve the configurations of **all existing agents** using `GetAg
745746

746747
</Panel>
747748

749+
<Panel heading="Deleting an agent">
750+
751+
You can delete an existing AI agent from the database using the `DeleteAgent` method.
752+
753+
* **Example**
754+
```csharp
755+
// Delete an agent by its ID
756+
var deleteResult = await store.AI.DeleteAgentAsync("reward-productive-employee");
757+
```
758+
759+
* `DeleteAgent` Overloads
760+
```csharp
761+
// Synchronously deletes an AI agent from the database
762+
AiAgentConfigurationResult DeleteAgent(string agentId)
763+
764+
// Asynchronously deletes an AI agent from the database
765+
Task<AiAgentConfigurationResult> DeleteAgentAsync(string agentId, CancellationToken token = default)
766+
```
767+
768+
* `DeleteAgent` Properties
769+
| Property | Type | Description |
770+
|----------|------|-------------|
771+
| agentId | `string` | The ID of the AI agent to delete |
772+
773+
| Return value | Description |
774+
|--------------|-------------|
775+
| `AiAgentConfigurationResult` | The result of the delete operation |
776+
777+
</Panel>
778+
748779
<Panel heading="Managing conversations">
749780

750781
<ContentFrame>

0 commit comments

Comments
 (0)