Ensemble Docs

Tool Types

Configuration guide for each tool type

Tool Types

TypeDescription
JavaScriptCustom server-side code for business logic
SQLQuery relational databases
HTTP CallCall external REST APIs
API ConnectionCall APIs with pre-configured authentication
MongoDB QueryRun MongoDB aggregation pipelines
GraphQLExecute GraphQL queries
RAG SearchSemantic search over knowledge bases
NotificationsSend Slack or SMS messages
Audio/Video TranscriptionConvert media to text

Built-in Tools

ToolDescription
Web SearchSearch via Brave Search
GeocodingAddress to coordinates
WeatherCurrent conditions and forecasts
SlackSend channel messages
Azure BlobCloud storage access

JavaScript

Write custom server-side JavaScript code for complex business logic, data transformations, or calculations.

When to use: You need custom logic that isn't covered by other tool types, or you want to combine multiple operations into a single tool.

Configuration:

  • Code - Your JavaScript code runs in a secure server environment
  • Connection (optional) - Access database connections from your code

Example:

// Calculate order total with discounts
const subtotal = inputs.items.reduce((sum, item) => sum + item.price * item.quantity, 0);
const discount = inputs.couponCode ? subtotal * 0.1 : 0;
return {
  subtotal,
  discount,
  total: subtotal - discount
};

Your code has access to:

  • inputs - The input values provided by the agent
  • Database connections (if configured)

SQL

Run SQL queries against your database connections. Perfect for fetching, updating, or analyzing data.

When to use: You need to query a relational database like PostgreSQL, MySQL, or SQLite.

Configuration:

  • Connection - Select a database connection (configured in Connections)
  • Code - Your SQL query

Example:

SELECT o.id, o.total, c.name as customer_name
FROM orders o
JOIN customers c ON o.customer_id = c.id
WHERE o.status = {{status}}
ORDER BY o.created_at DESC
LIMIT 10

Use {{variableName}} syntax to insert input values safely (prevents SQL injection).


HTTP Call

Make HTTP requests to any external API or web service.

When to use: You need to call an external REST API that doesn't have a pre-configured connection.

Configuration:

FieldDescription
MethodGET, POST, PUT, PATCH, or DELETE
URLThe full URL to call (can include {{variables}})
HeadersKey-value pairs for request headers
Content Typeapplication/json, form-urlencoded, text/plain, or text/xml
BodyRequest body for POST/PUT/PATCH requests

Example:

  • Method: POST
  • URL: https://api.example.com/users/{{userId}}/orders
  • Headers: Authorization: Bearer {{apiKey}}
  • Body: {"items": {{items}}}

API Connection

Call APIs using your pre-configured API connections. The connection handles authentication automatically.

When to use: You have a reusable API connection set up and want to make authenticated calls without managing credentials in the tool.

Configuration:

FieldDescription
ConnectionSelect from your configured API connections
PathThe endpoint path (appended to the connection's base URL)
MethodGET, POST, PUT, or DELETE
HeadersAdditional headers (connection headers are included automatically)
Content TypeContent type for the request body
BodyRequest body for POST/PUT requests

This is similar to HTTP Call, but authentication is handled by the connection.


MongoDB Query (MQL)

Run MongoDB aggregate pipeline queries against your MongoDB databases.

When to use: You need to query a MongoDB database with complex aggregation pipelines.

Configuration:

FieldDescription
ConnectionSelect a MongoDB connection, or use custom credentials
DatabaseThe database name
CollectionThe collection to query
Aggregate StagesOne or more pipeline stages

Each aggregate stage has:

  • Condition - When to include this stage (use true for always)
  • Stage - The MongoDB aggregation stage as JSON

Example stages:

// Stage 1: Match documents
{ "$match": { "status": "active" } }

// Stage 2: Group and count
{ "$group": { "_id": "$category", "count": { "$sum": 1 } } }

GraphQL

Execute GraphQL queries against any GraphQL endpoint.

When to use: You need to query a GraphQL API, especially when you want fine-grained control over the data returned.

Configuration:

FieldDescription
ConnectionUse a connection, or enter a custom URL
URLGraphQL endpoint URL (if not using connection)
MethodPOST (standard) or GET
AI Generated QueryLet AI write queries based on your schema
SDLGraphQL schema definition (helps AI understand the API)
Few-shot ExamplesSample requests and queries to guide AI
Operation NameName of the operation to execute
QueryYour GraphQL query
VariablesQuery variables as JSON
HeadersAdditional request headers

AI Generated Query mode: When enabled, you provide the schema (SDL) and examples. The AI writes queries based on user requests instead of using a fixed query.


Search your knowledge bases using semantic (vector) search. Returns relevant document chunks that the agent can reference.

When to use: You want the agent to answer questions using your uploaded documents.

Configuration:

FieldDescription
Knowledge BaseSelect from your configured knowledge bases

The tool automatically:

  1. Converts the search query to a vector embedding
  2. Finds the most similar document chunks
  3. Returns the relevant text for the agent to use

Notifications

Send messages via Slack or SMS.

When to use: You want the agent to notify users or teams about events, alerts, or updates.

Slack Configuration

FieldDescription
Webhook URLSlack incoming webhook URL
ChannelTarget channel (optional, uses webhook default)
BlocksMessage content using Slack Block Kit

SMS Configuration

FieldDescription
ProviderTwilio or AWS SNS
Account credentialsProvider-specific authentication
From NumberSender phone number
To NumberRecipient phone number (can use {{variable}})
MessageSMS message content

Audio/Video Transcription

Convert audio or video files to text transcriptions.

When to use: You need to transcribe recordings, podcasts, meeting recordings, or any audio/video content.

Configuration:

FieldDescription
ProviderOpenAI Whisper, AssemblyAI, or Google Speech
Media URL ExpressionExpression that returns the audio/video URL
LanguageLanguage code (optional, auto-detected if not set)

Provider-specific options:

OpenAI Whisper:

  • Model: whisper-1
  • Response format: json, text, srt, verbose_json, or vtt

AssemblyAI:

  • Model: best or nano
  • Speaker labels: Identify different speakers
  • Include timestamps: Add timing information

All providers:

  • Max file size limit (optional)

On this page