Skip to main content
Testing and debugging are essential for building reliable chatflows. Flowise provides built-in tools to test, inspect, and troubleshoot your flows.

Testing Your Chatflow

Interactive Chat Interface

The quickest way to test your chatflow is using the built-in chat interface:
1

Open Chat Interface

Click the chat bubble icon in the bottom-right corner of the canvas. This opens a collapsible chat panel.
2

Start a Conversation

  • Type a message and press Enter
  • The message flows through your chatflow
  • Response appears in the chat interface
  • View streaming responses in real-time
3

Test Different Scenarios

Try various inputs to validate behavior:
  • Edge cases (empty input, very long input)
  • Different question types
  • Multi-turn conversations (if using memory)
  • Tool invocations (if using agents)
  • File uploads (if supported)
4

Clear Chat History

Click the eraser icon to reset the conversation and test from a fresh state.
The chat interface uses session storage. Each browser tab has an independent session, useful for testing multiple scenarios simultaneously.

Expanded Chat View

For more detailed testing, use the expanded chat interface:
1

Expand Chat

Click the expand icon (arrows) in the chat panel to open a full-screen dialog.
2

Advanced Features

The expanded view provides:
  • Larger conversation area
  • Message timestamps
  • Better visibility for long responses
  • File upload interface (drag-and-drop)
  • Voice input (if enabled)
  • Response time indicators
3

Monitor Performance

Watch for:
  • Response latency
  • Streaming behavior
  • Error messages
  • Tool execution logs (in agent flows)

Viewing Messages

Access the complete message history for analysis:
1

Open Settings Menu

Click the settings icon (gear) in the chatflow header.
2

View Messages

Select View Messages from the dropdown. This opens a dialog showing:
  • All conversations for this chatflow
  • Message timestamps
  • User and AI messages
  • Session IDs
  • Feedback ratings (if enabled)
3

Filter and Search

  • Filter by date range
  • Search message content
  • Filter by session ID
  • Export to CSV for analysis
Each message includes valuable debugging data:
{
  "chatId": "unique-session-id",
  "role": "user", // or "assistant"
  "content": "What is the weather?",
  "createdDate": "2026-03-03T10:30:00Z",
  "chatflowId": "flow-id",
  "metadata": {
    "sessionId": "user-session-123",
    "chatType": "INTERNAL",
    "sourceDocuments": [...], // For RAG flows
    "agentReasoning": [...] // For agent flows
  }
}

Debugging Techniques

Visual Flow Inspection

Use the canvas to understand data flow:
Ensure connections are valid:
  1. Green connections: Valid, type-compatible
  2. Red/invalid: Type mismatch or missing required input
  3. Orphaned nodes: Not connected to the flow (won’t execute)
  4. Missing inputs: Nodes with unfilled required parameters
Orphaned nodes don’t cause errors but won’t execute. Ensure all nodes are part of the execution path.

Testing Agent Flows

Agent flows require special attention:
1

Enable Agent Reasoning

In the chatflow configuration, enable Show Agent Reasoning to see:
  • Which tools the agent considers
  • Tool selection reasoning
  • Tool execution results
  • Intermediate steps
  • Final answer synthesis
2

Review Tool Descriptions

Poor tool descriptions are the #1 cause of agent failures:Bad: “Calculator”Good: “Useful for performing mathematical calculations. Input should be a valid mathematical expression like ‘2 + 2’ or ‘10 * 5’.”
The LLM uses tool descriptions to decide when and how to call tools. Be explicit about input formats and use cases.
3

Test Tool Execution

Test tools individually:
  1. Ask questions that should trigger specific tools
  2. Verify tool is called with correct parameters
  3. Check tool returns expected results
  4. Confirm agent uses results appropriately
4

Debug Agent Loops

If agent gets stuck in loops:
  • Set Max Iterations parameter (default: 10)
  • Review system message for conflicting instructions
  • Check if tools return valid, parseable output
  • Ensure tool descriptions don’t overlap (agent confusion)

Testing RAG Flows

Retrieval Augmented Generation requires validating both retrieval and generation:
1

Verify Document Upload

  1. Use the Upsert button to upload documents
  2. Check upsert history in settings menu
  3. Verify document count in vector store
  4. Review chunk sizes and overlap settings
2

Test Retrieval Quality

Ask questions and check retrieved documents:
  • Enable Return Source Documents in chain config
  • Review source documents in chat response
  • Verify relevance (right documents retrieved?)
  • Check similarity scores (above 0.7 is good)
3

Tune Retrieval Parameters

Adjust if retrieval is poor:
  • Top K: Number of documents to retrieve (default: 4)
  • Similarity Threshold: Minimum similarity score (0.0-1.0)
  • Chunk Size: Text splitter chunk size (500-1000)
  • Chunk Overlap: Overlap between chunks (50-200)
4

Debug Upsert Issues

If documents aren’t being found:
  • Check vector store credentials
  • Verify embedding model is same for upsert and retrieval
  • Review upsert history for errors
  • Test with simple, direct questions first

Common Issues and Solutions

Symptoms: Chat doesn’t respond, or times out after 120 secondsCauses:
  • API key invalid or quota exceeded
  • Node misconfiguration (missing required params)
  • Network issues or API downtime
  • Infinite loop in agent
Solutions:
  1. Check browser console for errors (F12)
  2. Verify API credentials are valid
  3. Test with simpler model (e.g., gpt-3.5-turbo)
  4. Reduce Max Iterations on agents
  5. Check API status pages (status.openai.com, etc.)
Symptoms: LLM provides incorrect or off-topic responsesCauses:
  • Poor prompt engineering
  • Temperature too high (hallucinations)
  • Wrong documents retrieved (RAG)
  • Tool malfunction (agents)
Solutions:
  1. Review and improve system message/prompt
  2. Lower temperature (0.1-0.3 for factual tasks)
  3. Add few-shot examples in prompts
  4. Check retrieved documents (RAG flows)
  5. Verify tool descriptions (agent flows)
  6. Use more capable model (gpt-4 vs gpt-3.5)
Symptoms: Bot doesn’t remember previous messagesCauses:
  • Memory not connected to chain/agent
  • Different session IDs
  • Chat history cleared
  • Memory key mismatch
Solutions:
  1. Verify memory node is connected
  2. Check session ID consistency (should be same per user)
  3. Use Session ID parameter or default to auto-generated
  4. Ensure Memory Key matches chain’s expectation (chat_history)
  5. Check memory type (Buffer vs Window vs Summary)
Symptoms: Agent ignores tools or uses wrong toolCauses:
  • Vague tool description
  • Model doesn’t support function calling
  • System message conflicts with tool use
  • Tool not connected properly
Solutions:
  1. Improve tool descriptions (be very explicit)
  2. Use Tool Agent instead of Conversational Agent (uses function calling)
  3. Remove conflicting instructions from system message
  4. Verify tool connections (check edge exists)
  5. Test with simpler prompts that clearly need the tool
Symptoms: “Rate limit exceeded” errorsCauses:
  • Too many requests to API
  • API tier limits hit
  • Concurrent requests exceed quota
Solutions:
  1. Add rate limiting in chatflow configuration
  2. Upgrade API tier/plan
  3. Implement request queuing
  4. Use caching to reduce redundant calls
  5. Increase timeout between retries

Browser Developer Tools

Use browser DevTools for deeper debugging:
Open browser console (F12) to see:
  • JavaScript errors
  • Network request failures
  • API response details
  • Validation errors
// Common console messages:

// API call details
"POST /api/v1/prediction/flow-id"

// Validation errors
"Node validation failed: Missing credential"

// Agent reasoning (if enabled)
"Agent selected tool: calculator"
"Tool result: 42"

API Testing

Test your chatflow via API for production-like scenarios:
1

Get API Endpoint

Click the API Code button in the chatflow header to see:
  • Prediction endpoint URL
  • Example request code (cURL, Python, JavaScript)
  • API key requirements
2

Test with cURL

curl -X POST https://your-flowise.com/api/v1/prediction/{flowId} \
  -H "Content-Type: application/json" \
  -d '{
    "question": "What is the weather?",
    "overrideConfig": {
      "sessionId": "test-session-123"
    }
  }'
3

Test Advanced Features

Use overrideConfig to test:
{
  "question": "Test question",
  "overrideConfig": {
    "sessionId": "user-123",
    "vars": {
      "customVar": "value"
    },
    "temperature": 0.5,
    "returnSourceDocuments": true
  }
}

Performance Monitoring

Response Time Analysis

Track and optimize response times:
Common slow components:
  1. LLM API calls: 2-10 seconds (largest factor)
  2. Vector search: 100-500ms
  3. Tool execution: Varies by tool (API calls can be slow)
  4. Document processing: Depends on size
Optimization strategies:
  • Use streaming for perceived performance
  • Cache frequent queries
  • Use faster models (gpt-3.5-turbo vs gpt-4)
  • Reduce token limits
  • Optimize vector store (better indexing)

Token Usage Tracking

Monitor and control costs:
1

Check Message Logs

View token usage in message history:
  • Prompt tokens (input)
  • Completion tokens (output)
  • Total tokens per request
2

Optimize Token Usage

  • Set Max Tokens to reasonable limits
  • Use shorter system messages
  • Reduce Top K in RAG (fewer retrieved docs)
  • Use smaller context windows
  • Clear memory periodically (in long conversations)
3

Cost Estimation

Calculate approximate costs:
GPT-4: ~$0.03 per 1K prompt tokens, $0.06 per 1K completion tokens
GPT-3.5: ~$0.0015 per 1K prompt tokens, $0.002 per 1K completion tokens

Example: 500 prompt + 200 completion tokens with GPT-4
Cost = (500 * 0.03 / 1000) + (200 * 0.06 / 1000) = $0.027

Best Practices

  1. Start simple: Test basic functionality first
  2. Add complexity gradually: Add one node/feature at a time
  3. Test each addition: Verify before adding more
  4. Use version control: Export flows regularly as backups
  5. Test edge cases: Empty input, very long input, special characters
  6. Load test: Use API testing for production scenarios
  7. Monitor in production: Track errors and performance
  1. Reproduce the issue: Find consistent steps to trigger
  2. Isolate the problem: Remove nodes until issue disappears
  3. Check basics first: Credentials, connections, required params
  4. Read error messages: Browser console and API responses
  5. Test incrementally: Fix one issue at a time
  6. Document fixes: Add sticky notes explaining solutions

Next Steps

Variables & Expressions

Use dynamic values for advanced flows

API Reference

Integrate chatflows into your application

Deployment

Deploy and monitor in production

Best Practices

Optimization and production tips

Build docs developers (and LLMs) love