Skip to content

Commit d22761f

Browse files
authored
Add AI Condition page and more details on Logic Condition (#308)
* add AI condition page and more details on logic condition * info * add Assistant node page
1 parent c75005b commit d22761f

File tree

6 files changed

+58
-22
lines changed

6 files changed

+58
-22
lines changed

fern/docs.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,16 +239,18 @@ navigation:
239239
path: workflows/nodes/gather.mdx
240240
- page: API Request
241241
path: workflows/nodes/api-request.mdx
242+
- page: Assistant
243+
path: workflows/nodes/assistant.mdx
242244
- page: Transfer
243245
path: workflows/nodes/transfer.mdx
244246
- page: Hangup
245247
path: workflows/nodes/hangup.mdx
246-
247248
- section: Edges
248249
contents:
249250
- page: Logical Conditions
250251
path: workflows/edges/logical-conditions.mdx
251-
252+
- page: AI Conditions
253+
path: workflows/edges/ai-conditions.mdx
252254
- section: Squads
253255
path: squads.mdx
254256
contents:
66.3 KB
Loading
Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,29 @@
11
---
22
title: AI Conditions
3-
subtitle: Dynamic AI-driven branching in workflows
3+
subtitle: Smart workflow branching powered by AI
44
slug: /workflows/edges/ai-conditions
55
---
66

77
## Overview
88

9-
The **AI Conditions** feature leverages artificial intelligence to determine the next step in your workflow based on conversation context. Unlike traditional logical conditions—which rely on explicit rules—AI Conditions allow your voice agent to evaluate complex or ambiguous scenarios, making branching decisions dynamically.
9+
AI Conditions use artificial intelligence to decide the next step in your workflow based on the conversation. Instead of using fixed rules, they can understand complex situations and make smart decisions in real-time.
1010

1111
## How It Works
1212

13-
- **Contextual Evaluation:** The AI considers data from previous steps (e.g., user input, API responses) to gauge the conversation context.
14-
- **Adaptive Decision-Making:** It uses its judgment to choose the most appropriate branch without relying solely on fixed comparisons.
15-
- **Seamless Integration:** AI Conditions can complement existing logical conditions, offering a balance between predictable rules and adaptive behavior.
13+
1. The AI looks at the conversation history and context
14+
2. It makes a smart decision about which path to take, based on variables collected from Gather verbs and data returned from API requests.
15+
3. Works alongside your existing rules for maximum flexibility
1616

17-
## Configuration
1817

19-
- **Activation:** Enable AI Conditions on a condition node where you want the AI to drive the branching logic.
20-
- **Context Input:** The AI will utilize variables collected from Gather verbs and data returned from API requests.
21-
- **Decision Logic:** No manual rules are required—the AI interprets context in real time to select the optimal branch.
22-
- **Fallback:** You can combine AI Conditions with traditional logical conditions for added control.
18+
## Configuration
19+
- **Condition Node:** Start by inserting a condition node into your workflow.
20+
- **Branch Setup:** Attach one or more nodes to the condition node.
21+
- **AI Tag:** Click on the connecting edge and choose `AI` from the `Condition Type` dropdown
22+
- **AI Condition** Use the input to define when the chosen branch should be taken.
2323

2424
## Usage
2525

26-
Deploy AI Conditions when your workflow requires flexibility and context-sensitive decision-making, such as:
27-
28-
- Handling ambiguous or multi-faceted user responses.
29-
- Addressing scenarios where strict rules may not capture the conversation's nuances.
30-
- Enhancing the user experience by providing more natural, human-like interactions.
31-
32-
For detailed configuration instructions and best practices, please refer to our dedicated documentation on AI-driven workflows.
26+
Use AI Conditions when you need:
27+
- To handle unclear or complex user responses
28+
- More flexibility than traditional rules can provide
29+
- More natural, human-like conversations

fern/workflows/edges/logical-conditions.mdx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,22 @@ Logical Conditions enable you to create branching paths within your workflow. Th
1212

1313
- **Condition Node:** Start by inserting a condition node into your workflow.
1414
- **Branch Setup:** Attach one or more nodes to the condition node.
15-
- **Logic Tag:** Click the "Logic" tag on each connecting edge to define rules or comparisons (e.g., equals, greater than) using variables collected from previous steps.
15+
- **Logic Tag:** Click the "Logic" tag on each connecting edge and select `Logic` from the `Condition Type` dropdown.
16+
- **Condition Type:** Choose between requiring ALL conditions to be met (AND logic) or ANY condition to be met (OR logic)
17+
- **Logic Conditions** Use the panel to define one or more rules or comparisons (e.g., equals, greater than) using variables collected from previous steps.
18+
19+
<Note>
20+
To remove a comparison, click on the Trash icon to the right of the comparison.
21+
</Note>
22+
23+
<Frame>
24+
<img src="../../static/images/workflows/logic-condition.png" />
25+
</Frame>
1626

1727
## Usage
1828

1929
Implement Logical Conditions to guide your conversation dynamically. They allow your workflow to adjust its path based on real-time data, ensuring more personalized and responsive interactions.
2030

21-
For detailed configuration instructions and advanced usage, please refer to our dedicated documentation on condition configuration.
31+
<Note>
32+
When [`Gathering`](/workflows/nodes/gather) string values that will be used in conditions, consider using `enum` types to ensure consistent value comparison. This helps prevent issues with case sensitivity, whitespace, or formatting differences that could affect condition evaluation.
33+
</Note>

fern/workflows/nodes/assistant.mdx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: Assistant
3+
subtitle: Speak to a configured assistant
4+
slug: /workflows/nodes/assistant
5+
---
6+
7+
## Overview
8+
9+
The **Assistant** node enables a persistent conversation with one of your configured assistants.
10+
11+
## Configuration
12+
13+
- **Select an Assistant** Use the dropdown to select a pre-configured assistant.
14+
15+
## Usage
16+
17+
Add **Assistant** nodes as leaf nodes to enable ongoing conversations with your configured assistants. Currently, Assistant nodes must be placed at the end of a workflow branch, as they don't support transitioning to other nodes. This means the conversation with the assistant will continue until either the user ends the call or the assistant reaches a natural conclusion point.
18+
19+
The assistant will use its configured system prompt while inheriting the transcriber and voice settings from the global workflow assistant.
20+
21+
<Note>
22+
Assistant nodes are currently designed as terminal nodes - they cannot be connected to other nodes in the workflow. This means the conversation will remain with the assistant until the call ends. Future updates will add support for AI-powered conditional branching.
23+
</Note>

fern/workflows/nodes/gather.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@ Define one or more variables to gather from the user with:
2020

2121
Use **Gather** to extract specific details from user responses—such as their name, email, or ZIP code—to inform subsequent steps in your conversation. The Gather node doesn't directly prompt users; instead, it analyzes the conversation history to find the requested information and will ask follow-up questions if the user's response isn't clear. Make sure to precede it with a [`Say`](/workflows/nodes/say) node that explicitly prompts the user for the information you want to gather.
2222

23-
To use an extracted string variable in a [`Conditional`](/workflows/edges/logical-conditions) branch, we recommend using the `enum` option. This ensures the extracted value will reliably match your conditions later in the workflow.
23+
<Note>
24+
To use an extracted string variable in a [`Conditional`](/workflows/edges/logical-conditions) branch, we recommend using the `enum` option. This ensures the extracted value will reliably match your conditions later in the workflow.
25+
</Note>

0 commit comments

Comments
 (0)