maxluz
10/03/2025, 12:30 PMAI Evy
10/03/2025, 12:30 PMAI Evy
10/03/2025, 12:30 PMjavascript
{
"id": "start",
"type": "conversation",
"instruction": {
"type": "prompt",
"text": "Greet the customer and ask how you can help them."
},
"edges": [
{
"id": "edge_1",
"transition_condition": {
"type": "prompt",
"prompt": "Customer wants to book appointment"
},
"destination_node_id": "book_appointment"
}
]
}
When you send messages using the create chat completion endpoint [(2) ]() , the conversation flow should evaluate the transition conditions and move to the appropriate next node. If your bot is stuck in the first node, check that:
1. Your conversation flow has properly defined edges with transition conditions [(1) ]()
2. The transition conditions are specific enough to match user responses
3. Your destination node IDs are correctly referenced
The create chat completion API automatically manages conversation history [(2) ]() , so the issue is likely in the conversation flow configuration rather than the API usage itself.AI Evy
10/03/2025, 12:30 PMAI Evy
10/03/2025, 12:30 PMmaxluz
10/03/2025, 12:31 PMmaxluz
10/03/2025, 12:31 PMAI Evy
10/03/2025, 12:31 PMAI Evy
10/03/2025, 12:31 PMtransition_condition.prompt field, not just the presence of a user response . The transition condition needs to match specific language patterns or content criteria rather than simply detecting that a user has responded .
For your conversation flow to advance properly, you should make your transition condition more specific and declarative . Instead of "the user responds," consider using conditions like:
- "User has provided their name"
- "User has answered the question"
- "User has given any response to proceed"
The transition evaluation happens after the user's response, and the LLM uses the prompt in transition_condition.prompt to determine if the edge should trigger . A generic condition like "the user responds" may not provide enough specificity for the LLM to reliably trigger the transition .
If your agent still isn't transitioning properly after making the condition more specific, ensure that your transition conditions are concise, declarative, and match actual language patterns the user would say .AI Evy
10/03/2025, 12:32 PMAI Evy
10/03/2025, 12:32 PMmaxluz
10/03/2025, 12:34 PMAI Evy
10/03/2025, 12:35 PMAI Evy
10/03/2025, 12:35 PMtranscript field that should contain the full conversation history in this format :
"transcript": "Agent: hi how are you doing?\nUser: Doing pretty well. How are you?\nAgent: That's great to hear! I'm doing well too, thanks! What's up?\nUser: I don't have anything in particular.\nAgent: Got it, just checking in!\nUser: Alright. See you.\nAgent: have a nice day\n"
Additionally, the response includes a message_with_tool_calls array that provides more detailed message information :
"message_with_tool_calls": [
{
"message_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
"role": "agent",
"content": "hi how are you doing?",
"created_timestamp": 1703302428855
}
]
If your API request messages aren't appearing in the chat history, this could indicate an issue with how the messages are being processed or stored. According to a Discord discussion, when API calls to conversation flow agents return empty messages, it often means the API call reaches a flow node with missing context or no valid next step [(2) ]() .
You should verify that your chat session is properly active and that all required variables are being passed correctly .AI Evy
10/03/2025, 12:35 PMAI Evy
10/03/2025, 12:35 PM