Class: LittleGhost::AgentBuilder
- Inherits:
-
Object
- Object
- LittleGhost::AgentBuilder
- Defined in:
- lib/little_ghost/agent_builder.rb
Overview
:nodoc: all
Defined Under Namespace
Classes: ActivityRelay
Instance Method Summary collapse
- #build(agent_class_or_name, run:, model: nil, tools: [], conversation_id: nil, agent_path: Subagents::AgentPath::ROOT) ⇒ Object
-
#initialize(runtime:, prompt_paths:, resolve_agent:) ⇒ AgentBuilder
constructor
A new instance of AgentBuilder.
Constructor Details
#initialize(runtime:, prompt_paths:, resolve_agent:) ⇒ AgentBuilder
Returns a new instance of AgentBuilder.
20 21 22 23 24 |
# File 'lib/little_ghost/agent_builder.rb', line 20 def initialize(runtime:, prompt_paths:, resolve_agent:) @runtime = runtime @prompt_paths = prompt_paths @resolve_agent = resolve_agent end |
Instance Method Details
#build(agent_class_or_name, run:, model: nil, tools: [], conversation_id: nil, agent_path: Subagents::AgentPath::ROOT) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/little_ghost/agent_builder.rb', line 26 def build( agent_class_or_name, run:, model: nil, tools: [], conversation_id: nil, agent_path: Subagents::AgentPath::ROOT ) agent_class = @resolve_agent.call(agent_class_or_name) build_agent(agent_class, run:, model:, tools:, conversation_id:, agent_path:) end |