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

# Get System Prompt History

> Obtém o histórico de versões de system prompts para um tipo de agente.

Args:
    agent_type: Tipo do agente
    limit: Limite de resultados
    db: Sessão do banco de dados

Returns:
    SystemPromptHistoryResponse: Histórico de versões



## OpenAPI

````yaml https://services.staging.app.dados.rio/eai-agent/openapi.json get /api/v1/system-prompt/history
openapi: 3.1.0
info:
  title: Agentic Search API
  description: >-
    API que gerencia os fluxos e ferramentas dos agentes de IA da Prefeitura do
    Rio de Janeiro
  version: 0.1.0
servers:
  - url: https://services.staging.app.dados.rio/eai-agent
    description: Staging
security: []
paths:
  /api/v1/system-prompt/history:
    get:
      tags:
        - System Prompt
      summary: Get System Prompt History
      description: |-
        Obtém o histórico de versões de system prompts para um tipo de agente.

        Args:
            agent_type: Tipo do agente
            limit: Limite de resultados
            db: Sessão do banco de dados

        Returns:
            SystemPromptHistoryResponse: Histórico de versões
      operationId: get_system_prompt_history_api_v1_system_prompt_history_get
      parameters:
        - name: agent_type
          in: query
          required: false
          schema:
            type: string
            default: agentic_search
            title: Agent Type
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: Limite de resultados
            default: 10
            title: Limit
          description: Limite de resultados
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SystemPromptHistoryResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    SystemPromptHistoryResponse:
      properties:
        agent_type:
          type: string
          title: Agent Type
          description: Tipo de agente
        prompts:
          items:
            $ref: '#/components/schemas/SystemPromptHistoryItem'
          type: array
          title: Prompts
          description: Lista de prompts
      type: object
      required:
        - agent_type
        - prompts
      title: SystemPromptHistoryResponse
      description: Schema para resposta da obtenção do histórico de system prompts.
      example:
        agent_type: agentic_search
        prompts:
          - content: 'Fundamental Identity: You are EAí, the official...'
            created_at: '2023-05-16T14:30:15.123456'
            is_active: true
            metadata:
              author: admin
              reason: Melhoria na resposta de emergência
            prompt_id: f47ac10b-58cc-4372-a567-0e02b2c3d479
            updated_at: '2023-05-16T14:30:15.123456'
            version: 3
          - content: 'Fundamental Identity: You are EAí, the official...'
            created_at: '2023-05-10T09:15:30.123456'
            is_active: false
            metadata:
              author: admin
              reason: Ajuste inicial
            prompt_id: a1b2c3d4-1234-5678-9abc-def0123456789
            updated_at: '2023-05-10T09:15:30.123456'
            version: 2
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SystemPromptHistoryItem:
      properties:
        prompt_id:
          type: string
          title: Prompt Id
          description: ID do prompt
        version:
          type: integer
          title: Version
          description: Versão do prompt
        is_active:
          type: boolean
          title: Is Active
          description: Se o prompt está ativo
        created_at:
          type: string
          title: Created At
          description: Data de criação formatada como string ISO
        updated_at:
          type: string
          title: Updated At
          description: Data de atualização formatada como string ISO
        content:
          type: string
          title: Content
          description: Conteúdo resumido do prompt
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Metadados do prompt
      type: object
      required:
        - prompt_id
        - version
        - is_active
        - created_at
        - updated_at
        - content
      title: SystemPromptHistoryItem
      description: Item do histórico de system prompts.
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````