> For the complete documentation index, see [llms.txt](https://docs.wem.io/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wem.io/platform/wemmodeler/agentic-ai/ai-flowchart-nodes.md).

# AI Flowchart Nodes

## The AI Conversation Node ![](/files/WRAZE0gBKcNy1axnPiui)

<div><figure><img src="/files/WgktSGzu5Qm8pRltyiTL" alt=""><figcaption></figcaption></figure> <figure><img src="/files/i3IJoGHvg8ymCIW2rk68" alt="" width="375"><figcaption></figcaption></figure></div>

With this new node on your Modeler Palette, you can enable your application to start up a new conversation or send messages to existing conversations with an AI Agent. Each interaction with an Agent is part of a conversation with its own context. So each user interacting with an Agent starts up their own conversation and its own context first, this makes sure users can not access each others conversational context.&#x20;

To start up a conversation, the AI Agent Conversation node is used, this node gives two options when used in the flowchart.&#x20;

* **Create conversation**: \
  This is a required step to set up the conversation between user and Agent.&#x20;
* **Invoke agent**: \
  triggers the AI agent to act on a prompt without requiring a user-facing chat box, allowing flowcharts to drive agent activity directly. Useful for back-end processing, data analysis, or automated decision-making.
* **Send message**: \
  Send a prompt or message to an Agent without the user's interaction. This can be used to invoke an Agent's function for example.&#x20;

### Create conversation (Start Agent) ![](/files/dLrSKLZvLqrcqn8LV0br)

Creating a conversation is essential for the first time a user interacts with an Agent. This conversation establishes the conversational context using the context fields from the Agent's properties, which can be set as part of the create conversation node. Each time a conversation is created, it is specific to that user. When the user returns to the conversation, it needs to be started up again, but it will use the same context.

#### Properties:

* **Conversation ID**: This will be used to store the created conversations ID, allowing you to go back to this conversation or use this conversation ID in the other ai nodes and components.&#x20;
* **Exits**&#x20;
  * **Default:** used when the conversation is successfully created.
  * **Error:** used when issues arise during the creation.&#x20;
* **Assign Context**: This button opens the Assign context overlay, here you can set the values of the Agent's conversational context fields.&#x20;

### Invoke agent ![](/files/r6LHlj4DWN7bykvtxHrd)

The Invoke agent node sends a prompt to an AI agent and triggers it to act on that prompt, without needing a chat box or any direct user interaction. Where the **Send message** node is typically tied to a user-driven conversation, the Invoke agent node is used by the application itself to drive the agent: useful for processing data in the background, asking the agent to summarise or classify content, calling agent functions on demand, or chaining agent activity into longer workflows. The node can run synchronously (waiting for the agent's response and mapping it back to fields in the data model) or asynchronously (firing the prompt and continuing the flowchart immediately, where the execution of a agents function flow is the response.&#x20;

### Properties

* **Conversation ID**: The conversation the prompt should be sent to. This can be either an **AI agent conversation** field or a text field containing a conversation ID. If left empty, the node will create a new conversation on the fly using the agent's default context.
* **Prompt:** The text instruction sent to the agent. This is a static text or expression — typically describing what you want the agent to do in this invocation (e.g. "Summarise the case notes and assign a priority"). As this is a static text it will protect the conversation from prompt injection through user input.&#x20;
* **Edit payload:** Allows you to attach structured data to the prompt as JSON. Uses the same JSON  overlay as the import/export JSON wizard. The agent receives this payload alongside the prompt, which is useful when the agent needs to act on specific records or values from the application without you having to embed them into the prompt text.
* **Attach files:** Allows you to attach files from the application (e.g. uploaded documents, generated PDFs) to the invocation. The agent can read or reference these files when responding, in addition to any persistent file sources configured on the agent itself.
* **Wait for response:** When enabled, the application pauses on this node until the agent has finished responding. The response can then immediately be used for the rest of the flow. When disabled, the prompt is sent asynchronously and the flow continues without waiting for a response. This means the response cannot be used by the current flow and should be in the form of executing a agent function flow. Use asynchronous mode for fire-and-forget tasks where the user shouldn't have to wait.&#x20;
* **Exits**:
  * **Default**: Used when the message is successfully sent and a response is received.
  * **Agent busy:**&#x20;
  * **Error**: Used when issues arise during the message sending process.

### Send message (Prompt Agent) ![](/files/zaDWmWP0YHfgHVoM17Gn)

The Send Message node is used when the application needs to send a message to the Agent or invoke a function on the Agent, without requiring user interaction. This node allows for interaction with the Agent within an established conversation.

**Properties**

* **Conversation ID Expression Field (Text)**: The conversation the prompt should be sent to. This can be either an **AI agent conversation** field or a text field containing a conversation ID. If left empty, the node will create a new conversation on the fly using the agent's default context.
* **Message Expression Field (Text)**: This field contains the text of the message to be sent to the Agent.
* **Attach files:** Allows you to attach files from the application (e.g. uploaded documents, generated PDFs) to the invocation. The agent can read or reference these files when responding, in addition to any persistent file sources configured on the agent itself.
* **Wait for response:** When enabled, the application pauses on this node until the agent has finished responding. The response can then immediately be used for the rest of the flow. When disabled, the prompt is sent asynchronously and the flow continues without waiting for a response. This means the response cannot be used by the current flow and should be in the form of executing a agent function flow. Use asynchronous mode for fire-and-forget tasks where the user shouldn't have to wait.&#x20;
* **Response Message Datafield (Data Model Field)**: This field captures the Agent's response, storing it within the application's data model. This can then be processed in the rest of the flowchart.&#x20;
* **Exits**:
  * **Default**: Used when the message is successfully sent and a response is received.
  * **Error**: Used when issues arise during the message sending process.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.wem.io/platform/wemmodeler/agentic-ai/ai-flowchart-nodes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
