SambaNova Systems Subagents Interactive API

The Subagents Interactive API from SambaNova Systems — 4 operation(s) for subagents interactive.

OpenAPI Specification

sambanova-systems-subagents-interactive-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Sambanova Agents Service Audio Subagents Interactive API
  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: []
tags:
- name: Subagents Interactive
paths:
  /agent/coding/interactive:
    post:
      tags:
      - Subagents Interactive
      summary: Coding Agent Interactive
      description: 'The coding agent executes Python code in a sandboxed environment, fixes errors, and returns results. This interactive endpoint supports multi-turn conversations for iterative code development.


        Step 1: Submit code with prompt, get thread_id and execution result.

        Step 2: Continue with thread_id and resume=true to iterate on code.

        '
      operationId: coding_agent_interactive_agent_coding_interactive_post
      security:
      - api_key: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CodingAgentInteractiveRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseAgentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /agent/datascience/interactive:
    post:
      tags:
      - Subagents 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
      security:
      - api_key: []
      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':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Datascience Interactive
  /agent/deepresearch/interactive:
    post:
      tags:
      - Subagents Interactive
      description: 'Two-step interactive deep research API:

        Step 1: Submit prompt, get thread_id and research plan for approval.

        Step 2: Submit prompt with thread_id and resume=true to get the final report.'
      operationId: deepresearch_interactive_agent_agent_deepresearch_interactive_post
      security:
      - api_key: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeepResearchInteractiveRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Deepresearch Interactive Agent
  /agent/financialanalysis/interactive:
    post:
      tags:
      - Subagents Interactive
      summary: Financial Analysis Agent Interactive
      description: 'The financial analysis agent analyzes stocks, companies, and market data. This interactive endpoint uses a two-step workflow:


        1. Submit a prompt to receive a thread_id and initial analysis

        2. Continue with thread_id and resume=true for follow-up questions

        '
      operationId: financial_analysis_agent_interactive_agent_financialanalysis_interactive_post
      security:
      - api_key: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FinancialAnalysisInteractiveRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseAgentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DeepResearchInteractiveRequest:
      title: DeepResearchInteractiveRequest
      type: object
      description: Request for deep research interactive agent json object
      additionalProperties: false
      properties:
        prompt:
          title: Prompt
          description: The main prompt for the deep research 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: Research AI accelerator market
        resume: false
      - prompt: approve
        thread_id: thread-abc123
        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
    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
    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
    CodingAgentInteractiveRequest:
      title: CodingAgentInteractiveRequest
      type: object
      description: Request for coding interactive agent json object
      additionalProperties: false
      properties:
        code:
          title: Code
          description: Code to run
          type: string
        prompt:
          title: Prompt
          description: The main prompt for the coding 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
      - code
      examples:
      - prompt: Create a function to calculate fibonacci
        code: "def fib(n):\n  return fib(n-1) + fib(n-2)\n"
        resume: false
      - prompt: Fix the base case issue
        code: "def fib(n):\n  if n <= 1:\n      return n\n  return fib(n-1) + fib(n-2)\n"
        thread_id: thread-abc123
        resume: true
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
    BaseAgentResponse:
      type: object
      title: Base agent response object
      description: Base agent response object
      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: generated artifacts
          type: array
          items:
            type: string
            description: id of generated artifact
        thread_id:
          title: thread_id
          description: thread id for persistent context
          type: string
      required:
      - status
      - result
      - artifacts
      - thread_id
      example:
        status: success
        result: I've created the bar chart...
        artifacts:
        - file-id-123
        thread_id: thread-abc
    FinancialAnalysisInteractiveRequest:
      title: FinancialAnalysisInteractiveRequest
      type: object
      description: Request for financial interactive agent json object
      additionalProperties: false
      properties:
        prompt:
          title: Prompt
          description: The main prompt for the financial 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 a financial analysis of Apple
  securitySchemes:
    api_key:
      type: http
      description: SambaNova API Key
      scheme: bearer
      bearerFormat: apiKey
externalDocs:
  description: Find out more in the official SambaNova docs
  url: https://docs.sambanova.ai/cloud/api-reference/overview