API Reference fnord v#0.8.24
View SourceModules
When file or other input to too large for the model's context window, this
module may be used to process the file in chunks. It automatically modifies
the supplied agent prompt to include instructions for accumulating a response
across multiple chunks based on the context
(max context window tokens)
parameter supplied by the model
parameter.
This agent uses a combination of the reasoning features of the OpenAI o3-mini model as well as its own reasoning process to research and answer the input question.
This module provides an agent that summarizes files' contents in order to generate embeddings for the database and summaries for the user.
This module sends a request to the model and handles the response. It is able to handle tool calls and responses.
Coordinates the mini-agents that manage project research notes. The workflow for this is
OpenAI's tokenizer uses regexes that are not compatible with Erlang's regex engine. There are a couple of modules available on hex, but all of them require a working python installation, access to rustc, a number of external dependencies, and some env flags set to allow it to compile.
This module is used to split a string into chunks by the number of tokens, while accounting for other data that might be going with it to the API endpoint with the limited token count.
This module defines the behaviour for tool calls. Defining a new tool
requires implementing the spec/0
and call/2
functions.
Currently, this module is not used as a tool_call directly. Instead, it is
used by AI.Tools.Coder
, the tool directly called by the AI agent. This tool
is instead used to perform the file edits themselves, after the AI-backed
tool does the work of identifying the lines to edit and the replacement text.
Lists all available projects except for the current project.
A tool for executing shell commands.
Fnord is a code search tool that uses OpenAI's embeddings API to index and search code files.
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.
Module for interacting with git.
This module provides a mechanism to perform actions only once, using a unique key provided by the caller to determine whether the action has already been performed this session.
Conversations are stored per project in the project's store dir, under
converations/
. Each file is mostly JSON, but with a timestamp prepended
to the JSON data, separated by a colon. This allows for easy sorting, without
having to parse dozens or hundreds of messages for each file.
Formats output strings using an external command specified by the
FNORD_FORMATTER
environment variable. If unset or empty, returns the
original string. On command failure or non-zero exit code, logs a warning and
returns the original string.