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

# Using AI agents

> Learn how to integrate and interact with AI agents in your FlowX.AI applications.

Once you've built or configured an AI agent, there are multiple ways to use it in your applications. This guide covers the different integration patterns available.

## Integration options

> [card] [Chat interface](https://docs.flowx.ai/6.x/ai-platform/using-agents/chat-interface.md)
>
> Add conversational AI to your apps with the Chat component

> [card] [BPMN integration](https://docs.flowx.ai/6.x/ai-platform/using-agents/bpmn-integration.md)
>
> Trigger agents from workflow nodes

> [card] [REST API](https://docs.flowx.ai/6.x/docs/api/start-process/start-by-process-name.md)
>
> Call agents programmatically via API

> [card] [Custom Agent Node](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/custom-agent-node.md)
>
> Use agents within Integration Designer workflows

## Choosing an integration method

| Method | Best for | User interaction |
| - | - | - |
| **Chat interface** | Conversational experiences, Q\&A, guided assistance | Direct user interaction |
| **BPMN integration** | Automated processing, document handling, decisions | Background processing |
| **REST API** | External systems, custom frontends, batch processing | Programmatic access |
| **Custom Agent Node** | Complex integrations, multi-step workflows | Workflow orchestration |

## Common patterns

### Pattern 1: Conversational assistant

Add a chat interface to help users complete complex tasks with AI guidance.

```
User opens app → Chat component loads → User asks questions →
Agent responds → User completes task with guidance
```

**Use cases:** Customer support, employee helpdesk, guided form completion

### Pattern 2: Document processing

Automatically process documents submitted through your application.

```
User uploads document → BPMN triggers agent → Agent extracts data →
Data validated → Process continues with extracted data
```

**Use cases:** Loan applications, claims processing, onboarding

### Pattern 3: Decision support

Provide AI-powered recommendations within business processes.

```
Process reaches decision point → Agent analyzes data →
Recommendation generated → Human reviews and approves/rejects
```

**Use cases:** Credit decisions, risk assessment, fraud detection

### Pattern 4: Content generation

Generate documents, reports, or communications automatically.

```
Process collects data → Agent generates content →
Content reviewed → Document sent/stored
```

**Use cases:** Reports, notifications, contracts, summaries

## Session management

AI agents maintain conversation context through sessions:

| Concept | Description |
| - | - |
| **Session** | A conversation thread between user and agent |
| **Context** | Data and history available to the agent |
| **Persistence** | Sessions can be saved and resumed |
| **Isolation** | Each user/process has separate sessions |

> [!NOTE]
>
> Sessions are automatically managed when using the Chat component. For BPMN and API integrations, you control session lifecycle explicitly.

## Data flow

When using agents, data flows through several stages:

**1. Input preparation**

User input, documents, or process data is formatted for the agent

**2. Agent processing**

The agent processes input using configured workflows and AI models

**3. Response generation**

Agent produces output: text, structured data, or actions

**4. Result handling**

Output is displayed to user, stored, or used to continue the process

## Knowledge bases

Agents can access knowledge bases for context-aware responses:

* **Custom knowledge bases** - Your uploaded documents and data
* **External sources** - Connected via MCP integrations

> [card] [Knowledge Base integration](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/knowledge-base-integration/knowledge-base-overview.md)
>
> Learn how to connect knowledge bases to your agents

## Best practices

> [accordion] Start with clear use cases
>
> Define specific tasks for your agent rather than general-purpose capabilities. Focused agents perform better.

> [accordion] Provide sufficient context
>
> Include relevant process data when calling agents. More context leads to better responses.

> [accordion] Handle errors gracefully
>
> Always include fallback paths for when agents fail or return low-confidence results.

> [accordion] Monitor and iterate
>
> Track agent performance and user feedback. Continuously improve prompts and workflows.

## Related resources

> [card] [Chat interface](https://docs.flowx.ai/6.x/ai-platform/using-agents/chat-interface.md)
>
> Conversational AI integration

> [card] [BPMN integration](https://docs.flowx.ai/6.x/ai-platform/using-agents/bpmn-integration.md)
>
> Workflow-based agent usage

> [card] [Agent Builder](https://docs.flowx.ai/6.x/ai-platform/agent-builder/overview.md)
>
> Create custom agents

> [card] [Developer Agentic Harness](https://docs.flowx.ai/6.x/ai-platform/developer-agentic-harness.md)
>
> Build your app in the Designer by describing changes to an AI agent


## Related topics

- [Knowledge Base integration](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/knowledge-base-integration/knowledge-base-overview.md)
- [Custom Agent node](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/custom-agent-node.md)
- [Using FlowX docs with AI assistants](https://docs.flowx.ai/6.x/docs/getting-started/using-flowx-docs-with-ai.md)
- [Using Knowledge Base in workflows](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/knowledge-base-integration/using-knowledge-base-in-workflows.md)
- [Agent Builder](https://docs.flowx.ai/6.x/ai-platform/agent-builder/overview.md)


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