Skip to main content

Tools Configuration

Tools enhance the functionality of agents by allowing them to interact with external services, APIs, or data sources. This section explains how to assign tools to agents and why they are essential.

Why are Tools Important?

  • Extended Functionality: Tools enable agents to perform specific operations like fetching data, sending messages, or interacting with third-party services.
  • Customization: Agents can be equipped with different tools based on their roles.
  • Integration: Facilitates the connection between your agent and external systems.

YAML Configuration for Tools

Each agent can be assigned tools using the tools field in the configuration.

tools:
tool_assigned:
- name: "<Tool Name>"
config:
# Tool-specific configurations
# HITL: true # Enable Human-in-the-Loop approval (optional)
# instruction: | # Custom instruction for tool behavior (optional)
# Your instructions here...
mcp_assigned:
- name: "<MCP Server Name>"
config:
# MCP server specific configurations (url, transport, headers)
# See MCP documentation for details

Example: Assigning Tools to Agents

  • Stock_news_searcher uses the YahooFinanceNewsTool:

    tools:
    tool_assigned:
    - name: "YahooFinanceNewsTool"
  • sms_sender uses the Twilio_sms tool:

    tools:
    tool_assigned:
    - name: "Twilio_sms"
    config:
    to: "<recipient_phone_number>"
    from: "<twilio_phone_number>"

    Note: Replace <recipient_phone_number> and <twilio_phone_number> with actual phone numbers in international format (e.g., "+1234567890").

Explanation:

  • name: Specifies the tool name.
  • config: Contains tool-specific parameters.
    • HITL (optional): Set to true to require human approval before tool execution. See Human-in-the-Loop for details.
    • instruction (optional): Custom instructions to guide how the agent uses this tool. See Custom Instruction for details.

Model Context Protocol (MCP)

In addition to standard built-in tools, SVAHNAR allows agents to dynamically connect to external tool servers using the Model Context Protocol (MCP). This is configured via the mcp_assigned field under tools.

For complete details on configuring and using MCP servers, see the Model Context Protocol Usage Guide.

Where to Find Tool Configurations?

Detailed explanations of each tool and their configuration parameters are available in the Tools Documentation section (link to Tools Documentation). This separate document provides in-depth information on:

  • Available tools.
  • Required and optional configuration parameters.
  • Examples and usage guidelines.

Configuration Options Summary

OptionTypeDescription
namestringThe name of the tool to assign
configobjectTool-specific configuration parameters
config.HITLbooleanEnable Human-in-the-Loop approval (default: false)
config.instructionstringCustom instructions for tool behavior
mcp_assignedarrayList of MCP servers assigned to the agent