Built-in Tools

Pre-built tools that agents can use to extend their capabilities.

Available Tools

ToolDescription
calculatorMath expression evaluation
web_searchSearch the web
http_requestMake HTTP requests
file_readRead file contents
file_writeWrite to files
json_parseParse JSON data
base64Encode/decode Base64

Configuring Tools

Enable tools in sekuire.yml:

sekuire.ymlyaml
agents: assistant: name: "AI Assistant" tools: "./tools.json" # or inline: tools: - calculator - web_search - http_request

Calculator Tool

Evaluates mathematical expressions safely.

typescript
import { CalculatorTool } from '@sekuire/sdk'; const calc = new CalculatorTool(); const result = await calc.execute({ expression: '2 + 2 * 3' }); console.log(result); // 8

HTTP Request Tool

Make HTTP requests to external APIs.

typescript
import { HttpRequestTool } from '@sekuire/sdk'; const http = new HttpRequestTool(); const result = await http.execute({ method: 'GET', url: 'https://api.example.com/data', headers: { 'Authorization': 'Bearer token' } }); console.log(result);

Tool Registry

Use the registry to discover and manage tools:

typescript
import { createDefaultToolRegistry } from '@sekuire/sdk'; const registry = createDefaultToolRegistry(); // List all tools const tools = registry.list(); console.log(tools.map(t => t.name)); // Get specific tool const calc = registry.get('calculator');

Custom Tools

Define custom tools in tools.json:

tools.jsonjson
[ { "name": "get_weather", "description": "Get current weather for a location", "parameters": { "type": "object", "properties": { "location": { "type": "string", "description": "City name" } }, "required": ["location"] } } ]

Then implement the handler:

typescript
// tools/get_weather.ts export async function getWeather(params: { location: string }) { const response = await fetch( `https://api.weather.com/${params.location}` ); return response.json(); }

Next Steps