Skip to content

Commit f62f011

Browse files
authored
[LLMAgent]fix: get tool_list from current agent to parse tool name
1 parent ceaa80e commit f62f011

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

aworld/agents/llm_agent.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ async def parse(self, resp: ModelResponse, **kwargs) -> AgentResult:
8181
params = {}
8282

8383
# format in framework
84-
agent_info = AgentFactory.agent_instance(agent_id)
84+
#agent_info = AgentFactory.agent_instance(agent_id)
85+
agent_info = kwargs.get("agent")
8586
original_name = full_name
8687
if (not full_name.startswith("mcp__") and agent_info and agent_info.sandbox and
8788
agent_info.sandbox.mcpservers and agent_info.sandbox.mcpservers.mcp_servers):
@@ -648,6 +649,7 @@ async def async_policy(self, observation: Observation, info: Dict[str, Any] = {}
648649
else:
649650
agent_result = await self.output_converter.parse(llm_response,
650651
agent_id=self.id(),
652+
agent=self,
651653
use_tools_in_prompt=self.use_tools_in_prompt)
652654
# skip summary on final round
653655
await self._add_message_to_memory(payload=llm_response,

0 commit comments

Comments
 (0)