MCPcopy Create free account
hub / github.com/SkyworkAI/DeepResearchAgent / ToolCallingAgentLLM

Class ToolCallingAgentLLM

examples/run_aime_reflection_experiment.py:124–141  ·  view source on GitHub ↗

Minimal Module that proxies inference to the tool-calling agent.

Source from the content-addressed store, hash-verified

122
123
124class ToolCallingAgentLLM(Module):
125 """Minimal Module that proxies inference to the tool-calling agent."""
126
127 def __init__(self, runner: ToolCallingAgentRunner, system_prompt: Variable):
128 self.runner = runner
129 self.system_prompt = system_prompt
130
131 def parameters(self) -> List[Variable]:
132 return [self.system_prompt] if self.system_prompt else []
133
134 def forward(self, x: Variable) -> Variable:
135 system_prompt_value = self.system_prompt.value if self.system_prompt else ""
136 response_text = self.runner(system_prompt_value, x.value)
137 return Variable(
138 value=response_text,
139 requires_grad=False,
140 role_description="tool_calling_agent_response",
141 )
142
143
144async def _async_prepare_tool_agent(

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected