> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xpertai.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 🔀 Workflow

**AI Workflow** is the core feature of the Xpert AI platform, designed to support developers in quickly building, debugging, and deploying complex multi-agent collaboration systems through visual orchestration and dynamic execution mechanisms.

The core innovation of the Xpert AI workflow lies in its **hybrid architecture of agents and workflows**, which essentially balances flexibility and efficiency by dynamically adapting to the autonomous needs of different nodes.

![hybrid architecture](https://mintcdn.com/xpertai/CUk-Ab9Rv7YWeJmd/public/img/ai/agent-workflow-hybrid-architecture.png?fit=max\&auto=format\&n=CUk-Ab9Rv7YWeJmd\&q=85\&s=c960141def017f4d9de7320de62a2ce6)

1. **Agent Mode** (High Autonomy Nodes)
   * **Use Cases**: Tasks requiring complex decision-making and free-form LLM involvement (e.g., open-ended conversations, creative generation).
   * **Features**: Autonomous reasoning based on LLM, capable of dynamically invoking tools and adjusting strategies to adapt to uncertainties.

2. **Workflow Mode** (Low Autonomy Nodes)
   * **Use Cases**: Structured processes and tasks with clear rules (e.g., data cleaning, API calls).
   * **Features**: Predefined standardized operation chains to ensure execution efficiency and controllability.

3. **Hybrid Collaboration Mechanism**
   * **Dynamic Switching**: Seamless transition between agent and workflow nodes within the same process (e.g., an agent first understands and communicates user needs, then triggers the corresponding workflow to complete the task).
   * **State Sharing**: Data is passed through unified state channels to avoid architectural fragmentation.

**Typical Application Example**: E-commerce Customer Service Scenario

```plaintext theme={null}
[User Query] → Workflow Node → Structured Parsing → Agent Node → Intent Reasoning → Branch Judgment  
                          ↑ ↓  
Workflow Node ← If Inventory Check Needed → Workflow Node → Call Database API → Agent Node → Generate Natural Language Response  
```

Through the hybrid architecture, the stability of database queries is ensured while retaining the flexibility of response generation, with the overall process automatically evolving via state channels.

## Explore Detailed Technical Points

* [**Agent**](https://docs.xpertai.cn/en/ai/agent/workflow/agent.md)
* [**Agent Workflow**](https://docs.xpertai.cn/en/ai/agent/workflow/agent-workflow.md)
* [**External Digital Expert**](https://docs.xpertai.cn/en/ai/agent/workflow/external.md)
* [**Session Variables**](https://docs.xpertai.cn/en/ai/agent/workflow/variables.md)
* [**Execution Endpoints**](https://docs.xpertai.cn/en/ai/agent/workflow/terminal.md)
* [**Error Handling**](https://docs.xpertai.cn/en/ai/agent/workflow/error-handling.md)
* [**Logic Branches**](https://docs.xpertai.cn/en/ai/agent/workflow/if-else.md)
* [**Iterating**](https://docs.xpertai.cn/en/ai/agent/workflow/iterating.md)
* [**Subflow**](https://docs.xpertai.cn/en/ai/agent/workflow/subflow.md)
* [**Answer**](https://docs.xpertai.cn/en/ai/agent/workflow/answer.md)
* [**Knowledge Retrieval**](https://docs.xpertai.cn/en/ai/agent/workflow/knowledge.md)
* [**Code Execution**](https://docs.xpertai.cn/en/ai/agent/workflow/code.md)
* [**Template Transformation**](https://docs.xpertai.cn/en/ai/agent/workflow/template.md)
* [**Variable Assigner**](https://docs.xpertai.cn/en/ai/agent/workflow/assigner.md)
* [**HTTP Request**](https://docs.xpertai.cn/en/ai/agent/workflow/http.md)
* [**Tool Invocation**](https://docs.xpertai.cn/en/ai/agent/workflow/tool.md)
* [**Question Classifier**](https://docs.xpertai.cn/en/ai/agent/workflow/classifier.md)
* [**Note**](https://docs.xpertai.cn/en/ai/agent/workflow/note.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.