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

# Delete v1agentsessions



## OpenAPI

````yaml /api-reference/openapi.json delete /v1/agent/sessions/{sessionId}
openapi: 3.1.0
info:
  title: Aomi Event and Pipeline API
  version: 1.0.0
  description: >-
    Intent enters the runtime; one ordered stream of concrete Events leaves it.
    Actions are durable Events whose nested ActionRequest requires a client
    response.
servers:
  - url: https://chat.aomi.dev
    description: Production
  - url: https://chat-staging.aomi.dev
    description: Staging
security: []
paths:
  /v1/agent/sessions/{sessionId}:
    delete:
      operationId: deleteSession
      parameters:
        - $ref: '#/components/parameters/SessionId'
      responses:
        '204':
          description: Deleted
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        default:
          $ref: '#/components/responses/Error'
      security:
        - aomiOAuth:
            - agent:write
components:
  parameters:
    SessionId:
      name: sessionId
      in: path
      required: true
      schema:
        type: string
        maxLength: 160
  responses:
    Error:
      description: Stable public error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  schemas:
    ErrorEnvelope:
      type: object
      required:
        - error
      properties:
        error: {}
  securitySchemes:
    aomiOAuth:
      type: oauth2
      description: >-
        Better Auth OAuth 2.1 authorization-code/device grants. Access tokens
        are exact-resource bound; the Portal BFF verifies them and delegates a
        downscoped internal bearer.
      flows:
        authorizationCode:
          authorizationUrl: https://chat.aomi.dev/api/auth/oauth2/authorize
          tokenUrl: https://chat.aomi.dev/api/auth/oauth2/token
          scopes:
            agent:read: Read owned Agent turns and sessions
            agent:write: Start, continue, interrupt, update, or delete Agent sessions
            agent:actions:resolve: Resolve a durable Agent Action
            pipeline:catalog: Browse public Pipeline apps, skills, and operations
            pipeline:execute: Attempt Pipeline execution subject to Gate F policy
            account:apps:read: Read available applications and installed state
            account:apps:write: Install and remove applications
            account:credentials:read: Read credential declarations and presence without values
            account:credentials:write: Save and remove owned application credentials
            account:credits:read: Read included allowance and Credit Bank activity
            account:credits:topup: Buy durable Credit Bank value through x402
            account:usage:read: Read priced account usage
            mcp:agent: Use the Agent MCP protected resource
            mcp:pipeline: Use the Pipeline MCP protected resource
            payments:submit: Attach a client-held payment signature
            custody:delegate: Permit separately approved delegated custody
      x-device-authorization-url: https://chat.aomi.dev/api/auth/device/code
      x-aomi-resources:
        agent: https://chat.aomi.dev/v1/agent
        pipeline: https://chat.aomi.dev/v1/pipeline
        agentMcp: https://chat.aomi.dev/v1/agent/mcp
        pipelineMcp: https://chat.aomi.dev/v1/pipeline/mcp
        account: https://chat.aomi.dev/v1/account

````