Skip to main content
Agents are advanced AI systems that can reason, plan, and use tools to accomplish complex tasks. In Flowise, agents combine large language models with tools to create autonomous systems that can break down problems and execute multi-step solutions.

What are Agents?

Agents are LLM-powered systems that can:
  • Reason about problems and decide which actions to take
  • Use Tools to interact with external systems and APIs
  • Maintain Memory of previous interactions and context
  • Iterate on solutions until a task is complete
Unlike simple LLM chains that follow a predetermined path, agents dynamically decide their next action based on previous results and the current context.

How Agents Work

1

Receive Input

The agent receives a user query or task.
2

Reason & Plan

The LLM analyzes the input and determines which tool(s) to use.
3

Execute Action

The agent calls the selected tool with appropriate parameters.
4

Observe Result

The tool’s output is returned to the agent.
5

Decide Next Step

The agent decides whether to:
  • Use another tool
  • Return a final answer
  • Ask for clarification
This loop continues until the agent reaches a conclusion or hits a maximum iteration limit.

Available Agents

Flowise provides several agent types, each optimized for different use cases:

LangChain Agents

Tool Agent

Modern agent using function calling for reliable tool execution

ReAct Agent (Chat)

Chat-optimized agent using the ReAct (Reasoning + Acting) framework

ReAct Agent (LLM)

Traditional ReAct agent for completion-based models

Conversational Agent

Agent optimized for natural conversations with tool access

Specialized Agents

OpenAI Assistant

Use OpenAI’s Assistants API with built-in tools

XML Agent

Claude-optimized agent using XML formatting

CSV Agent

Specialized agent for querying and analyzing CSV data

Retrieval Agent

Agent with built-in document retrieval capabilities

Autonomous Agents

AutoGPT

Autonomous agent that can plan and execute complex tasks

BabyAGI

Task-driven autonomous agent with goal decomposition

LlamaIndex Agents

OpenAI Tool Agent

LlamaIndex agent optimized for OpenAI models

Anthropic Agent

LlamaIndex agent optimized for Claude models

Core Components

Every agent in Flowise requires these core components:
model
BaseChatModel
required
The language model that powers the agent’s reasoning.Supported Models:
  • ChatOpenAI (GPT-3.5, GPT-4)
  • ChatAnthropic (Claude)
  • ChatGoogleGenerativeAI (Gemini)
  • Other compatible chat models
tools
Tool[]
required
Array of tools the agent can use to accomplish tasks.Examples: Calculator, Web Browser, API tools, Custom tools
memory
BaseChatMemory
required
Memory system to maintain conversation history and context.Types: Buffer Memory, Summary Memory, Entity Memory

Optional Parameters

maxIterations
number
Maximum number of tool calls the agent can make.Default: Varies by agent typeTip: Set this to prevent infinite loops in complex scenarios
systemMessage
string
Instructions that define the agent’s personality and behavior.
You are a helpful research assistant. You have access to web search 
and calculation tools. Always cite your sources when providing information.

Agent Frameworks Explained

ReAct (Reasoning + Acting)

The ReAct framework alternates between reasoning and acting:
Thought: I need to search for information about Flowise
Action: web_search
Action Input: "Flowise AI workflow tool"
Observation: Flowise is an open-source UI visual tool...
Thought: Now I have the information needed
Final Answer: Flowise is an open-source UI visual tool...
Best for: General-purpose tasks, clear reasoning trails

Function Calling (Tool Agent)

Modern agents use native function calling APIs:
{
  "tool_calls": [
    {
      "name": "calculator",
      "arguments": {"expression": "15 * 7"}
    }
  ]
}
Best for: Reliable tool execution, structured outputs

XML Format (Claude)

Claude-optimized agents use XML for structured thinking:
<thinking>
  I need to calculate the result first
</thinking>
<function_calls>
  <invoke name="calculator">
    <expression>15 * 7</expression>
  </invoke>
</function_calls>
Best for: Complex reasoning with Claude models

Common Use Cases

Tools: Web Search, Calculator, Document RetrievalExample Tasks:
  • Answer questions by searching the web
  • Perform calculations on found data
  • Retrieve relevant documents from a knowledge base
Recommended Agent: Tool Agent or ReAct Agent
Tools: CSV Query, Calculator, Plotting ToolExample Tasks:
  • Query CSV files to extract insights
  • Perform statistical calculations
  • Generate visualizations
Recommended Agent: CSV Agent or Tool Agent
Tools: Knowledge Base Retrieval, Ticket API, Email ToolExample Tasks:
  • Answer questions from documentation
  • Create support tickets
  • Send follow-up emails
Recommended Agent: Conversational Retrieval Agent
Tools: API integrations, File operations, NotificationsExample Tasks:
  • Automate multi-step workflows
  • Integrate with external systems
  • Send notifications based on conditions
Recommended Agent: AutoGPT or BabyAGI

Best Practices

Agent Design Tips
  1. Clear Instructions: Provide detailed system messages that explain the agent’s role
  2. Appropriate Tools: Give agents only the tools they need for their task
  3. Set Limits: Use maxIterations to prevent runaway costs
  4. Test Thoroughly: Agents can be unpredictable; test with various inputs
  5. Monitor Usage: Track tool calls and token consumption
Common Pitfalls
  • Too Many Tools: Agents perform better with focused tool sets (5-10 tools max)
  • Vague Instructions: Unclear system messages lead to poor decisions
  • No Guardrails: Always set maxIterations to prevent infinite loops
  • Wrong Agent Type: Match the agent framework to your LLM (e.g., XML Agent for Claude)

Agent vs Chain: When to Use What

Use Agents WhenUse Chains When
Task requires dynamic decision-makingWorkflow is predictable and linear
Multiple tools neededSingle operation needed
Solution path is unclearYou know the exact steps
Autonomy is beneficialYou want deterministic behavior

Performance Considerations

Optimization Strategies
  • Model Selection: Use faster models (GPT-3.5) for simple tasks, advanced models (GPT-4) for complex reasoning
  • Tool Descriptions: Write clear, concise tool descriptions to help the agent choose correctly
  • Streaming: Enable streaming for better user experience during long-running tasks
  • Caching: Cache tool results when appropriate to reduce redundant calls

Monitoring and Debugging

To debug agent behavior:
  1. Enable Verbose Mode: Set DEBUG=true in environment variables
  2. Check Iterations: Monitor how many steps the agent takes
  3. Review Tool Calls: Examine which tools were called and with what parameters
  4. Analyze Reasoning: Read the agent’s thought process in verbose logs

Security Considerations

Security Best Practices
  • Validate Tool Inputs: Always validate and sanitize tool inputs
  • Limit Tool Access: Don’t give agents access to destructive operations without safeguards
  • Monitor Behavior: Log and review agent actions, especially in production
  • Input Moderation: Use input moderation to prevent prompt injection
  • Rate Limiting: Implement rate limits to prevent abuse

Next Steps

Tool Agent

Learn about the recommended agent for most use cases

Tools Overview

Explore available tools for your agents

Custom Tools

Create custom tools for specialized tasks

Memory Systems

Understand agent memory options

Build docs developers (and LLMs) love