AI Tools
Tool nodes provide capabilities that AI Agents can invoke during reasoning. Each tool defines a schema that the LLM understands and uses to decide when and how to call the tool.How Tools Work
- Connect Tool nodes to the AI Agent’s
input-toolshandle (diamond shape) - Agent discovers connected tools and their schemas
- LLM decides when to call tools based on the user’s request
- Tool executes and returns results to the agent
- Agent continues reasoning with the tool’s output
Available Tools
| Tool | Description | Use Case |
|---|---|---|
| Calculator | Math operations | Calculations, arithmetic |
| Current Time | Date/time with timezone | Scheduling, time-based logic |
| Web Search | Search the internet | Current information, research |
| Android Toolkit | Android device control | Device automation |
| AI Agent | Delegate to child agent | Complex sub-tasks (fire-and-forget) |
| Specialized Agents | Domain-specific delegation | Android, coding, web, task, social |
Calculator Tool
Performs mathematical operations including basic arithmetic and advanced functions.Operations
| Operation | Description | Example |
|---|---|---|
| add | Addition | 5 + 3 = 8 |
| subtract | Subtraction | 10 - 4 = 6 |
| multiply | Multiplication | 6 * 7 = 42 |
| divide | Division | 20 / 4 = 5 |
| power | Exponentiation | 2^8 = 256 |
| sqrt | Square root | sqrt(16) = 4 |
| mod | Modulo | 17 % 5 = 2 |
| abs | Absolute value | abs(-5) = 5 |
Parameters
Tool identifier shown to the LLM
Description of the tool’s capabilities for the LLM
Schema (LLM View)
Example Interaction
Current Time Tool
Gets the current date and time with timezone support.Parameters
Tool identifier shown to the LLM
Description of the tool’s capabilities
Default timezone (e.g., “America/New_York”, “Europe/London”, “Asia/Tokyo”)
Schema (LLM View)
Output
Example Interaction
Web Search Tool
Searches the internet using DuckDuckGo (free) or Serper API (requires API key).Parameters
Tool identifier shown to the LLM
Description of the tool’s capabilities
Search provider: “duckduckgo” (free) or “serper” (API key required)
Maximum number of search results to return
Schema (LLM View)
Output
Example Interaction
Provider Comparison
| Feature | DuckDuckGo | Serper |
|---|---|---|
| Cost | Free | Paid (API key) |
| Rate Limits | Moderate | High |
| Result Quality | Good | Excellent |
| Setup | None | API key required |
Android Toolkit
Gateway tool that aggregates Android service nodes for device control.Architecture
The Android Toolkit follows the Sub-Node pattern from n8n and Toolkit pattern from LangChain:android_device tool with capabilities based on connected services.
Parameters
Tool identifier shown to the LLM
Description of the toolkit’s capabilities
Schema (Dynamic)
The schema is built dynamically based on connected Android service nodes:Connecting Services
- Add Android service nodes (Battery Monitor, WiFi Automation, etc.)
- Connect them to the Android Toolkit’s main input
- Connect the Toolkit to the AI Agent’s tools handle
Tool Schema Editor
The Android Toolkit includes a schema editor for customizing how the LLM sees each service:- Select the Android Toolkit node
- Open the Tool Schema Editor
- Select a connected service
- Customize the description, fields, and types
- Save changes
Example Interaction
Available Services
When corresponding Android service nodes are connected:| Service | Actions | Description |
|---|---|---|
| battery | status | Battery level, charging state, health |
| wifi_automation | status, enable, disable, scan | WiFi control |
| bluetooth_automation | status, enable, disable, paired | Bluetooth control |
| location | get | GPS coordinates |
| app_launcher | launch | Launch apps by package name |
| app_list | list | Installed applications |
| audio_automation | get, set, mute, unmute | Volume control |
| camera_control | info, capture | Camera operations |
| motion_detection | get | Accelerometer/gyroscope data |
| environmental_sensors | get | Temperature, humidity, light |
Tool Execution Flow
When the AI Agent calls a tool:- Status broadcast -
executing_toolstatus sent to frontend - Tool node highlighted - Shows cyan border and pulse animation
- Handler executed - Backend runs the tool’s handler function
- Result returned - Output sent back to the agent
- Agent continues - Incorporates result into response
Tool Output in Variables
Tool outputs are available as template variables:Agent Delegation Tool
AI Agents and specialized agents can be connected as tools to parent agents, enabling hierarchical task delegation.How It Works
- Connect any agent to a parent agent’s
input-toolshandle - Parent calls
delegate_to_<agent_type>(task, context) - Child spawns as background task (fire-and-forget)
- Parent continues immediately without waiting
Schema
Example
delegate_to_coding_agent(task="Write a function to parse JSON")
Child agent executes independently with its own connected tools.
Creating Custom Tools
To add custom tools, see the AI Tool Node Guide in the repository. Key steps:- Define node in
client/src/nodeDefinitions/toolNodes.ts - Add schema in
server/services/ai.py - Add handler in
server/services/handlers/tools.py - Update
TOOL_NODE_TYPESarray