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

# Explain Neon decision

> **Auth:** organization API key with `write` scope, or a signed-in user.

Neon's explanation of one decision, generated on demand. `decision_id` is the `X-Xenovia-Decision-Id` the runtime returned (`dec_…`). Optionally name one of the decision's risks in `question`; by default Neon explains the most probable one. `404` for an unknown decision, `503` when Neon can't explain it right now.



## OpenAPI

````yaml https://cp.xenovia.io/openapi.json post /api/v1/agents/{agent_id}/neon/decisions/{decision_id}/explain
openapi: 3.1.0
info:
  title: Xenovia Control Plane API
  version: 1.0.0
  description: >-
    Management API for agents, providers, policies, telemetry, alerts and
    organization settings.
servers:
  - url: https://cp.xenovia.io
    description: Production
security:
  - BearerAuth: []
paths:
  /api/v1/agents/{agent_id}/neon/decisions/{decision_id}/explain:
    post:
      tags:
        - agents
      summary: Explain Neon decision
      description: >-
        **Auth:** organization API key with `write` scope, or a signed-in user.


        Neon's explanation of one decision, generated on demand. `decision_id`
        is the `X-Xenovia-Decision-Id` the runtime returned (`dec_…`).
        Optionally name one of the decision's risks in `question`; by default
        Neon explains the most probable one. `404` for an unknown decision,
        `503` when Neon can't explain it right now.
      operationId: >-
        explain_neon_decision_route_api_v1_agents__agent_id__neon_decisions__decision_id__explain_post
      parameters:
        - name: decision_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^dec_[0-9a-f]{6,32}$
            title: Decision Id
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/NeonExplainRequest'
                - type: 'null'
              title: Payload
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NeonExplanation'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    NeonExplainRequest:
      properties:
        question:
          anyOf:
            - type: string
              maxLength: 160
              pattern: ^(\*|(risk|violation)[.:][A-Za-z0-9_.:()-]*)$
            - type: 'null'
          title: Question
      additionalProperties: false
      type: object
      title: NeonExplainRequest
    NeonExplanation:
      properties:
        decision_id:
          type: string
          title: Decision Id
        question:
          type: string
          title: Question
        probability:
          anyOf:
            - type: number
            - type: 'null'
          title: Probability
        action:
          anyOf:
            - type: string
            - type: 'null'
          title: Action
        fired:
          type: boolean
          title: Fired
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        quote:
          anyOf:
            - type: string
            - type: 'null'
          title: Quote
        verified:
          type: boolean
          title: Verified
          default: false
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        cached:
          type: boolean
          title: Cached
          default: false
      type: object
      required:
        - decision_id
        - question
        - fired
      title: NeonExplanation
      description: |-
        Neon's explanation of one question of a logged decision: the span of the
        event that shows it (fired) or came closest (not fired), and why.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token: an organization API key (`ak_…`) created under Settings →
        API Keys, or a dashboard user session token. Agent keys (`xe_…`) are not
        accepted here. Endpoints marked as user-only in their description reject
        organization keys with `403`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.