-
-
Notifications
You must be signed in to change notification settings - Fork 322
more precise docs on memory #58
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
Comments
Yes new messages are automatically added to the memory. I agree we could use some better docs on that, for now I'd advise to have a look in the source file of the memory, there is an elaborate mainguard that, if you run it, demos everything memory can do...
I would just do something like: agent_one.memory.add_message("system", OUTPUT OF AGENT TWO)
OR
agent_one.memory.add_message("user", OUTPUT OF AGENT TWO) depending on what is allowed by your LLM provider/client (some don't allow system messages past the first message, for example) I will leave this issue open for now as it pertains to improving the docs |
@KennyVaneetvelde - I was going to open a new issue but this one is related enough that we may be able to address it here. When I was poking through AgentMemory I didn't see any place where the turn gets reset. I didn't see it in the BaseAgent either. My understanding is that a "turn" is generally a single exchange User -> Assistant. Is that the same definition atomic-agents wants to go with or is a "turn" equivalent to something closer to a "session"? |
I'd be interested in knowing this too. My understanding of |
Wow I am so so sorry for missing this question So, the .run() method in an agent can be used in two ways. Either you have an input parameter, or you don't. If you have an input parameter, this is a new user message, and a new user message is a new interaction, so a new turn. If for some reason you do something more (semi or fully) autonomous, like (pseudocode)
Then that means that as long as you don't exit that while loop and do another .run() with some input, that is still one turn, but now that one turn has a user message followed by maybe the agent executing a tool, contemplating, executing another tool, ... Just visualize it as if it is a chat window, really, and every time you type its a turn Anyways, came here to say this issue and #115 should be picked up together |
Memory is great, its unclear however how messages get added.
in most of the examples only the initial message is added, not any subsequent runs - is this automatic?
how would you handle lets say a loop where one agent does a thing, the second evaluates and then passes the result to memory for the first agent to do again.
The text was updated successfully, but these errors were encountered: