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

# Criar agente

> Cria um novo agente IA.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/agents
openapi: 3.1.0
info:
  title: Timely.ai API
  description: >-
    API REST do Timely.ai para automação de atendimento com IA. Gerencie
    agentes, conversas, contatos e integrações.
  version: 1.0.0
  contact:
    name: Timely.ai
    email: contato@timelyai.com.br
    url: https://timelyai.com.br
servers:
  - url: https://api.timelyai.com.br
    description: Produção
security:
  - ApiKeyAuth: []
tags:
  - name: System
    description: Health check e introspecção da API key
  - name: Agents
    description: Agentes IA — criação, configuração e gerenciamento
  - name: Trainings
    description: Base de conhecimento dos agentes
  - name: Channels
    description: Canais de comunicação (WhatsApp, Telegram, Email, Website)
  - name: Contacts
    description: Cadastro de clientes
  - name: Conversations
    description: Histórico de conversas e mensagens
  - name: Custom Fields
    description: Campos personalizados do CRM
  - name: Chats
    description: Operações em chats ativos e handoff humano
  - name: Messages
    description: Mensagens individuais
  - name: MCP
    description: Model Context Protocol — servidores e ferramentas
  - name: Webhooks
    description: Webhooks outbound para eventos em tempo real
paths:
  /v1/agents:
    post:
      tags:
        - Agents
      summary: Criar agente
      description: Cria um novo agente IA.
      operationId: createAgent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAgent'
      responses:
        '201':
          description: Agente criado
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Agent'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    CreateAgent:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 100
        description:
          type: string
          maxLength: 500
        avatar_url:
          type: string
          format: uri
        model:
          type: string
          default: gpt-4o-mini
        temperature:
          type: number
          minimum: 0
          maximum: 2
          default: 0.7
    Agent:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
        avatar_url:
          type: string
          format: uri
        status:
          type: string
          enum:
            - active
            - inactive
        model:
          type: string
        temperature:
          type: number
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            status:
              type: integer
  responses:
    ValidationError:
      description: Dados da requisição inválidos
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: API key inválida ou ausente
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Scope insuficiente para esta operação
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Chave de API obtida no dashboard

````