Workflow Configuration
The Workflow section defines how the AI agent manages conversation flow. It uses a state-machine model, where conversations are divided into states. Each state determines available actions, accessible tools, and transitions between conversation stages.
Workflow Concepts and Configuration
In Flametree, conversations are managed through a state-based workflow. Each conversation progresses through one or more states, where the agent follows defined instructions and gains access to specific tools.
The table below shows how conceptual workflow elements map to their YAML configuration.
| Concept | Description | YAML Configuration |
|---|---|---|
| State | A phase of conversation (for example, greeting or information gathering) | name, kind: StateConfig |
| Initial State | Starting point of the interaction | init_state: true |
| State Logic | Defines what the agent does during this stage | description |
| Available Tools | Actions the agent can perform | available_tools |
| Process | Overall business scenario | process_name |
For more details about Workflow configuration, please refer to the Workflow section of the documentation.
Example State Configuration
- process_name: SalesProcess
name: SalesSupport
kind: StateConfig
init_state: true
description: |
- Answer questions about hardware
- Collect contact info
- Offer call scheduling if customer is interested
- Use FAQ and Knowledge Base when relevant
available_tools:
SingleStatefulOutboundAgent:
- SendChatMessage
- FinishSession
- SingleSearchFAQ
Workflow Editor Behavior
When editing workflow YAML, be aware of the following editor-specific behaviors.
Comment highlighting
Comments (#) starting from the 4th character onward may not appear highlighted in green. Placing the comment at the beginning of a line restores syntax highlighting. This is a visual limitation of the editor and does not affect execution.
Saving behavior
If the workflow YAML contains a syntax error, pressing Save discards all unsaved changes and restores the last valid version of the configuration. Always validate YAML syntax in an external editor before saving.
Required Tools by Functionality
Tools define what actions an AI agent can perform during a conversation, such as sending messages, retrieving information, or ending a session. In a workflow, tools are explicitly assigned to states, which determines which capabilities are available to the agent at each stage of interaction.
| Functionality | Required Tools |
|---|---|
| Basic Chat | SendChatMessage, FinishSession |
| Knowledge Base | SingleSearchFAQ |
| Operator Handoff | SuggestChatMessage, TransferToTheOperatorSkill |
| Notifications | Custom tools for email/SMS integration |
How Workflow Differs from Other Configuration Areas
The workflow works together with the Identity and Task sections of an AI agent, but it serves a different purpose.
| Configuration Area | Defines | Purpose |
|---|---|---|
| Identity | Who the agent is | Identity establishes role, expertise, and how the agent presents itself to customers |
| Task | What the agent must achieve | Task defines objectives and operational boundaries |
| Workflow | How the agent behaves | Workflow controls conversation flow, decisions, and tool usage |
Basic Single-State Workflow Example
Workflows may consist of a single state for simple agents or multiple states for more complex interaction scenarios.
- process_name: SalesProcess
name: SalesSupport
kind: StateConfig
init_state: true
description: |
- Answer questions about products
- Collect contact info
- Offer call scheduling if the customer is interested
- Use FAQ and Knowledge Base when relevant
available_tools:
SingleStatefulOutboundAgent:
- SendChatMessage
- FinishSession
- SingleSearchFAQ