Skip to content

[BUG]: Agent Communication is not built properly for prompt templates #241

@cemde

Description

@cemde

Description of the bug

TLDR: in the BaseAgent act method, the tool descriptions do not populate agents properly. In my opinion The enum in the prompt should use available_agents.keys() instead of self.relationships.keys().

BaseAgent.act() builds an available_agents dict (marble/agent/base_agent:L144-162) by scanning self.agent_graph.relationships bidirectionally, then correctly uses it for the tool's description field. But the enum field on the same parameter referenced self.relationships.keys() instead. self.relationships is a separate per-agent dict that AgentGraph.add_relationship() only seems to populate for the source side of each edge. The way I understand the code self.agent_graph.relationships is the full edge list, self.relationships is only one-way. Hence, taking the description from one and the enum from the other seems wrong.

In my opinion: This line should be available_agents.keys() instead. Or if I am missing something the agent_descriptions above should be based on self.relationships not self.agent_graph.relationship.

If the authors agree, I am happy to create a PR.

Steps To Reproduce

This bug is not about unexpected runtime behavior.

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions