Class: DeepAgents::Graph::ReactAgentWrapper
- Inherits:
-
Object
- Object
- DeepAgents::Graph::ReactAgentWrapper
- Defined in:
- lib/deepagents/graph.rb
Overview
Wrapper class to maintain compatibility with ReactAgent interface
Instance Attribute Summary collapse
-
#instructions ⇒ Object
readonly
Returns the value of attribute instructions.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#tools ⇒ Object
readonly
Returns the value of attribute tools.
Instance Method Summary collapse
-
#initialize(langgraph_agent, tools, instructions, model, state) ⇒ ReactAgentWrapper
constructor
A new instance of ReactAgentWrapper.
- #run(max_iterations = 10) ⇒ Object
Constructor Details
#initialize(langgraph_agent, tools, instructions, model, state) ⇒ ReactAgentWrapper
Returns a new instance of ReactAgentWrapper.
194 195 196 197 198 199 200 |
# File 'lib/deepagents/graph.rb', line 194 def initialize(langgraph_agent, tools, instructions, model, state) @langgraph_agent = langgraph_agent @tools = tools @instructions = instructions @model = model @state = state end |
Instance Attribute Details
#instructions ⇒ Object (readonly)
Returns the value of attribute instructions.
192 193 194 |
# File 'lib/deepagents/graph.rb', line 192 def instructions @instructions end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
192 193 194 |
# File 'lib/deepagents/graph.rb', line 192 def model @model end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
192 193 194 |
# File 'lib/deepagents/graph.rb', line 192 def state @state end |
#tools ⇒ Object (readonly)
Returns the value of attribute tools.
192 193 194 |
# File 'lib/deepagents/graph.rb', line 192 def tools @tools end |
Instance Method Details
#run(max_iterations = 10) ⇒ Object
202 203 204 |
# File 'lib/deepagents/graph.rb', line 202 def run(max_iterations = 10) @langgraph_agent.run(max_iterations: max_iterations) end |