Skip to main content

Agent Best Practices


Before You Start, we recommend reading:

What You Will Learn

  • Get started quickly and build powerful business-grade Agents

  • Explore two practical step-by-step use cases (includes reusable prompt skeletons, tool configuration tips, and verification checklists)

  • Master prompt writing and tool/permission configuration methods

  • Learn how to balance cost and performance effectively

Core Concepts

ChatBot: A large language model–powered assistant that understands natural language and can instantly invoke tools to perform queries, summaries, and other actions—enabling a conversation-driven experience for your business operations.

AI Agent Node: A node in a workflow that performs reasoning and decision-making based on the current context, then executes tools accordingly. It brings autonomous thinking and action capabilities to your workflows.

Tool: Interfaces that allow Agents to perform tasks such as querying worksheets, adding/updating records, aggregating data, triggering PBPs, calling external APIs, or sending messages/emails.

Structured Output: Model responses that are formatted as JSON or in a fixed structure, making it easy for downstream workflow nodes to use the data directly.

Practical Use Cases

Case A: CRM Lead Assistant (Beginner · ChatBot)

This example walks you through the basics of ChatBot usage, including tool invocation within the AI Agent node and user-based permission control.

Objective:

Allow sales reps to chat with a bot to query, supplement, or update CRM leads. The system writes data into the corresponding worksheet, following user's data access permissions.

Example Outcome:

Setup Steps

Step 1. Create a ChatBot
→ Enter a goal description
→ The system automatically generates a workflow with a “Trigger by Chat” node and an “AI Agent” node.

Step 2. Configure the AI Agent Node

  • Model: Set to Auto-select

  • Prompt: "You are a "CRM Lead Assistant" serving the sales team. Your responsibility is to help users query, supplement, and update CRM leads via natural language conversations."

  • Tools:

    • Use: Query Records, Add Record, Update Record, Rollup

    • Manually define worksheet scope: Lead worksheet, Customer worksheet

    • Enable “By user permissions”

    • For Add Record and Update Record tools, check “Require user confirmation before execution”

  • Other Settings:

    Keep default settings unless otherwise required

Key Notes

  • Enabling “By user permissions” ensures that the Agent only accesses records the current user is authorized to view or edit.

  • It is highly recommended to check “Require user confirmation before execution” for Add/Update tools to prevent unintended changes.

  • Turn on “Use system preset reply style” to ensure response quality and consistency.

Common Pitfalls

  • If worksheet scope is not defined, the Agent may accidentally affect unrelated worksheets.

  • If permission control is disabled, users may gain unauthorized access to data.

Case B: Customer Complaint Escalation & Handling (Intermediate)

This use case demonstrates how to use the AI Agent node to automate classification and escalation of customer complaints. The same concept can be extended to other scenarios requiring automated decision-making or intelligent summarization.

  • Objective:
    Automatically analyze the severity of a customer complaint, identify the responsible party, and trigger appropriate follow-up actions such as sending notifications, invoking PBPs, or archiving.

  • Expected Outcome:

Setup Steps

Step 1: Create a New Workflow

  • Trigger Node:
    Trigger the workflow when a new complaint record is added to the worksheet.

Step 2: Add First AI Agent Node — "Complaint Classification & Escalation"

Responsibilities:

  1. Understand the content of the complaint
  2. Query historical complaint records
  3. Based on predefined rules, output the severity level and recommended handling strategy

Model: Use DeepSeek-V3

This model provides good performance for text comprehension and classification, with balanced cost-effectiveness. No complex reasoning is required in this case.

Prompt:

Tool Configuration:

Output:

  • Use structured output in JSON format.
  • Define fields explicitly so downstream nodes can directly reference them without parsing natural language content.

Step 3: Add "AI-Generate Text" Node

Purpose:
Automatically identify the appropriate handler based on complaint type, responsible department, or product line.

You can break the task into multiple AIGC nodes. For simpler logic, consider using cost-efficient models (e.g., mini or nano series) to maintain performance at lower cost.

Prompt Example:

Step 4: Add Branch Node — Route Complaints Based on Severity

Branching Conditions:

  • If severity = Low → Path A
  • If severity = Medium → Path B
  • If severity = High → Path C

Step 5: Add Follow-Up Nodes to Each Branch

  • Path A (Low Severity): Update complaint record
  • Path B (Medium Severity): Notify responsible person and update complaint status
  • Path C (High Severity): Notify a supervisor or manager immediately and launch an emergency response via PBP

At this stage, the workflow appears well-structured:

Complaint content is parsed, severity is assessed, and appropriate actions are triggered through branching logic — clear and reliable.

But a sharp mind might notice a limitation:
You’re still operating within a traditional workflow logic.

Each decision and action is explicitly defined. You’re telling the system what to do.
However, a true Agent should not rely on instructions — it should know what to do on its own.

In fact, a single AI Agent node can handle the entire logic.

From Workflow Logic to Autonomous Agent

An AI Agent is more than just a text understanding node — it combines reasoning with tool execution.

Once the business rules are embedded in the prompt, the Agent can:

  • Understand the complaint
  • Determine severity
  • Decide next actions
  • Execute tools accordingly

— All without explicit branches or multiple nodes.

The power of the AI Agent lies not in replacing workflows, but in elevating them from mechanical execution to intelligent decision-making.

In traditional workflows, logic is linear:
You branch conditions and sequence tasks. The system follows a fixed path.

But with AI Agent nodes, everything changes:
It can understand business context, apply decision rules, and autonomously act using available tools.

The “thinking” behind the process no longer lives in human-designed flowcharts — it’s embedded in the Agent itself.

3. Model Selection Guide

When choosing a model for the AI Agent node, it's important to balance three key factors: capabilities, latency, and cost.

This guide will help you make informed decisions based on specific task requirements.

Step 1: Do You Need Image Recognition?

If the task involves screenshots, receipts, or tabular image inputs, prioritize models that support image understanding.

Image Processing Required?Recommended Models
YesGPT-5, GPT-5-mini, GPT-5-nano, GPT-4.1, GPT-4.1 mini, GPT-4o, GPT-4o-mini, o3, o4-mini
NoDeepSeek-V3, Qwen Turbo, Qwen Plus, Qwen Max

💡 Tip: If you're unsure whether image inputs will be needed, we recommend selecting a model that supports both text and image inputs for flexibility.

Step 2: Match Model to Task Complexity

After confirming image processing needs, choose a model category based on task complexity and business goals:

Task ComplexityRecommended ModelsUse CasesCharacteristics
🟢 SimpleGPT-5-nano / Qwen TurboBasic Q&A, rephrasing, FAQ handlingLowest cost, fastest response. Ideal for lightweight interactions or high-volume usage.
🟡 ModerateGPT-5-miniQuerying, report generation, data writeback, structured outputsHigh cost-performance ratio, stable logic. Suitable for most business workflows.
🔵 ComplexGPT-5, o3Intelligent decisioning, routing, complex business logicStrong reasoning models. Ideal for critical workflow paths or high-value tasks.

Common Guidance:

  • In most cases → Choose GPT-5-mini
  • For high accuracy or logical consistency → Use GPT-5
  • In prototype stage or budget-sensitive projects → Start with Qwen Turbo or GPT-5-nano

Step 3: When to Upgrade the Model?

Consider upgrading or changing the model if you encounter the following issues:

  • Unstable or incorrect responses
  • Frequent errors in JSON or structured output format
  • Noticeable latency or timeouts exceeding workflow limits
  • Output quality affecting downstream workflow execution

4. Prompt Writing Guide

Prompts determine how the Agent understands tasks and generates outputs. There is no one-size-fits-all standard, but we recommend following these principles:

  1. Define the Role Clearly
    Specify the Agent’s role and scope of responsibilities.

  2. Specify the Tasks
    List the actions the Agent is expected to perform, such as querying, summarizing, updating records, or generating reports. Natural language is sufficient.

  3. Clarify Boundaries
    Tell the model what not to do. This prevents confusion or unauthorized behavior.

  4. Specify Output Format
    Define the expected response format (e.g., Markdown, tables, JSON) to simplify downstream processing.

  5. Tone and Style

    • For end-user-facing ChatBots: Use a natural, friendly tone.
    • For workflow executions: Keep it concise and professional.
  6. Test and Iterate
    Refine prompts gradually based on workflow logs. You don’t need to get it perfect on the first try.

💡 Pro Tip: The more specific the prompt, the more reliable the result. Vague prompts often lead to off-topic outputs. Concise and clear is better than long and ambiguous.

5. Key Points for Tool and Permission Settings

  • Worksheet Scope
    We strongly recommend manually selecting the target worksheet(s) to prevent unintended access or operations on other worksheets.

  • Query Scope (for data query/summary tools)
    Use filters such as time, department, or owner to narrow down the dataset.

  • By User Permissions (ChatBot workflows only)
    This is enabled by default. If disabled, the Agent will ignore user-level permissions and may access all data, which is generally not recommended.

  • Require User Confirmation Before Execution

    • ChatBot workflows: Recommended for tools like “add record”, “update record”, “send internal notification”, “send email”, “trigger packaged business process (PBP)”, or “call integrated APIs”.
    • Non-ChatBot workflows: Usually not checked, to ensure automation runs uninterrupted.

6. Cost and Performance Optimization

  1. Break Down Complex Tasks
    Split large tasks into smaller ones and handle them with separate AIGC nodes. Use cost-efficient models (like mini or nano series) for low-complexity subtasks.

  2. Minimize Unnecessary Context
    Limit worksheet scope in record-related tools. A smaller toolset leads to more stable outputs and reduced token consumption.

  3. Control Memory Rounds
    Adjust memory settings based on actual needs to avoid accumulating unnecessary conversation history.

  4. Structure First
    Ask the model to output in JSON to simplify parsing and reduce repeat calls.