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

# Hosted Chat

> Stream a chat response from the hosted agent via SSE.

The agent uses direct Python tools after explicit project/entity authorization.



## OpenAPI

````yaml /api/openapi.json post /agent/v1/hosted/chat
openapi: 3.1.0
info:
  title: CrowdListen Agent API
  description: >-
    Configure sources, collect and retain originals, run durable analysis, and
    read or revise cited insights. Humans and agents share authorized
    entity/project records, research jobs and evidence history.
  version: 1.0.0
servers:
  - url: https://agent.crowdlisten.com
    description: Production
  - url: http://localhost:8000
    description: Local development
security: []
paths:
  /agent/v1/hosted/chat:
    post:
      tags:
        - hosted
      summary: Hosted Chat
      description: >-
        Stream a chat response from the hosted agent via SSE.


        The agent uses direct Python tools after explicit project/entity
        authorization.
      operationId: hosted_chat_agent_v1_hosted_chat_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HostedChatRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HostedChatRequest:
      properties:
        message:
          type: string
          maxLength: 10000
          minLength: 1
          title: Message
          description: User message
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
          description: Project context ID
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Id
          description: Session ID for conversation continuity
        history:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: History
          description: Previous messages for context
        skill_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Skill Id
          description: Active skill ID (e.g. competitive-analysis)
        entity_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Entity Id
          description: Active entity UUID for scoped analysis
        workspace_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Workspace Id
          description: Workspace UUID
      type: object
      required:
        - message
      title: HostedChatRequest
    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
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````

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