🔄 Big News! bazed.ai is now sagentic.ai. Same vision, new name!

Skip to content

@sagentic-ai/sagentic-af / Tool

Tool ​

Properties ​

describe ​

ts
describe: () => ChatCompletionTool;

Convert a tool to OpenAI compatible tool schema.

Returns ​

ChatCompletionTool

OpenAI compatible JSON schema as JS object

Source ​

src/tool.ts:32


description ​

ts
description: string;

Description of the tool

Source ​

src/tool.ts:20


invoke ​

ts
invoke: (agent, args) => Promise<any>;

Invoke the tool.

Parameters ​

• agent: Agent

• args: any

Arguments for the tool

Returns ​

Promise<any>

Return value of the tool

Throws ​

Error if the arguments are invalid or not supported

Source ​

src/tool.ts:27


name ​

ts
name: string;

Name of the tool

Source ​

src/tool.ts:17