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

draft a demo code for agent memory. #851

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

lkk12014402
Copy link
Collaborator

@lkk12014402 lkk12014402 commented Nov 4, 2024

Description

integrate llama stack implementations of the agent memory, refer https://github.com/meta-llama/llama-stack/blob/main/llama_stack/providers/impls/meta_reference/agents/agents.py#L27

image

Copy link

codecov bot commented Nov 4, 2024

Codecov Report

Attention: Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
comps/cores/proto/agents/agents.py 0.00% 8 Missing ⚠️
comps/cores/proto/agents/__init__.py 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
comps/cores/proto/agents/__init__.py 0.00% <0.00%> (ø)
comps/cores/proto/agents/agents.py 0.00% <0.00%> (ø)

@minmin-intel
Copy link
Collaborator

minmin-intel commented Nov 4, 2024

A few thoughts from my side:

  1. Langgraph has "checkpoint" and "store" for short-term and long-term memory, both have in-memory and also SQL db based implementations. We can utilize those langgraph APIs. https://langchain-ai.github.io/langgraph/concepts/persistence/, https://langchain-ai.github.io/langgraph/reference/checkpoints/, https://langchain-ai.github.io/langgraph/reference/store/
  2. What and how to save/retrieve/use memories: depend on different agent designs, but we should provide common functions, for example, save agent_id, thread_id, messages - these will be part of our assistants APIs.
  3. Ultimately (may be not in v1.1 release), the memories will be microservices, and agents send requests to memory DBs. Your diagram captured that, which I agree. Right now, langgraph implemented postgres sql db based checkpointers and stores. Langgraph also has an example showing vector db as memory store. We need to decide which DBs to support and the interface.
  4. We should expose a unified interface to send requests to memory microservices and process the returns from memory microservices, so that from agent developer point of view, they just need to use this unified interface with the memory endpoint url, agent_id, thread_id, and content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants