Zum Haaptinhalt sprangen

🛠️ Conversation Tool Trigger

The Conversation Tool Trigger empowers AI agents within SmartFlow to dynamically interact with external tools and systems, making intelligent decisions to perform tasks, retrieve data, or trigger subsequent actions. Using an AI decision engine, agents decide which tools to use and manage multiple actions efficiently. This system supports up to 10 tool actions per interaction before providing a response.

pasted-image.png


📝 Trigger Details

Name: Conversation Tool
Category: Triggers


🔧 Parameters

  1. Tool Name

    • Type: string
    • Description: Specifies the tool to be executed by the AI agent. The tool must be preconfigured and integrated into SmartFlow.
    • Required: Yes
    • Example: "CRM Lookup"
  2. Input Variables

    • Type: object
    • Description: The data required for the tool to perform its task, often derived from the context of the workflow or conversation.
    • Required: Yes
    • Example:
      {
      "customerId": "12345"
      }
  3. Observation

    • Type: string (default: Tool-specific output)
    • Description: The result of the action, which can influence subsequent AI behavior. By default, the observation is set to the tool's output, but it can be manually defined to guide the agent’s next action.
    • Example:
      • Default Observation: API result returned from the tool.
      • Custom Observation: "Trigger the next form based on user preferences."

🚀 How It Works

  1. Default Observations:

    • Each tool action generates a default observation based on the tool's result.
    • Example: A successful API call returns the API response as the observation.
  2. Manual Observation Setting:

    • Users can override the default observation to influence the AI’s next decision.
    • Example: Instead of using the API result as the observation, a custom message like "Start form submission process" can guide the AI to initiate another action.
  3. AI Decision Engine:

    • The decision engine analyzes the current observation and determines the next tool action, seamlessly chaining multiple tools when needed.
  4. Response Formulation:

    • After executing up to 10 tool actions, the AI agent formulates a response, either directly using the observations or based on additional input from the user.

💡 Use Cases

  1. Dynamic Customer Support:

    • Scenario: A user asks, "Can I get an update on my recent order?"
    • Workflow:
      • Tool: API call to fetch order details.
      • Observation: API result with order status.
      • Response: "Your order is on its way and will arrive on Jan 15, 2025."
  2. Custom Workflow Redirection:

    • Scenario: A user triggers a tool, but you want the AI to start a specific form instead.
    • Workflow:
      • Tool: "Form Starter."
      • Observation: "Initiate User Feedback Form."
      • Result: The AI dynamically transitions to form submission.
  3. Multi-Step Integration:

    • Scenario: "How much is my current invoice, and can I pay it now?"
    • Workflow:
      • Step 1: Retrieve invoice details via API.
      • Step 2: Trigger the payment gateway.
      • Observations guide the sequence of these actions.

🔍 Example Configuration

Default Observation

Tool Name: "Order Management"
Input Variables:

{
"orderId": "67890"
}

Observation: API result

{
"trigger": "ConversationTool",
"toolName": "Order Management",
"input": {
"orderId": "67890"
},
"observation": "Order status fetched successfully."
}

Custom Observation

Tool Name: "Start Form"
Input Variables:

{
"formId": "feedbackForm"
}

Observation: "User feedback form initiated."

{
"trigger": "ConversationTool",
"toolName": "Start Form",
"input": {
"formId": "feedbackForm"
},
"observation": "User feedback form initiated."
}

🛠️ Best Practices

  1. Default vs. Custom Observations:

    • Use default observations for standard workflows and API integrations.
    • Override observations to redirect AI behavior for specific scenarios.
  2. Clear Observation Messages:

    • Ensure custom observations are precise to guide the AI effectively.
  3. Chaining Actions:

    • Plan workflows to minimize unnecessary steps while leveraging the 10-action limit efficiently.
  4. Testing Observations:

    • Simulate workflows to verify that both default and custom observations lead to expected AI decisions.

📊 Monitoring and Debugging

  • Use the SmartFlow monitoring dashboard to track:
    • Tool actions executed.
    • Observations generated.
    • AI decisions and their outcomes.
  • Debug workflows by reviewing observation logs to identify and resolve unexpected behavior.