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

# Send message (streaming)

> Send a message and receive a streaming response via SSE. If conversationId is not provided, a new conversation is created using the preferred LLM config.



## OpenAPI

````yaml /api-reference/openapi.json post /api/agents/messages/stream
openapi: 3.0.0
info:
  title: Open Attack Surface Management
  description: Open-source platform for cybersecurity Attack Surface Management (ASM)
  version: '1.0'
  contact: {}
servers:
  - url: https://{baseUrl}/api/v1
    variables:
      baseUrl:
        default: localhost:3000
        description: API server hostname with port (e.g. localhost:3000, api.example.com)
security: []
tags: []
externalDocs:
  description: Authentication Docs
  url: auth/docs
paths:
  /api/agents/messages/stream:
    post:
      tags:
        - Agents
      summary: Send message (streaming)
      description: >-
        Send a message and receive a streaming response via SSE. If
        conversationId is not provided, a new conversation is created using the
        preferred LLM config.
      operationId: AgentsController_streamMessage
      parameters:
        - name: X-Workspace-Id
          in: header
          description: Workspace ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendMessageDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AppResponseSerialization'
components:
  schemas:
    SendMessageDto:
      type: object
      properties:
        question:
          type: string
          example: Hello, how can you help me?
        conversationId:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
          description: >-
            Continue existing conversation. If not provided, a new conversation
            is created.
        model:
          type: string
          description: Override model name for new conversations
        provider:
          type: string
          description: Override provider for new conversations
        agentMode:
          type: string
          enum:
            - ask
            - agent
        workerId:
          type: string
          description: >-
            Preferred worker ID for remote command execution. Only respected
            when agentMode is "agent".
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - question
    AppResponseSerialization:
      type: object
      properties: {}

````