Module: ActiveAgent::Tooling

Extended by:
ActiveSupport::Concern
Included in:
Base
Defined in:
lib/active_agent/concerns/tooling.rb

Overview

Provides tool/function calling support for agent classes.

Enables agent classes to respond to tool calls from providers by routing them to the appropriate action methods.

Instance Method Summary collapse

Instance Method Details

#tools_functionProc

Returns a proc that handles tool/function calls from providers.

The proc routes tool calls to the appropriate action method using the #process method.

Returns:

  • (Proc)

    callback proc that accepts (action_name, *args, **kwargs)



17
18
19
20
21
# File 'lib/active_agent/concerns/tooling.rb', line 17

def tools_function
  proc do |action_name, *args, **kwargs|
    process(action_name, *args, **kwargs)
  end
end