Agent Studio

Tool Editor

Visual interface for building tool actions

Tool Editor

The Tool Editor provides a visual interface for creating and configuring tools without writing JSON. Build action chains, configure webhooks, and set up conditional logic through an intuitive UI.

Accessing the Tool Editor

  1. Navigate to Tools in the dashboard sidebar
  2. Click New Tool or select an existing tool
  3. Use the tabbed interface to configure different aspects

Editor Sections

Basic Information

Configure the tool's identity:

  • Name - Unique identifier (lowercase, underscores allowed)
  • Description - What the tool does (shown to the LLM)

Parameters Tab

Define what information the LLM should extract from conversations.

Adding Parameters

  1. Click Add Parameter
  2. Configure the parameter:
    • Name - Parameter identifier
    • Type - Data type (string, number, boolean, array, object)
    • Required - Toggle for mandatory parameters
    • Description - Help text for the LLM

Parameter Types

TypeUse CaseExample
stringText valuesNames, descriptions
numberNumeric valuesQuantities, prices
booleanYes/no valuesConfirmations, flags
arrayMultiple itemsList of dishes, tags
objectComplex dataNested structures

Actions Tab

Build the action chain that executes when the tool is called.

Adding Actions

  1. Click Add Action
  2. Select the action type from the dropdown
  3. Configure type-specific properties
  4. Drag to reorder actions

Action Editor Features

Each action has:

  • Expand/Collapse - Toggle to show/hide details
  • Type Selector - Change the action type
  • Configuration Fields - Type-specific inputs
  • Delete Button - Remove the action

Action Types Reference

Context Actions

Set Context

Store a value in the call context:

FieldDescription
KeyDot-notation path (e.g., user.preferences.theme)
ValueExpression referencing params or context

Get Context

Retrieve a value from context:

FieldDescription
KeyPath to the value to retrieve

Delete Context

Remove a value from context:

FieldDescription
KeyPath to the value to delete

Flag Actions

Set Flag

Set a boolean flag:

FieldDescription
Flag NameFlag identifier (e.g., skip_confirmation)

Clear Flag

Clear a boolean flag:

FieldDescription
Flag NameFlag to clear

Communication Actions

Respond

Generate a speech response to the user:

FieldDescription
MessageStatic text to speak
Message KeyOR context path for dynamic message

Use {{variable}} syntax in messages for interpolation.

Handoff

Transfer the conversation to another agent:

FieldDescription
Target AgentAgent identifier to transfer to
Handoff MessageOptional message during transfer

Integration Actions

Webhook

Call an external API endpoint:

FieldDescription
Endpoint NameReference to tenant endpoint config
Payload MappingJSON mapping params to request body
Store Result AsContext key for the response

Logic Actions

Conditional

Branch execution based on a condition:

FieldDescription
ConditionJavaScript-like expression
ThenActions to run if true
ElseActions to run if false

Nested Actions: Both then and else support full action chains, including nested conditionals.

Validate

Validate parameter input:

FieldDescription
FieldParameter to validate
RuleValidation rule type
Error MessageMessage if validation fails

Rules: required, email, phone, number, min_length, max_length, pattern

Transform

Transform data using expressions:

FieldDescription
InputSource data expression
ExpressionTransformation logic
OutputContext key for result

Log

Log data for debugging:

FieldDescription
Leveldebug, info, warn, error
MessageLog message
Data ExpressionOptional data to include

Building Conditional Logic

The conditional action editor provides a visual interface for branching logic.

Creating a Conditional

  1. Add a Conditional action
  2. Enter the condition expression
  3. Expand the Then section
  4. Add actions to run when true
  5. Expand the Else section
  6. Add actions to run when false

Condition Expressions

Conditions use JavaScript-like syntax:

// Simple comparisons
context.user_type === 'premium'
params.amount > 100
flags.verified === true

// Logical operators
params.age >= 18 && context.country === 'US'
flags.vip || params.priority === 'high'

// Existence checks
context.user.email !== undefined
params.optional_field

Nested Conditionals

Conditionals can be nested for complex logic:

If user is premium
  Then: If order > $100
    Then: Apply 20% discount
    Else: Apply 10% discount
  Else: Show upgrade prompt

Build this by adding a conditional inside another conditional's then or else branch.

Success/Failure Callbacks Tab

Configure actions that run after the main action chain.

On Success

Actions executed when the tool completes successfully:

  1. Click Add in the On Success section
  2. Add notification, logging, or cleanup actions
  3. Common patterns:
    • Log success metrics
    • Update user state
    • Send confirmation response

On Failure

Actions executed when the tool encounters an error:

  1. Click Add in the On Failure section
  2. Add error handling actions
  3. Common patterns:
    • Log error details
    • Notify user of failure
    • Trigger fallback behavior

Common Patterns

Data Collection Tool

1. Validate: Check required fields
2. Context Set: Store user input
3. Respond: Confirm receipt

API Integration Tool

1. Validate: Verify parameters
2. Webhook: Call external API
3. Conditional: Check response
   Then: Respond with success
   Else: Respond with error

Multi-Step Tool

1. Context Get: Retrieve existing data
2. Transform: Merge with new input
3. Context Set: Update state
4. Webhook: Sync with backend
5. Flag Set: Mark as complete
6. Respond: Confirm to user

Conditional Response Tool

1. Conditional: Check user tier
   Then:
     - Context Set: Apply premium pricing
     - Respond: "Here's your VIP discount"
   Else:
     - Context Set: Apply standard pricing
     - Respond: "Here's your price"

Best Practices

Action Design

  1. Validate early - Check inputs before processing
  2. Fail gracefully - Always have error responses
  3. Log strategically - Add logs for debugging without noise
  4. Keep chains short - Complex logic belongs in conditionals

Performance

  1. Minimize webhooks - Each call adds latency
  2. Cache when possible - Store frequently-used data in context
  3. Exit early - Use conditionals to skip unnecessary actions

Debugging

  1. Use log actions - Add temporary logs during development
  2. Check call transcripts - Review tool execution in monitoring
  3. Test incrementally - Verify each action works before adding more

On this page