Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hierarhical CrewAI's memory dosnt work. #6018

Open
MotherSoraka opened this issue Jan 30, 2025 · 6 comments
Open

Hierarhical CrewAI's memory dosnt work. #6018

MotherSoraka opened this issue Jan 30, 2025 · 6 comments
Labels
bug Something isn't working

Comments

@MotherSoraka
Copy link

Bug Description

The hierarchical agent crews store no memory at all, even when their memory toggles are enabled,
they do not store any memory of their past interactions with the Manager Agent or other Agents.

Reproduction

Create a simple hierarchical agents with 1 manager agent and 2 or 3 agents as workers + a hierarchical task.
ask the manager to keep sharing the feedback of the agents back to each other to improve their previous responses.
Enable the memory toggle on all modules/components.

and notice how every-time the manager sends a second or third message back to an agent, the agent is starting frosh with no memories at all.

Expected behavior

Each agent should store their memory of recent interactions with their manager (of the current ongoing run)

Who can help?

No response

Operating System

Windows 10

Langflow Version

1.1.2

Python Version

3.12

Screenshot

Image

Flow File

No response

@MotherSoraka MotherSoraka added the bug Something isn't working label Jan 30, 2025
Copy link

dosubot bot commented Jan 30, 2025

The issue you're experiencing with hierarchical agents not storing memory, even when memory toggles are enabled, could be related to the conditions required for memory toggles to function correctly. Here are some key points to check:

  1. Memory Attribute: Ensure that each agent's langchain_object has a memory attribute with a memory_key. This is crucial for memory management to work properly.

  2. Input and Output Keys: Verify that the input_keys and output_keys of each agent's langchain_object contain keys that can be updated to exclude the current and new memory keys. This is necessary for the memory toggles to update correctly.

  3. Setting Memory Keys: The memory attribute must allow setting of input_key, output_key, and memory_key without raising a ValueError. If any of these settings are restricted, it could prevent memory from being stored.

  4. Synchronization: Langflow uses KeyedMemoryLockManager and KeyedWorkerLockManager to manage memory synchronization between manager and worker agents. Ensure these mechanisms are functioning as expected to allow shared memory access [1][2].

If these conditions are met and the issue persists, it might be a bug in the current version of Langflow (1.1.2). Consider checking for any updates or patches that might address this issue.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@MotherSoraka
Copy link
Author

this error may be related i guess:

ERROR: Error during short_term save: APIStatusError.__init__() missing 2 required keyword-only arguments: 'response' and 'body'

@dosu

Copy link

dosubot bot commented Jan 30, 2025

The error message you're encountering indicates that the APIStatusError class's __init__ method is missing two required keyword-only arguments: response and body. This suggests that when the APIStatusError is being instantiated, these arguments are not being provided, which is causing the error.

To resolve this issue, you should check the part of the code where APIStatusError is being instantiated. Ensure that both response and body arguments are correctly passed to the __init__ method. If you have access to the code, look for the instantiation of APIStatusError and verify that these arguments are included.

If this is part of the Langflow codebase and you cannot modify it directly, consider reporting this as a bug to the maintainers, as it might require a fix in the code to ensure these arguments are always provided when the error is raised.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@MotherSoraka
Copy link
Author

dont you have access to the code?
can you find the culprit?
@dosu

Copy link

dosubot bot commented Jan 30, 2025

I don't have direct access to the Langflow codebase to search for specific instances of the APIStatusError class being instantiated. However, you can search the codebase for where APIStatusError is used. Look for any instantiation of this class and check if the response and body arguments are being passed correctly. If you find that these arguments are missing, that would likely be the cause of the error you're encountering. If you're unable to modify the code, it might be necessary to report this issue to the maintainers for a fix.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@carlosrcoelho
Copy link
Contributor

@MotherSoraka

Please try on version 1.1.3

Image

Hierarchical Crew.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants