Frobs (fnord v0.7.16)

View Source

Frobs are external tool call integrations. They allow users to define external actions that can be executed by the LLM while researching the user's query.

Frobs are stored in $HOME/.fnord/tools/$frob_name and are composed of:

  • registry.json: A JSON file that registers the frob for the user's projects
  • spec.json: A JSON file that defines the tool call's calling semantics
  • main: A script or binary that performs the action

The registry.json file contains the following fields:

{
  // When true, the frob is available to all projects and the "projects"
  // field is ignored.
  "global": true,

  // An array of project names for which fnord should make the frob
  // available. Superseded by the "global" field when set to true.
  "projects": ["my_project", "other_project"]
}

The "name" field in spec.json is used to register the frob with the LLM. This name must match the frob's directory name.

If desired, the user can add a lib/util/etc directory to hold any utility or helper code to be used by main.

Fnord communicates run-time information to the frob via environment variables:

  • FNORD_PROJECT # The name of the currently selected project
  • FNORD_CONFIG # JSON object of project config
  • FNORD_ARGS_JSON # JSON object of LLM-provided arguments

Summary

Functions

create(name)

create_tool_module(frob)

list(project \\ nil)

load(name)

perform_tool_call(name, args_json)