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

# Datascience Interactive

> The data science agent analyzes datasets, generates visualizations, and produces comprehensive reports. This interactive endpoint uses a two-step workflow:

1. Submit a prompt and files to receive a thread_id and hypothesis for approval
2. Submit a prompt with thread_id, file_ids_json, and resume=true to generate the final report




## OpenAPI

````yaml https://raw.githubusercontent.com/sambanova/agents/refs/heads/main/chat-sambanova-agent-api-spec.yaml post /agent/datascience/interactive
openapi: 3.1.0
info:
  title: Sambanova Agents Service
  description: Service for Sambanova agents
  version: 0.0.1
  termsOfService: https://sambanova.ai/cloud-end-user-license-agreement
  contact:
    email: info@sambanova.ai
    name: SambaNova information
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://chat.sambanova.ai/api
security:
  - api_key: []
externalDocs:
  description: Find out more in the official SambaNova docs
  url: https://docs.sambanova.ai/cloud/api-reference/overview
paths:
  /agent/datascience/interactive:
    post:
      tags:
        - Subagents Interactive
      summary: Datascience Interactive
      description: >
        The data science agent analyzes datasets, generates visualizations, and
        produces comprehensive reports. This interactive endpoint uses a
        two-step workflow:


        1. Submit a prompt and files to receive a thread_id and hypothesis for
        approval

        2. Submit a prompt with thread_id, file_ids_json, and resume=true to
        generate the final report
      operationId: datascience_interactive_agent_datascience_interactive_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DatascienceAgentInteractiveRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentResponse'
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - api_key: []
components:
  schemas:
    DatascienceAgentInteractiveRequest:
      title: DatascienceAgentInteractiveRequest
      type: object
      description: Request for data science interactive agent json object
      additionalProperties: false
      properties:
        file_ids_json:
          anyOf:
            - type: string
            - type: 'null'
          description: A JSON string of file IDs, required for resuming a session
          title: File Ids Json
        files:
          anyOf:
            - items:
                format: binary
                type: string
              type: array
            - type: 'null'
          description: file to upload
          title: Files
        prompt:
          title: Prompt
          description: The main prompt for the data science interactive agent
          type: string
        resume:
          default: false
          title: Resume
          description: Whether to describe the results or not
          type: boolean
        thread_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Thread Id
          description: thread id for persistent context
      required:
        - prompt
      examples:
        - prompt: Perform exploratory data analysis on this dataset
          files: '@dataset.csv'
          resume: false
        - prompt: approve
          thread_id: thread-abc123
          file_ids_json:
            - file-id-1
            - file-id-2
          resume: true
    AgentResponse:
      type: object
      title: Agent Response Object
      description: >-
        Unified schema for agent responses, including success and interrupt
        states.
      additionalProperties: false
      properties:
        status:
          title: status
          description: status of agent gereneration
          type: string
        result:
          title: Result
          description: results description
          type: string
        artifacts:
          title: Artifacts
          description: List of generated artifact IDs (e.g., files, images, reports)
          type: array
          items:
            type: string
            description: ID of a generated artifact
        file_ids:
          title: File IDs
          description: Optional list of file identifiers associated with the response
          type: array
          items:
            type: string
            description: ID of an uploaded or generated file
        thread_id:
          title: Thread ID
          description: Identifier for maintaining persistent conversation or context
          type: string
        interrupt:
          title: Interrupt
          description: Information about an interrupt event requiring user action
          type: object
          properties:
            type:
              title: Type
              description: Type of interrupt (e.g., approval)
              type: string
            message:
              title: Message
              description: Plan or information message for the user
              type: string
          required:
            - type
            - message
      required:
        - status
        - thread_id
      example:
        status: interrupt
        thread_id: thread-a
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    api_key:
      type: http
      description: SambaNova API Key
      scheme: bearer
      bearerFormat: apiKey

````