Module: ComposableAgents::Mixins::AiAgentUserInteraction

Defined in:
lib/composable_agents/mixins/ai_agent_user_interaction.rb

Overview

Mixin that adds user interaction capabilities to AiAgent::Agent agents. This uses an AiAgent tool to then call the normal UserInteraction interface.

Internal collapse

Class Method Details

.prepended(base) ⇒ Object

Hook used when this mixin is included in a base class

Parameters:

  • base (Class)

    The base class



11
12
13
# File 'lib/composable_agents/mixins/ai_agent_user_interaction.rb', line 11

def self.prepended(base)
  base.include(UserInteraction)
end

Instance Method Details

#agent_toolsArray<Agents::Tool>

Returns the list of tools available for this agent

Returns:

  • (Array<Agents::Tool>)

    List of tools



18
19
20
# File 'lib/composable_agents/mixins/ai_agent_user_interaction.rb', line 18

def agent_tools
  super + [AiAgents::Tools::AskUserTool.new(self)]
end