Aller au contenu principal

Flows and Nodes

With Nodes, you can constrain an agent with specific instructions, static texts and actions depending on the context of the conversation and the user's inputs.

A Node can be simplified as "When the user asks this, then I must do that.".

Moreover nodes can be connected with each other to construct a flow for a process or a conversation.

In other words, a Node can say "After I done that, I must do this or that." if it guide the agent into specific subsequent nodes as part of a flow.


For instance, let's say we want to create a flow to guide the user into registering into an application via an email (using an AVATAR_registerUser tool).

We start with a Node that starts the flow when the users express the intention to register on the platform.

const startNode = {
entrypoints: {
intents: ['The user wants to register on the AVATAR platform.'],
},
contents: {
instructions: 'You need the email of the user to perform the registration.',
},
exits: {
nodes: []
}
}

Then we can create a Node that check if the user provided an email or not.