Name

The name of the tool that will be provided to the agent.

For best results, function names should be descriptive. Along with the description they are used to guide the agent.

LanguageSupported
Node.js
Go
.Net

Description

A human-readable description of the tool, use this to augment the agent’s understanding of the tool and when to use it.

LanguageSupported
Node.js
Go
.Net

Schema

LanguageSupportedNotes
Node.jsThrough the schema option
Go☑️Not required. Inferred via Reflection
.Net☑️Not required. Inferred via Reflection

Node.js

schema is only applicable to languages where the SDK cannot reflect the function type at runtime. NodeJS require the schema to be specified, however Go and .Net do not.

In Node.js, a zod schema that defines the input shape of the function. The schema is used to explain how to use the function, and to validate the input before the function is executed.

Handler

The handler that will be executed when Inferable invokes the function. This handler runs within your environment.

LanguageSupported
Node.js
Go
.Net

Config object

Additional configuration options for the function.

Retry Count on Stall

LanguageSupportedOption
Node.jsconfig.retryCountOnStall
Go
.Net

The number of times Inferable will retry the function call if the function stalls.

A function can stall if it does not complete within the allotted time. This usually happens if:

Without this configuration, Inferable will not retry the function call.

timeoutSeconds

LanguageSupportedOption
Node.jsconfig.timeoutSeconds
Go
.Net

The number of seconds Inferable will wait before timing out the function call.

cache

LanguageSupportedOption
Node.jsconfig.cache
Go
.Net

Used to cache the result of the function for a specified amount of time.

  • ttl - The time in milliseconds that the result of the function will be cached.
  • keyPath - The path (described using JSONPath) to the unique identifier in the function’s input.

private

LanguageSupportedOption
Node.jsconfig.private
Go
.Net

When set to true, the function will not be made available to the agent. This is can be used for functions registered as onStatusChange handlers.