ai11y docs
    Preparing search index...

    Class ToolRegistry

    Registry for managing tools that can be called by the LLM agent. This allows extending the agent with custom tools.

    Index

    Constructors

    Methods

    • Convert OpenAI tool call to our Instruction format

      Parameters

      • toolCall: { function: { arguments: string; name: string }; type: "function" }

      Returns Instruction | null

    • Execute a tool call

      Parameters

      • toolName: string
      • args: Record<string, unknown>
      • context: Ai11yContext

      Returns Promise<unknown>

    • Get all registered tool definitions for OpenAI function calling

      Returns { function: ToolDefinition; type: "function" }[]

    • Check if a tool is registered

      Parameters

      • name: string

      Returns boolean

    • Unregister a tool

      Parameters

      • name: string

      Returns void