All Inferable clusters have access to a standard library of functions.

Semantics:

  • When you create a run, they are attached by default.
  • When you create a run with other run.attachedFunctions property, they are not attached.
  • You can attach them explicitly to a run by using the run.attachFunctions property.
  • You can disable them selectively at the cluster level. (Open issue)

All standard library functions are prefixed with inferable_. Therefore, inferable_ is a service name.

Functions

inferable_calculatorTool

Provides basic arithmetic calculation capabilities to the agent. This tool can perform mathematical operations like addition, subtraction, multiplication, and division.

It evaluates a python expression and returns the result as a string, so the agent can do complex calculations like inferable_calculatorTool("1+2*(3**4)").

{
  result: "1025";
}

inferable_currentDateTimeTool

Allows the agent to access the current date and time information. This is useful for time-sensitive operations or when temporal context is needed.

{
  iso8601: new Date().toISOString(),
  unix: new Date().getTime(),
}

inferable_getUrlTool

Enables the agent to fetch content from specified URLs, and return the content as markdown, and metadata as JSON.

{
  content: "## Hello World",
  metadata: {
    url: "https://inferable.ai",
  },
}