Frobs (fnord v0.8.83)

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:

  • spec.json: A JSON file that defines the tool call's calling semantics
  • main: A script or binary that performs the action
  • available: A script or binary that exits non-zero if the frob is not
                  available in the current context (e.g. dependencies,
                  environment, etc.)

Enablement via Settings.Frobs: Frobs are enabled via settings.json using approvals-style arrays managed by Settings.Frobs:

  • Global: top-level frobs array of names
  • Project: per-project projects.<name>.frobs arrays The effective enabled set is the union of global and the currently selected project's list.

Runtime environment: 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

Types

t()

@type t() :: %Frobs{
  available: term(),
  home: term(),
  main: term(),
  module: term(),
  name: term(),
  spec: term()
}

Functions

create(name)

create_tool_module(frobs)

create_tool_module(name, spec)

is_available?(name)

list()

@spec list() :: [t()]

load(name)

load_all_modules()

@spec load_all_modules() :: :ok

module_map()

@spec module_map() :: %{required(binary()) => module()}

perform_tool_call(name, args_json)