You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Discussion: Custom Tool Not Found in ToolManager (Mesa-LLM)
📌 Summary
I am building a conflict-driven migration model using Mesa-LLM.
Each Citizen agent computes migration probability mathematically and uses the LLM only to explain its decision.
However, when running the model, I encounter a KeyError indicating that a custom tool is not found inside the agent’s ToolManager.
🧠 Model Architecture
Each Citizen agent:
Computes migration probability using a logistic function.
Uses an LLM only to explain its decision.
Has a custom tool called move_to_safe_place.
Uses a custom CITIZEN_TOOL_MANAGER.
🛠 Custom Tool Definition
@tool(tool_manager=CITIZEN_TOOL_MANAGER)defmove_to_safe_place(agent: "LLMAgent", state: str) ->str:
""" Migrate citizen to safe zone. Args: agent: The Citizen agent performing migration. Returns: A message describing the migration result. """
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Discussion: Custom Tool Not Found in ToolManager (Mesa-LLM)
📌 Summary
I am building a conflict-driven migration model using Mesa-LLM.
Each
Citizenagent computes migration probability mathematically and uses the LLM only to explain its decision.However, when running the model, I encounter a
KeyErrorindicating that a custom tool is not found inside the agent’sToolManager.🧠 Model Architecture
Each
Citizenagent:move_to_safe_place.CITIZEN_TOOL_MANAGER.🛠 Custom Tool Definition
🚨 Where the Error Occurs
Inside the agent:
❌ Error Message
Traceback shows the failure occurs inside:
Specifically at:
The tool
"move_to_safe_place"is not found inside the agent’sToolManager.🔍 Observed Behavior
@tool(tool_manager=CITIZEN_TOOL_MANAGER).reasoning.plan()withselected_tools=["move_to_safe_place"].self.agent.tool_manager.toolsdoes not contain"move_to_safe_place".🤔 Suspected Causes
One of the following may be happening:
CITIZEN_TOOL_MANAGER.selected_toolsdoes not match the registered key.ToolManageris not properly attached to the agent.Any guidance on properly wiring a custom
ToolManagerin Mesa-LLM would be greatly appreciated.Beta Was this translation helpful? Give feedback.
All reactions