Skip to main content

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.

ConceptDescriptionYAML Configuration
StateA phase of conversation (for example, greeting or information gathering)name, kind: StateConfig
Initial StateStarting point of the interactioninit_state: true
State LogicDefines what the agent does during this stagedescription
Available ToolsActions the agent can performavailable_tools
ProcessOverall business scenarioprocess_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.

FunctionalityRequired Tools
Basic ChatSendChatMessage, FinishSession
Knowledge BaseSingleSearchFAQ
Operator HandoffSuggestChatMessage, TransferToTheOperatorSkill
NotificationsCustom 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 AreaDefinesPurpose
IdentityWho the agent isIdentity establishes role, expertise, and how the agent presents itself to customers
TaskWhat the agent must achieveTask defines objectives and operational boundaries
WorkflowHow the agent behavesWorkflow 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