logo_smallAxellero.io

Tools

How AI agents use tools to interact with external systems and execute actions.

Tools are the capabilities that enable AI agents to go beyond text generation—they can query databases, call APIs, execute code, and interact with external systems. Any node in Axellero can become a tool for an AI agent.

How Tools Work

When you connect a node to an AI Agent via the Tool Handler, the agent receives a callable function it can invoke during its reasoning loop.

┌──────────────────────────────────────────────────────────────┐
│                       TOOL EXECUTION                         │
├──────────────────────────────────────────────────────────────┤
│                                                              │
│    ┌──────────┐                                              │
│    │ AI Agent │                                              │
│    └────┬─────┘                                              │
│         │                                                    │
│         │ "I need to look up this customer"                  │
│         ▼                                                    │
│    ┌──────────┐                                              │
│    │  Select  │ ← LLM chooses tool based on description      │
│    │   Tool   │                                              │
│    └────┬─────┘                                              │
│         │                                                    │
│         ▼                                                    │
│    ┌──────────┐     ┌──────────────┐                         │
│    │ Execute  │────▶│   External   │                         │
│    │   Tool   │     │    System    │                         │
│    └────┬─────┘     └──────────────┘                         │
│         │                  │                                 │
│         │                  │ Result                          │
│         ▼                  ▼                                 │
│    ┌──────────────────────────┐                              │
│    │   Agent continues with   │                              │
│    │   tool result in context │                              │
│    └──────────────────────────┘                              │
│                                                              │
└──────────────────────────────────────────────────────────────┘

Tool Types

Any node from the Node Library can become a tool for your AI agent. Simply drag a node onto your AgentFlow canvas and connect it to the AI Agent's Tool Handler port.

CategoryExamplesAgent Capabilities
APIs & ProtocolsREST, GraphQL, SOAPIntegrate with external services, webhooks
DatabasesPostgreSQL, OracleQuery data, update records, run reports
Email & MessagingGmail, Telegram, SMTPSend emails, post messages, notifications
File OperationsUpload, Download, Read, WriteProcess documents, manage files
Data AnalysisExcel, Statistics, TransformAnalyze data, generate insights
Document GenerationDOCX, Reports, TemplatesCreate documents, reports
Code ExecutionJavaScript, PythonCustom logic, calculations, data transformation
MCP ServersExternal MCP toolsExtended AI capabilities, specialized tools

Browse the complete Node Reference to discover all available capabilities you can give your agents.

Examples

Connect to external APIs:

Tool: get_weather
Method: GET
URL: https://api.weather.com/current?city={{input.city}}
Headers: Authorization: Bearer {{ctx.consts.WEATHER_API_KEY}}

Query your data directly:

-- Tool: lookup_customer
SELECT id, name, email, tier, created_at
FROM customers
WHERE email = {{input.email}}

Execute custom logic in a secure sandbox:

// Tool: calculate_discount
var subtotal = input.subtotal;
var customerTier = input.tier;

var discount = 0;
if (customerTier === 'gold') {
  discount = subtotal * 0.15;
} else if (customerTier === 'silver') {
  discount = subtotal * 0.10;
}

return { discount: discount, final: subtotal - discount };

For a complete working example, see the Customer Support Agent tutorial which implements tools for FAQ search, ticket creation, and customer lookup.

Connecting Tools

┌───────────────────────────────────────────────────────────┐
│                    TOOL CONNECTIONS                       │
├───────────────────────────────────────────────────────────┤
│                                                           │
│                    ┌─────────────┐                        │
│        ┌──────────▶│  Database   │                        │
│        │           │   Query     │                        │
│        │           └─────────────┘                        │
│        │                                                  │
│   ┌────┴────┐      ┌─────────────┐                        │
│   │   AI    │◀────▶│  HTTP API   │                        │
│   │  Agent  │      │   Call      │                        │
│   └────┬────┘      └─────────────┘                        │
│        │                                                  │
│        │           ┌─────────────┐                        │
│        └──────────▶│ JavaScript  │                        │
│                    │   Code      │                        │
│                    └─────────────┘                        │
│                                                           │
└───────────────────────────────────────────────────────────┘
  1. Drag a node onto the canvas (JavaScript, HTTP, Database, etc.)
  2. Connect to the AI Agent's Tool Handler port
  3. Configure the tool name and description
  4. Define input parameters the tool accepts
  5. Test the tool individually before running the agent by running the tools with test values

Tool Configuration

ParameterDescription
Tool NameIdentifier the agent uses to call the tool (e.g., search_products)
DescriptionExplains when and why to use this tool—critical for LLM decision-making
Input ParametersSchema defining what data the tool accepts
Preserve OutputKeep tool results in agent memory for future turns
Include in MemoryAdd tool call history to conversation context

Writing Effective Descriptions

The tool description is how the LLM decides when to use each tool. Be specific:

Good: "Search the product database by name, SKU, or category.
      Returns product details including price, availability, and description.
      Use when user asks about products, inventory, or pricing."

Bad: "Search products"

Example: Customer Support Agent

A support agent with three tools:

┌─────────────────────────────────────────────────────────────┐
│                                                             │
│    ┌─────────────────┐                                      │
│    │  Support Agent  │                                      │
│    │                 │                                      │
│    │  "How can I     │                                      │
│    │   help you?"    │                                      │
│    └────────┬────────┘                                      │
│             │                                               │
│    ┌────────┼────────┬──────────────┐                       │
│    ▼        ▼        ▼              ▼                       │
│ ┌──────┐ ┌──────┐ ┌──────┐    ┌──────────┐                  │
│ │lookup│ │search│ │create│    │ escalate │                  │
│ │_order│ │_faq  │ │_ticket│   │ _to_human│                  │
│ └──────┘ └──────┘ └──────┘    └──────────┘                  │
│                                                             │
└─────────────────────────────────────────────────────────────┘

Tool definitions:

ToolDescriptionWhen Used
lookup_order"Find order by ID or email. Returns status, items, tracking."User asks about order status
search_faq"Search knowledge base for answers. Returns matching articles."User has general questions
create_ticket"Create support ticket. Requires subject and description."Issue needs human follow-up
escalate_to_human"Transfer to human agent. Use for complex or sensitive issues."Agent cannot resolve

Best Practices

Tool Design

  • Maximum 20 tools per agent—too many tools confuse the LLM
  • Clear naming: Use verb_noun format (search_products, create_ticket)
  • Detailed descriptions: Explain when, why, and what the tool returns
  • Focused scope: Each tool should do one thing well

Input Parameters

  • Define required vs optional parameters clearly
  • Use descriptive parameter names
  • Provide examples in descriptions when helpful

Testing

  • Test each tool in isolation before connecting to agent
  • Verify error handling for edge cases
  • Check that tool outputs are structured correctly

Performance

  • Keep tool execution fast—each call adds latency
  • Cache results when appropriate
  • Use async tools for long-running operations

Common Patterns

Lookup Pattern

Agent needs information before responding:

User: "What's my order status?"
Agent thinks: "I need the order ID to look this up"
Agent asks: "Could you provide your order number?"
User: "ORD-12345"
Agent calls: lookup_order(id: "ORD-12345")
Agent responds with order status

Action Pattern

Agent performs an action on behalf of user:

User: "Cancel my subscription"
Agent calls: get_subscription(user_id: current_user)
Agent calls: cancel_subscription(subscription_id: "...")
Agent confirms: "Your subscription has been cancelled."

Multi-Tool Pattern

Agent combines multiple tools:

User: "I want to return my recent order"
Agent calls: lookup_orders(user_id: current_user, limit: 1)
Agent calls: check_return_eligibility(order_id: "...")
Agent calls: create_return(order_id: "...", reason: "...")
Agent provides return label and instructions

Limitations

  • Each tool call adds latency to the response
  • Too many tools (>20) can confuse the LLM's selection
  • Complex tools may need better descriptions for reliable selection
  • Tool errors should be handled gracefully

Start with 3-5 essential tools and add more only when the agent clearly needs additional capabilities. Quality descriptions matter more than quantity.