Pular para o conteúdo principal
PUT
/
api
/
v1
/
agents
/
{agent_id}
/
flow
# Mudar para o modo llm_driven
curl -X PUT "https://app.talkover.ai/api/v1/agents/agent-uuid/flow" \
  -H "Authorization: Bearer talq_your_environment_token_here" \
  -H "Content-Type: application/json" \
  -d '{ "conversation_mode": "llm_driven" }'
{
  "success": true,
  "data": {
    "conversation_mode": "flow_driven",
    "flow_config": { ... }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.talkover.ai/llms.txt

Use this file to discover all available pages before exploring further.

Atualizar Fluxo do Agente

Atualiza o modo de conversação de um agente e (quando aplicável) a configuração estruturada do fluxo. Submeter um fluxo inválido retorna um 422 com detalhes — use Validar Fluxo do Agente para executar a validação em modo de teste antes de salvar.

Endpoint

PUT /api/v1/agents/{agent_id}/flow

Parâmetros de Caminho

agent_id
string
obrigatório
UUID do agente.

Cabeçalhos da Requisição

Authorization
string
obrigatório
Token Bearer para autenticação. Formato: Bearer talq_your_environment_token_here
Content-Type
string
obrigatório
Deve ser definido como application/json

Corpo da Requisição

conversation_mode
string
obrigatório
Modo de conversação. Opções:
  • llm_driven — conversa guiada por LLM (conhecimento + ações). Envie flow_config: null ou omita.
  • flow_driven — guiado por grafo de nós. flow_config é obrigatório.
flow_config
object
Definição do fluxo. Obrigatório quando conversation_mode é flow_driven.

Exemplos

# Mudar para o modo llm_driven
curl -X PUT "https://app.talkover.ai/api/v1/agents/agent-uuid/flow" \
  -H "Authorization: Bearer talq_your_environment_token_here" \
  -H "Content-Type: application/json" \
  -d '{ "conversation_mode": "llm_driven" }'

Resposta

{
  "success": true,
  "data": {
    "conversation_mode": "flow_driven",
    "flow_config": { ... }
  }
}

Respostas de Erro

422 — Fluxo Inválido

{
  "success": false,
  "message": "Flow validation failed",
  "errors": [
    "initial_node_id 'node-greet' not found in nodes",
    "Node 'node-qualify' references unknown next node 'node-bookx'"
  ]
}

Observações

  • Atualizar o fluxo não altera o status do agente — mas agentes publicados precisam ser republicados se a alteração no fluxo for incompatível (breaking).
  • Veja Listar Versões do Fluxo para acompanhar configurações históricas.