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

# Brainstorm chat (AI)

> Multi-turn conversational endpoint that helps refine a vague tap idea into a clear instruction.
The AI asks one focused clarifying question at a time, suggests data sources, recognizes Datris
platform tables, and returns an updated instruction draft on every turn.




## OpenAPI

````yaml /openapi.yaml post /api/v1/tap/brainstorm
openapi: 3.0.3
info:
  title: Datris API
  description: >
    REST API for the Datris AI Data Platform. Ingest, validate, transform,
    store, and retrieve data.


    For AI agent integration, use the [MCP
    Server](https://docs.datris.ai/mcp-server) instead.
  version: 1.0.0
  contact:
    name: Datris
    url: https://datris.ai
  license:
    name: Apache 2.0
servers:
  - url: http://localhost:8080
    description: Local development
security:
  - ApiKeyAuth: []
paths:
  /api/v1/tap/brainstorm:
    post:
      tags:
        - Taps
      summary: Brainstorm chat (AI)
      description: >
        Multi-turn conversational endpoint that helps refine a vague tap idea
        into a clear instruction.

        The AI asks one focused clarifying question at a time, suggests data
        sources, recognizes Datris

        platform tables, and returns an updated instruction draft on every turn.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TapBrainstormRequest'
      responses:
        '200':
          description: Updated chat reply, instruction draft, and suggested env vars
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TapBrainstormResponse'
components:
  schemas:
    TapBrainstormRequest:
      type: object
      required:
        - messages
      properties:
        messages:
          type: array
          items:
            type: object
            properties:
              role:
                type: string
                enum:
                  - user
                  - assistant
              content:
                type: string
        currentDescription:
          type: string
          description: Current draft instruction (optional context for the AI)
        tapType:
          type: string
          enum:
            - structured
            - document
          default: structured
          description: >-
            Selects the system prompt. `document` keeps the brainstorm focused
            on document discovery (where files live, how to enumerate) and stops
            it asking about chunking, embedding, or vector-store choices.
    TapBrainstormResponse:
      type: object
      properties:
        reply:
          type: string
          description: The AI's next chat message
        description:
          type: string
          description: >-
            Updated draft instruction the UI should sync into the instruction
            box
        suggestedEnvVars:
          type: array
          items:
            type: string
          description: >-
            Environment variable names the script will need (excludes
            platform-injected DATRIS_* vars)
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Optional API key for authentication (enabled via application.yaml)

````