Skip to main content
Version: v5.1

Tools overview

Overview

An AI tool is a functional AI component used by agents to retrieve or transform data.

A tool has the following characteristics:

  • Acts as a utility which helps agents perform specific tasks such as fetching data from platform services
  • Enables RAG​
  • Is configured with clear usage instructions and input parameters

To equip an agent with a tool, simply add the tool to the agent's _tools array.

Types of Tool

There are two types of Tool:

  • System Tool: Built into the platform
  • Custom Tool: A tool you create on the platform

System tools

The following System Tools are available:

  • Platform API Tools: Tools that expose the Read API calls from platform API
  • Query tools: Generate queries for collections and their related items in the Item Service based on schemas defined in the namespace and user input

Custom tools

You can create your own custom tools. For more information, see Custom Tools.

Schemas and SchemaDefinitions

Schemas provide crucial context for the AI Service to generate more accurate and relevant Item Service queries for your tools.​ For more information, see Schemas.

Equipping an Agent with a tool

To equip an agent with a tool, do the following:

  1. Create an agent. See code example below for details.
  2. List the tool you want in the _tools array.
const queryAgent = IafAISvc.createAgents([{
_name: "Graph Query Agent",
_background: "Uses the GetSchemaDefinitionsTool to get the schema, then pass the prompt and schema to GraphQueryTool tool and return the output of GraphQueryTool",
_userType: "graph_query_agent_1",
_type: "user_agent",
_namespaces: [
"workspace_m8NrvPU3"
],
_config: {
_model: "gpt-4o",
_provider: "openai"
},
_tools: [
"GetSchemaDefinitionsTool",
"MyCustomTool"
]
}]);