> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corti.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Agent by ID

> This endpoint deletes an agent by its identifier. Once deleted, the agent can no longer be used in threads.




## OpenAPI

````yaml /agentic/auto-generated-openapi.yml delete /agents/{id}
openapi: 3.1.1
info:
  title: Corti Agent API
  version: 0.1.0
  description: >
    The Corti Agent API allows users to interact with the Corti Agent, enabling
    the creation and management of threads, sending messages, and receiving
    responses.
servers: []
security: []
paths:
  /agents/{id}:
    delete:
      tags:
        - Agents
      summary: Delete Agent by ID
      description: >
        This endpoint deletes an agent by its identifier. Once deleted, the
        agent can no longer be used in threads.
      operationId: agents_delete
      parameters:
        - $ref: '#/components/parameters/Tenant-Name'
        - $ref: '#/components/parameters/AgentID'
      responses:
        '204':
          description: Agent deleted successfully.
        '400':
          description: >
            The request could not be processed, possibly due to missing required
            fields or invalid data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentsErrorResponse'
        '401':
          description: |
            Authentication is required to access this endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentsErrorResponse'
        '404':
          description: Agent not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentsErrorResponse'
      x-codeSamples:
        - lang: csharp
          label: C# .NET SDK
          source: >
            using Corti;


            var client = new CortiClient(
                "TENANT_NAME",
                CortiClientEnvironment.Eu,
                new CortiClientAuth.ClientCredentials("client_id", "client_secret")
            );

            await
            client.Agents.DeleteAsync("12345678-90ab-cdef-gh12-34567890abc");
        - lang: javascript
          label: JavaScript SDK
          source: |
            import { CortiClient, CortiEnvironment } from "@corti/sdk";

            const client = new CortiClient({
                environment: CortiEnvironment.Eu,
                auth: {
                    clientId: "YOUR_CLIENT_ID",
                    clientSecret: "YOUR_CLIENT_SECRET"
                },
                tenantName: "YOUR_TENANT_NAME"
            });
            await client.agents.delete("12345678-90ab-cdef-gh12-34567890abc");
components:
  parameters:
    Tenant-Name:
      name: Tenant-Name
      in: header
      description: >-
        Identifies a distinct entity within Corti's multi-tenant system. Ensures
        correct routing and authentication of the request.
      required: true
      example: base
      schema:
        type: string
        description: >-
          Identifies a distinct entity within Corti's multi-tenant system.
          Ensures correct routing and authentication of the request.
        example: base
    AgentID:
      name: id
      in: path
      required: true
      description: The identifier of the agent associated with the context.
      schema:
        type: string
        description: The identifier of the agent associated with the context.
        example: 12345678-90ab-cdef-gh12-34567890abc
  schemas:
    AgentsErrorResponse:
      type: object
      required:
        - code
        - description
      properties:
        code:
          type: string
          description: |
            A machine-readable error code that identifies the type of error.
        description:
          type: string
          description: >
            A human-readable description of the error, providing more context
            about what went wrong.
        howToFix:
          type: string
          description: |
            A human-readable message describing how to fix the issue.
        details:
          type: object
          description: |
            An optional object containing additional details about the error.
          additionalProperties: true
        cause:
          type: object
          description: >
            An optional object containing the cause of the error, following the
            same structure as the parent error response.
          additionalProperties: true

````