# 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" }'
# Definir uma configuração flow-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": "flow_driven",
"flow_config": {
"initial_node_id": "node-greet",
"meta": { "name": "Intake v1", "version": "1.0.0" },
"nodes": [
{ "id": "node-greet", "type": "say", "content": "Hi!", "next": "node-end" },
{ "id": "node-end", "type": "end" }
],
"global_functions": [
{ "name": "end_conversation", "description": "Ends the call" }
]
}
}'
{
"success": true,
"data": {
"conversation_mode": "flow_driven",
"flow_config": { . }
}
}
Fluxo de Conversação
Atualizar Fluxo do Agente
Atualizar o modo de conversação e a configuração de fluxo de um agente
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" }'
# Definir uma configuração flow-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": "flow_driven",
"flow_config": {
"initial_node_id": "node-greet",
"meta": { "name": "Intake v1", "version": "1.0.0" },
"nodes": [
{ "id": "node-greet", "type": "say", "content": "Hi!", "next": "node-end" },
{ "id": "node-end", "type": "end" }
],
"global_functions": [
{ "name": "end_conversation", "description": "Ends the call" }
]
}
}'
{
"success": true,
"data": {
"conversation_mode": "flow_driven",
"flow_config": { . }
}
}
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
string
obrigatório
UUID do agente.
Cabeçalhos da requisição
string
obrigatório
Token Bearer para autenticação. Formato:
Bearer talq_your_environment_token_herestring
obrigatório
Deve ser definido como
application/jsonCorpo da requisição
string
obrigatório
Modo de conversação. Opções:
llm_driven— conversa guiada por LLM (conhecimento + ações). Envieflow_config: nullou omita.flow_driven— guiado por grafo de nós.flow_configé obrigatório.
object
Definição do fluxo. Obrigatório quando
conversation_mode é flow_driven.Mostrar objeto flow_config
Mostrar objeto flow_config
string
obrigatório
ID do nó de entrada. Deve referenciar um nó existente em
nodes.object
Metadados opcionais:
{ "name": "string", "version": "string" }.array
obrigatório
Array de objetos de nó. Cada nó tem no mínimo:
id (string, único), type (say, ask, decision, action, transfer, end), e campos específicos do tipo (content, next, branches, etc.).array
Funções invocáveis a partir de qualquer nó. Entradas comuns:
end_conversation, transfer_call, repeat_question.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" }'
# Definir uma configuração flow-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": "flow_driven",
"flow_config": {
"initial_node_id": "node-greet",
"meta": { "name": "Intake v1", "version": "1.0.0" },
"nodes": [
{ "id": "node-greet", "type": "say", "content": "Hi!", "next": "node-end" },
{ "id": "node-end", "type": "end" }
],
"global_functions": [
{ "name": "end_conversation", "description": "Ends the call" }
]
}
}'
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.
Esta página foi útil?