Waterflai
  • Welcome to Waterflai
  • Getting Started
    • Concepts
    • Quickstart
  • Providers
    • Providers Overview
    • Providers setup
    • AI models
    • Choose the right models
  • Knowledge
    • Knowledge Overview
    • Knowledge connectors
    • Knowledge collections
  • Studio
    • Studio Overview
    • Studio Builders
      • Light Builder
      • Dream Builder
      • Workflow Builder
      • Flow components (nodes)
        • Input Node
        • Output Node
        • LLM model Node
        • Multimodal LLM Node
        • Dall-E 2 (image generation) Node
        • Dall-E 3 (image generation) Node
        • Sora video generation Node
        • Text-to-Speech (TTS) Node
        • Speech-to-Text (STT) Node
        • OCR Node
        • Agent Node
        • Reranker Node
        • Knowledge retrieval Node
        • Vector store insert Node
        • Vector store record delete Node
        • Gitbook loader
        • Notion Database Node
        • Figma Node
        • Webpage scraper Node
        • Sitemap Scraper Node
        • API Request Node
        • Document metadata extraction Node
        • Document metadata update Node
        • Character splitter Node
        • HTML splitter Node
        • Markdown Splitter
        • Calculator tool Node
        • Text as tool Node
        • Knowledge retrieval tool Node
        • Conditional Node
        • Iteration loop Node
      • Testing and Debugging
    • Publishing
    • Integration with API
    • Embedding in website
  • Analytics
    • Analytics Overview
    • Dashboards
    • Logs
  • Administration
    • Organization users
    • Workspace
    • Security and permissions
  • Troubleshooting
    • Support
Powered by GitBook
On this page
  • Overview
  • Configuration
  • Best Practices
  • Common Issues
  1. Studio
  2. Studio Builders
  3. Flow components (nodes)

Agent Node

Overview

The Agent Node empowers your flow with decision-making capabilities by creating an AI agent that can use multiple tools to accomplish tasks. It combines a large language model with a set of tools, enabling complex reasoning and multi-step task completion based on the input and available tools.

Usage cost: 2 credits

Configuration

Settings

  1. Model Selection

    • LLM Model*: Select the AI model for the agent (the selected model must support tools calling)

    • System Prompt: Initial instructions defining the agent's behavior and context

    • Agent Prompt*: The main instruction or task for the agent

    • Past Message History: Optional chat history for context

  2. Tools Configuration

    • Tools*: Select one or more tools for the agent to use

    • Tools must be provided by previous nodes in the flow

  3. Output format

    • Output as JSON (Toggle):

      • Off (Default): The node outputs the model's response as a plain string.

      • On: Instructs the model to format its response as JSON and attempts to parse the output string. If parsing succeeds, the response output port will contain a JSON object/array. If it fails, response will contain the original string.

    Note: JSON structure and parsing success depend heavily on the model's ability to follow instructions. Clearly prompting for JSON format is recommended when this is enabled.

Output Ports

  • response (string): The agent's complete response after using tools and reasoning

Best Practices

  1. Tool Selection

    • Only provide tools that are relevant to the task

    • Order tools from most to least commonly used

    • Ensure tools have clear, descriptive names

    • Limit the number of tools to prevent confusion

  2. Prompt Engineering

    • Be specific about what tools should be used

    • Clearly define the expected outcome

  3. Performance Optimization

    • Keep tool descriptions concise

    • Use appropriate model for complexity

    • Balance between instruction detail and flexibility

Common Issues

  • Tool execution timeouts

  • Incorrect tool selection by agent

  • Incomplete or unclear tool responses

  • Model context length limitations

PreviousOCR NodeNextReranker Node

Last updated 1 month ago