---
title: "Criar agente de IA"
method: POST
path: "/api/management/ai/agents"
tags: ["ai-agents", "agents"]
---

# Criar agente de IA

`POST /api/management/ai/agents`

Cria um agente de IA. No modo manual (padrão) informe `name`, `description`, `default_provider` e `default_model`; `tools` aceita apenas os nomes devolvidos pelo endpoint de ferramentas disponíveis. Com `auto_generate: true` basta enviar `description`: o sistema redige nome, prompt base, ferramentas e os contextos iniciais do agente, e nesse modo a criação respeita o limite de agentes contratado, respondendo 402 quando ele já foi atingido.

## Request body

- object
  - `base_prompt` string
  - `default_model` string
  - `default_provider` string
  - `description` string
  - `name` string
  - `tools` unknown[]
    - unknown

## Response `200`

Sucesso

- object
  - `response` boolean
  - `agent` object
    - `name` string
    - `description` string
    - `default_model` string
    - `default_provider` string
    - `tools` string[]
    - `base_prompt` string
    - `frame_id` string
    - `created_by` string
    - `updated_at` string, date-time
    - `created_at` string, date-time
    - `id` string

## Other responses

- `402` — Limite de agentes atingido
- `422` — Erro de validação

## Changes

- **2026-09-18** `3202abfa17f9` — 3 info
  - added the media type `application/json` for the response with the status `200`
  - added the non-success response with the status `402`
  - added the non-success response with the status `422`

[Change history](https://skmtc.dev/olie-ai/apis/olie-api/changes/api/management/ai/agents/post.md)

---

[API](https://skmtc.dev/olie-ai/apis/olie-api.md) · [All operations](https://skmtc.dev/olie-ai/apis/olie-api/llms.txt) · [OpenAPI document](https://skmtc.dev/olie-ai/apis/olie-api/revisions/b43a04f35145?raw)
