From 7964b1b7b9556b165dc3cd6fa92ff89b26f0551d Mon Sep 17 00:00:00 2001 From: kingjulio8238 <120517860+kingjulio8238@users.noreply.github.com> Date: Mon, 17 Jun 2024 17:37:15 -0700 Subject: [PATCH 01/11] Update README.md Updated descriptions & structure --- README.md | 508 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 351 insertions(+), 157 deletions(-) diff --git a/README.md b/README.md index afa4e642..57b646ed 100644 --- a/README.md +++ b/README.md @@ -1,87 +1,121 @@ -# memary: Open-Source Longterm Memory for Autonomous Agents memary logo +# memary: Emulating Human Memory for Agentic Systems memary logo [![Documentation](https://img.shields.io/badge/Documentation-memary-428BCA?style=flat&logo=open-book)](https://kingjulio8238.github.io/memarydocs/) [![Demo](https://img.shields.io/badge/Watch-Demo-red?logo=youtube)](https://youtu.be/GnUU3_xK6bg) +[![PyPI](https://img.shields.io/pypi/v/memary.svg?style=flat&color=orange)](https://pypi.org/project/memary/) +[![Downloads](https://img.shields.io/pypi/dm/memary.svg?style=flat&label=Downloads)](https://pypi.org/project/memary/) +[![Last Commit](https://img.shields.io/github/last-commit/kingjulio8238/memary.svg?style=flat&color=blue)](https://github.com/kingjulio8238/memary) +[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -## Why use memary? -Agents use LLMs that are currently constrained to finite context windows. memary overcomes this limitation by allowing your agents to store a large corpus of information in knowledge graphs, infer user knowledge through our memory modules, and only retrieve relevant information for meaningful responses. +## Manage Your AI Agent Memories -## Features +Agents promote human-type reasoning and is an advancement towards building AGI and understanding ourselves. Memory is a key component of how humans approach tasks and should be weighted the same when building agentic systems. memary emulates human memory to advance these agentic systems. -- **Routing Agent:** Leverage a ReAct agent to route a query for execution amongst many tools. -- **Knowledge Graph Creation & Retrieval:** Leverage Neo4j to create knowledge graphs storing agent responses for later retrieval. -- **Memory Stream:** Track all entities stored in the knowledge graph using entity extraction. This stream reflects the user's breadth of knowledge. -- **Entity Knowledge Store:** Group and order all the entities in the memory stream and pass the top N entities into the context window. This knowledge store reflects the user's depth of knowledge. +## Memory Dashboard ๐Ÿง  +(coming soon) + +| Features | Benefits | +|---------------------------------------------------|----------------------------------------------------------------| +| ๐Ÿ—ฃ๏ธ Chat to Agent Memory | Access certain memories | +| ๐Ÿง  Analyze Agent Learnings | Track how agents develop their memory over time | +| โฎ๏ธ Rewind Executions | Review agent memories to understand specific responses | +| ๐Ÿง‘โ€๐Ÿง‘โ€๐Ÿง’โ€๐Ÿง’ Audience Preferences | Understand audiences' best and most recent preferences | +| โœ๐Ÿป memaryParse | Inject proprietary data into agent memory | +| ๐Ÿ”— Parent Parsers | Combine parsers for advanced data ingestion | +| ๐Ÿงช Configure Agent Memory | Search and combine memory databases | +| ๐Ÿ› Playgrounds | Specify models and tools used as well as benchmark different memory techniques | +| ๐Ÿ” Stay Up To Date | Receive notifications when agent memories have been added, updated or removed | -## How it works -The current structure of memary is detailed in the diagram below. - -memary overview - -The above process includes the routing agent, knoweldge graph and memory module are all integrated into the `ChatAgent` class located in the `src/agent` directory. +## Quickstart ๐Ÿ -Raw source code for these components can also be found in their respective directories including benchmarks, notebooks, and updates. - -## Installation +### Install memary 1. With pip: + +Make sure you are running python version <= 3.11.9, then run ``` pip install memary ``` 2. Locally: - 1. Create your [virtual environment](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#create-and-use-virtual-environments) and activate it. Note that Python versions 3.12 or greater are not supported by a key dependancy, llama-index and reccomended to run of python versions <= 3.11.9. + +i. Create a virtual environment with the python version set as specified above - 2. Install Python dependencies: - ``` - pip install -r requirements.txt - ``` +ii. Install python dependencies: +``` +pip install -r requirements.txt +``` +### Specify Models Used +At the time of writing, memary assumes installation of local models and we currently support all models available through **Ollama**: + +- LLM running locally using Ollama (`Llama 3 8B/40B` as suggested defaults) **OR** `gpt-3.5-turbo` +- Vision model running locally using Ollama (`LLaVA` as suggested default) **OR** `gpt-4-vision-preview` + +memary will default to the locally run models unless explicitly specified. Additionally, memary allows developers to **easily switch between downloaded models**. + +The current structure of memary is detailed in the diagram below. + +memary overview + +At the time of writing, the above system design includes the routing agent, knoweldge graph and memory module are all integrated into the `ChatAgent` class located in the `src/agent` directory. + +Raw source code for these components can also be found in their respective directories including benchmarks, notebooks, and updates. -## Demo -**Notes:** memary currently assumes the local installation method and currently supports any models available through Ollama: +### Run memary +**Note:** memary currently assumes the local installation method and currently supports any models available through Ollama: - LLM running locally using Ollama (Llama 3 8B/40B as suggested defaults) **OR** `gpt-3.5-turbo` - Vision model running locally using Ollama (LLaVA as suggested default) **OR** `gpt-4-vision-preview` memary will default to the locally run models unless explicitly specified. -**To run the Streamlit app:** +**Steps** 1. [Optional] If running models locally using Ollama, follow this the instructions in this [repo](https://github.com/ollama/ollama). -2. Ensure that a `.env` exists with any necessary API keys and Neo4j credentials. +2. Ensure that a `.env` exists with any necessary credentials. -``` -OPENAI_API_KEY="YOUR_API_KEY" -NEO4J_PW="YOUR_NEO4J_PW" -NEO4J_URL="YOUR_NEO4J_URL" -PERPLEXITY_API_KEY="YOUR_API_KEY" -GOOGLEMAPS_API_KEY="YOUR_API_KEY" -ALPHA_VANTAGE_API_KEY="YOUR_API_KEY" -``` - -3. How to get API keys: +
+ .env + + ``` + OPENAI_API_KEY="YOUR_API_KEY" + NEO4J_PW="YOUR_NEO4J_PW" + NEO4J_URL="YOUR_NEO4J_URL" + PERPLEXITY_API_KEY="YOUR_API_KEY" + GOOGLEMAPS_API_KEY="YOUR_API_KEY" + ALPHA_VANTAGE_API_KEY="YOUR_API_KEY" + ``` + +
+ -``` -OpenAI key: https://openai.com/index/openai-api +3. Fetch API credentials: +
+ API Info + ``` + OpenAI key: https://openai.com/index/openai-api -Neo4j: https://neo4j.com/cloud/platform/aura-graph-database/?ref=nav-get-started-cta - Click 'Start for free' - Create a free instance - Open auto-downloaded txt file and use the credentials + Neo4j: https://neo4j.com/cloud/platform/aura-graph-database/?ref=nav-get-started-cta + Click 'Start for free' + Create a free instance + Open auto-downloaded txt file and use the credentials -Perplexity key: https://www.perplexity.ai/settings/api + Perplexity key: https://www.perplexity.ai/settings/api -Google Maps: - Keys are generated in the 'Credentials' page of the 'APIs & Services' tab of Google Cloud Console https://console.cloud.google.com/apis/credentials + Google Maps: + Keys are generated in the 'Credentials' page of the 'APIs & Services' tab of Google Cloud Console + https://console.cloud.google.com/apis/credentials -Alpha Vantage: (this key is for getting real time stock data) - https://www.alphavantage.co/support/#api-key - Reccomend use https://10minutemail.com/ to generate a temporary email to use -``` + Alpha Vantage: (this key is for getting real time stock data) + https://www.alphavantage.co/support/#api-key + Reccomend use https://10minutemail.com/ to generate a temporary email to use + ``` +
4. Update user persona which can be found in `streamlit_app/data/user_persona.txt` using the user persona template which can be found in `streamlit_app/data/user_persona_template.txt`. Instructions have been provided - replace the curly brackets with relevant information. -5. . [Optional] Update system persona, if needed, which can be found in `streamlit_app/data/system_persona.txt`. +5. [Optional] Update system persona, if needed, which can be found in `streamlit_app/data/system_persona.txt`. + 6. Run: ``` @@ -89,7 +123,7 @@ cd streamlit_app streamlit run app.py ``` -## Usage +## More Basic Functionality ```python from memary.agent.chat_agent import ChatAgent @@ -108,6 +142,7 @@ chat_agent = ChatAgent( ) ``` Pass in subset of `['search', 'vision', 'locate', 'stocks']` as `include_from_defaults` for different set of default tools upon initialization. + ### Adding Custom Tools ```python def multiply(a: int, b: int) -> int: @@ -118,146 +153,305 @@ chat_agent.add_tool({"multiply": multiply}) ``` More information about creating custom tools for the LlamaIndex ReAct Agent can be found [here](https://docs.llamaindex.ai/en/stable/examples/agent/react_agent/). -### Removing Tools +### Removing Custom Tools ```python chat_agent.remove_tool("multiply") ``` -## Detailed Component Breakdown +## Core Concepts ๐Ÿงช + +### Principles +memary integrates itself onto your existing agents with as little developer implementation as possible. We achieve this sticking to a few principles. -### Routing Agent +- Auto-generated Memory + - After initializing memary, agent memory automatically updates as the agent interacts. This type of generation allows us to capture all memories to easily display in your dashboard. Additionally, we allow the combination of databases with little or no code! + +- Memory Modules + - Given a current state of the databases, memary tracks users' preferences which are displayed in your dashboard for analysis. + +- System Improvement + - memary mimics how human memory evolves and learns over time. We will provide the rate of your agents improvement in your dashboard. + +- Rewind Memories + - memary takes care of keeping track of all chats so you can rewind agent executions and access the agents memory at a certain period (coming soon). + +### Agent ![agent diagram](diagrams/routing_agent.png) -- Uses the [ReAct agent](https://react-lm.github.io/) to plan and execute a query given the tools provided. This type of agent can reason over which of the tools to use next to further the response, feed inputs into the selected tool, and repeat the process with the output until it determines that the answer is satisfactory. -- Current tool suite: - While we didn't emphasize equipping the agent with many tools, we hope to see memary help agents in the community equipped with a vast array of tools covering multi-modalities. - - **Location** - determines the user's current location and nearby surroundings using geocoder and googlemaps. - - **CV** - answers a query based on a provided image using gpt-4-vision-preview. - - **Search** - queries the knowledge graph for a response based on existing nodes and executes an external search if no related entities exist. -- How does it work? - - Takes in each query → selects a tool → executes and finds an answer to current step → repeats this process until it reaches a satisfactory answer. -- Purpose in larger system - - Each response from the agent is saved in the knowledge graph. You can view responses from various tools as distinct elements that contribute to the user's knowledge. -- Future contributions - - Make your own agent and add as many tools as possible! Each tool expands the agent's ability to answer a wide variety of queries. - - Create an LLM Judge that scores the routing agent and provides feedback. - - Integrate multiprocessing so that the agent can process multiple sub-queries simultaneously. We have open-sourced the query decomposition and reranking code to help with this! - -### Knowledge Graph +To provide developers, who don't have existing agents, access to memary we setup a simple agent implementation. We use the [ReAct](https://react-lm.github.io/) agent to plan and execute a query given the tools provided. + +While we didn't emphasize equipping the agent with many tools, the **search tool is crucial to retrieve information from the knowledge graph**. This tool queries the knowledge graph for a response based on existing nodes and executes an external search if no related entities exist. Other default agent tools include computer vision powered by LLaVa and a location tool using geococder and google maps. + +Note: In future version releases, the current ReAct agent (that was used for demo purposes) will be removed from the package so that **memary can support any type of agents from any provider**. + +``` py title="external_query" hl_lines="1" +def external_query(self, query: str): + messages_dict = [ + {"role": "system", "content": "Be precise and concise."}, + {"role": "user", "content": query}, + ] + messages = [ChatMessage(**msg) for msg in messages_dict] + external_response = self.query_llm.chat(messages) + + return str(external_response) +``` + +``` py title="search" hl_lines="1" +def search(self, query: str) -> str: + response = self.query_engine.query(query) + + if response.metadata is None: + return self.external_query(query) + else: + return response +``` + +### Knowledge Graphs ![KG diagram](diagrams/kg.png) -- What are knowledge graphs (KG)? - - KGs are databases that store information in the form of entities, which can be anything from objects to more abstract concepts and their relationships with one another. -- KGs vs other knowledge stores - - KGs provide more depth of essential context that can be easily retrieved. - - The knowledge store's graph structure allows information to be centered around certain entities and their relationships with other entities, thus ensuring that the context of the information is relevant. - - KGs are more adept at handling complex queries, as the varying relationships between different entities in the query can provide insight into how to join multiple subgraphs together. -- Knowledge graphs ↔ LLMs - - memary uses a Neo4j graph database to store knoweldge. - - Llamaindex was used to add nodes into the graph store based on documents. - - Perplexity (mistral-7b-instruct model) was used for external queries. -- What can one do with the KG? - - Inject the final agent responses into existing KGs. - - memary uses a [recursive retrieval](https://arxiv.org/pdf/2401.18059.pdf) approach to search the KG, which involves determining what the key entities are in the query, building a subgraph of those entities with a maximum depth of 2 away, and finally using that subgraph to build up the context. - - When faced with multiple key entities in a query, memary uses [multi-hop](https://neo4j.com/developer-blog/knowledge-graphs-llms-multi-hop-question-answering/) reasoning to join multiple subgraphs into a larger subgraph to search through. - - These techniques reduce latency compared to searching the entire knowledge graph at once. -- Purpose in larger system - - Continuously update the memory module with each node insertion. -- Future contributions - - Expand the graphโ€™s capabilities to support multiple modalities, i.e., images. - - Graph optimizations to reduce latency of search times. - -### Memory Module +#### Knowledge Graphs โ†” LLMs +- memary uses a Neo4j graph database to store knoweldge. +- Llama Index was used to add nodes into the graph store based on documents. +- Perplexity (mistral-7b-instruct model) was used for external queries. + +#### Knowledge Graph Use Cases +- Inject the final agent responses into existing KGs. +- memary uses a [recursive](https://arxiv.org/pdf/2401.18059.pdf) retrieval approach to search the KG, which involves determining what the key entities are in the query, building a subgraph of those entities with a maximum depth of 2 away, and finally using that subgraph to build up the context. +- When faced with multiple key entities in a query, memary uses [multi-hop](https://neo4j.com/developer-blog/knowledge-graphs-llms-multi-hop-question-answering/) reasoning to join multiple subgraphs into a larger subgraph to search through. +- These techniques reduce latency compared to searching the entire knowledge graph at once. + +``` py title="store in KG" hl_lines="1" +def query(self, query: str) -> str: + # get the response from react agent + response = self.routing_agent.chat(query) + self.routing_agent.reset() + # write response to file for KG writeback + with open("data/external_response.txt", "w") as f: + print(response, file=f) + # write back to the KG + self.write_back() + return response +``` -![Memory Module](diagrams/memory_module.png) +``` py title="recursive retrieval" hl_lines="1" +def check_KG(self, query: str) -> bool: + """Check if the query is in the knowledge graph. -- What is the memory module? + Args: + query (str): query to check in the knowledge graph -The memory module comprises the Memory Stream and Entity Knowledge Store. The memory module was influenced by the design of [K-LaMP](https://arxiv.org/pdf/2311.06318.pdf) proposed by Microsoft Research. + Returns: + bool: True if the query is in the knowledge graph, False otherwise + """ + response = self.query_engine.query(query) -1. The Memory Stream captures all entities inserted into the KG and their associated timestamps. This stream reflects the breadth of the users' knowledge, i.e., concepts users have had exposure to but no depth of exposure is inferred. - - Timeline Analysis: Map out a timeline of interactions, highlighting moments of high engagement or shifts in topic focus. This helps in understanding the evolution of the user's interests over time. - - Extract Themes: Look for recurring themes or topics within the interactions. This thematic analysis can help anticipate user interests or questions even before they are explicitly stated. -2. The Entity Knowledge Store tracks the frequency and recency of references to each entity stored in the memory stream. This knowledge store reflects users' depth of knowledge, i.e., concepts they are more familiar with than others. - - Rank Entities by Relevance: Use both frequency and recency to rank entities. An entity frequently mentioned (high count) and referenced recently is likely of high importance, and the user is well aware of this concept. - - Categorize Entities: Group entities into categories based on their nature or the context in which they're mentioned (e.g., technical terms, personal interests). This categorization aids in quickly accessing relevant information tailored to the user's inquiries. - - Highlight Changes Over Time: Identify any significant changes in the entities' ranking or categorization over time. A shift in the most frequently mentioned entities could indicate a change in the user's interests or knowledge. - - Additional information on the memory modules can be found [here](https://github.com/seyeong-han/KnowledgeGraphRAG) + if response.metadata is None: + return False + return generate_string( + list(list(response.metadata.values())[0]["kg_rel_map"].keys()) + ) +``` -- Purpose in larger system - - Compress/summarize the top N ranked entities in the entity knowledge store and pass to the LLMโ€™s finite context window alongside the agent's response and chat history for inference. - - Personalize Responses: Use the key categorized entities and themes associated with the user to tailor agent responses more closely to the user's current interests and knowledge level/expertise. - - Anticipate Needs: Leverage trends and shifts identified in the summaries to anticipate users' future questions or needs. -- Future contributions - - We currently extract the top N entities from the entitiy knowledge store and pass these entities into the context window for inference. memary can future benefit from more advanced memory compression techniques such as passing only entities that are in the agent's response to the context window. We look forward to related community contributions. +### Memory Modules -![Memory Compression](diagrams/memory_compression.png) +![Memory Module](diagrams/memory_module.png) + +The memory module comprises the **Memory Stream and Entity Knowledge Store.** The memory module was influenced by the design of [K-LaMP](https://arxiv.org/pdf/2311.06318.pdf) proposed by Microsoft Research. + +#### Memory Stream +The Memory Stream captures all entities inserted into the KG and their associated timestamps. This stream reflects the **breadth of the users' knowledge**, i.e., concepts users have had exposure to but no depth of exposure is inferred. +- Timeline Analysis: Map out a timeline of interactions, highlighting moments of high engagement or shifts in topic focus. This helps in understanding the evolution of the user's interests over time. + +``` py title="add to memory stream" hl_lines="1" +def add_memory(self, entities): + self.memory.extend([ + MemoryItem(str(entity), + datetime.now().replace(microsecond=0)) + for entity in entities + ]) +``` -## Future Integrations +- Extract Themes: Look for recurring themes or topics within the interactions. This thematic analysis can help anticipate user interests or questions even before they are explicitly stated. -As mentioned above, memary will benefit from the following integrations: +``` py title="retrieve from memory stream" hl_lines="1" +def get_memory(self) -> list[MemoryItem]: + return self.memory +``` -- Create an LLM Judge that scores the ReACT agent forming a feedback loop. See [Zooter](https://arxiv.org/abs/2311.08692) for insights. -- Expand the knowledge graphโ€™s capabilities to support multiple modalities, i.e., images. -- Optimize the graph to reduce latency of search times. -- Instead of extracting the top N entities from the entity knowledge store deploy more advanced memory compression techniques such as extracting only the entities included in the agentโ€™s response. -- Create an intuitive UI to switch between models easily. We aim to setup memary so that users can use it for free without any costly API integrations. +#### Entity Knowledge Store +The Entity Knowledge Store tracks the frequency and recency of references to each entity stored in the memory stream. This knowledge store reflects **users' depth of knowledge**, i.e., concepts they are more familiar with than others. +- Rank Entities by Relevance: Use both frequency and recency to rank entities. An entity frequently mentioned (high count) and referenced recently is likely of high importance, and the user is well aware of this concept. + +``` py title="select most relevant entities" hl_lines="1" +def _select_top_entities(self): + entity_knowledge_store = self.message.llm_message['knowledge_entity_store'] + entities = [entity.to_dict() for entity in entity_knowledge_store] + entity_counts = [entity['count'] for entity in entities] + top_indexes = np.argsort(entity_counts)[:TOP_ENTITIES] + return [entities[index] for index in top_indexes] +``` -Currently memary is structured so that the ReAct agent can only process one query at a time. We hope to see **multiprocessing** integrated so that the agent can process many subqueries simultaneously. We expect this to improve the relevancy and accuracy of responses. The source code for both decomposing the query and reranking the many agent responses has been provided, and once multiprocessing has been added to the system, these components can easily be integrated into the main `ChatAgent` class. The diagram below shows how the newly integrated system would work. +- Categorize Entities: Group entities into categories based on their nature or the context in which they're mentioned (e.g., technical terms, personal interests). This categorization aids in quickly accessing relevant information tailored to the user's inquiries. + +``` py title="group entities" hl_lines="1" +def _convert_memory_to_knowledge_memory( + self, memory_stream: list) -> list[KnowledgeMemoryItem]: + """Converts memory from memory stream to entity knowledge store by grouping entities + + Returns: + knowledge_memory (list): list of KnowledgeMemoryItem + """ + knowledge_memory = [] + + entities = set([item.entity for item in memory_stream]) + for entity in entities: + memory_dates = [ + item.date for item in memory_stream if item.entity == entity + ] + knowledge_memory.append( + KnowledgeMemoryItem(entity, len(memory_dates), + max(memory_dates))) + return knowledge_memory +``` -![Future Integrations](diagrams/final.png) +- Highlight Changes Over Time: Identify any significant changes in the entities' ranking or categorization over time. A shift in the most frequently mentioned entities could indicate a change in the user's interests or knowledge. +- Additional information on the memory module can be found [here](https://github.com/seyeong-han/KnowledgeGraphRAG) -### Query Decomposition +![Memory Compression](diagrams/memory_compression.png) -![QD Diagram](diagrams/query_decomposition.png) +### New Context Window +![New_Context_Window](https://github.com/kingjulio8238/memary/blob/tool-flexibility/diagrams/context_window.png?raw=true) + +Note: We utilize the the key categorized entities and themes associated with users to tailor agent responses more closely to the user's current interests/preferences and knowledge level/expertise. The new context window is made up of the following: + +- Agent response +``` py title="retrieve agent response" hl_lines="1" +def get_routing_agent_response(self, query, return_entity=False): + """Get response from the ReAct.""" + response = "" + if self.debug: + # writes ReAct agent steps to separate file and modifies format to be readable in .txt file + with open("data/routing_response.txt", "w") as f: + orig_stdout = sys.stdout + sys.stdout = f + response = str(self.query(query)) + sys.stdout.flush() + sys.stdout = orig_stdout + text = "" + with open("data/routing_response.txt", "r") as f: + text = f.read() + + plain = ansi_strip(text) + with open("data/routing_response.txt", "w") as f: + f.write(plain) + else: + response = str(self.query(query)) + + if return_entity: + # the query above already adds final response to KG so entities will be present in the KG + return response, self.get_entity(self.query_engine.retrieve(query)) + return response +``` -- What is query decomposition? - - A preprocessing technique that breaks down complex queries into simpler queries to expedite the LLMโ€™s ability to answer the prompt. It is important to note that this process leaves simple queries unchanged. -- Why decompose? - - User queries are complex and multifaceted, and base-model LLMs are often unable to fully understand all aspects of the query in order to create a succinct and accurate response. - - Allows an LLM of similar capabilities to answer easier questions and synthesize those answers to provide an improved response. -- How it works +- Most relevant entities +``` py title="retrieve important entities" hl_lines="1" +def get_entity(self, retrieve) -> list[str]: + """retrieve is a list of QueryBundle objects. + A retrieved QueryBundle object has a "node" attribute, + which has a "metadata" attribute. + + example for "kg_rel_map": + kg_rel_map = { + 'Harry': [['DREAMED_OF', 'Unknown relation'], ['FELL_HARD_ON', 'Concrete floor']], + 'Potter': [['WORE', 'Round glasses'], ['HAD', 'Dream']] + } + + Args: + retrieve (list[NodeWithScore]): list of NodeWithScore objects + return: + list[str]: list of string entities + """ + + entities = [] + kg_rel_map = retrieve[0].node.metadata["kg_rel_map"] + for key, items in kg_rel_map.items(): + # key is the entity of question + entities.append(key) + # items is a list of [relationship, entity] + entities.extend(item[1] for item in items) + if len(entities) > MAX_ENTITIES_FROM_KG: + break + entities = list(set(entities)) + for exceptions in ENTITY_EXCEPTIONS: + if exceptions in entities: + entities.remove(exceptions) + return entities +``` - - Initially, a LlamaIndex fine-tuned query engine approach was taken. However, the LangChain query engine was found to be faster and easier to use. LangChainโ€™s `PydanticToolsParser` framework was used. The query_engine_with_examples has been given 87 pre-decomposed queries (complex query + set of subqueries) to determine a pattern. Users can invoke the engine with individual queries or collate them into a list and invoke them by batch. - - Individual Invocation: `sub_qs = query_analyzer_with_examples.invoke( {"question": "What is 2 + 2? Why is it not 3?"} )` - - Batch Invocation: - `questions = [ "Where can I buy a Macbook Pro with an M3 chip? What is the difference to the M2 chip? How much more expensive is the M3?", "How can I buy tickets to the upcoming NBA game? What is the price of lower bowl seats versus nosebleeds? What is the view like at either seat?", "Between a Macbook and a Windows machine, which is better for systems engineering? Which chips are most ideal? What is the price difference between the two?",] ` +- Chat history (summarized to avoid token overflow) +``` py title="summarize chat history" hl_lines="1" +def _summarize_contexts(self, total_tokens: int): + """Summarize the contexts. + + Args: + total_tokens (int): total tokens in the response + """ + messages = self.message.llm_message["messages"] + + # First two messages are system and user personas + if len(messages) > 2 + NONEVICTION_LENGTH: + messages = messages[2:-NONEVICTION_LENGTH] + del self.message.llm_message["messages"][2:-NONEVICTION_LENGTH] + else: + messages = messages[2:] + del self.message.llm_message["messages"][2:] + + message_contents = [message.to_dict()["content"] for message in messages] + + llm_message_chatgpt = { + "model": self.model, + "messages": [ + { + "role": "user", + "content": "Summarize these previous conversations into 50 words:" + + str(message_contents), + } + ], + } + response, _ = self._get_gpt_response(llm_message_chatgpt) + content = "Summarized past conversation:" + response + self._add_contexts_to_llm_message("assistant", content, index=2) + logging.info(f"Contexts summarized successfully. \n summary: {response}") + logging.info(f"Total tokens after eviction: {total_tokens*EVICTION_RATE}") +``` - `responses = [] for question in questions: responses.append(query_analyzer_with_examples.invoke({"question": question}))` +## Future Features ๐Ÿ”œ -- Purpose in larger system - - In a parallel system, the agent will be able to parse multiple queries at once. The query decomposer (QD) will pass all subqueries (or original query if no subqueries exist) to the agent at once. - - Simultaneously, QD will pass the original query to the reranking module to rerank the agent responses based on their relevance to the pre-decomposed query. -- Future contributions - - Once agent multiprocessing is integrated, QD will be valuable to leverage. All user queries will be passed to QD, and the (sub)queries wil be passed to the routing agent for parallel processing. - - Self-Learning: Whenever queries are decomposed, those examples will be appended to the engineโ€™s example store as a feedback loop for improved future performance. +### Speak to Your Agents Memory +memary's **chat interface** offers a portal to access agent memories, integrating capabilitiies such as **searching** (e.g., "What do we know about Emily?"), **removing** memories (e.g., "Remove Emily as a customer"), viewing agent memory **over specified periods** ("What did agent X learn today?") and more all under one umbrella. All this is available in your dashboard. -### Reranking +### Track Memories +memary **breaks down agent memory for each response generated**. A list of agent responses with their respective memories will be avilable in your dashbord. Human input (good/bad response) can help your systems improve. -![Reranking Diagram](diagrams/reranking_diagram.png) +### Audience Preferences +Through our proprietary memory modules, we are able to infer audience preferences for certain time periods. Audiences' **best and most recent** preferences are continously updated and will be available in your dashboard. -- What is reranking? - - Reranking is the process of scoring nodes based on their relevancy. -- Why rerank agent responses? - - Ensure that the various responses to subqueries, when merged, are relevant to the original query prior to decomposition. -- Our Approach - - We benchmarked three models to determine which one would best work for reranking: BM25 Reranking Fusion, Cohere Rerank, and ColBERT Rerank. After testing BM25, it was clear that the model was not able to classify the different responses and provide a simple merged answer. Instead of answering the question, it combined all the information on the page, introducing irrelevant information. - - Next, when testing out Cohere, the model performed better than BM25 but was still not classifying the paragraphs well. The reranking was not always accurate, as it performed well for some questions but was not able to rank others. Furthermore, the ranking was still pretty inaccurate, performing between 0.25 - 0.5 out of 1. - - Finally, we tested ColBERT rerank, and it was found that this model performed best compared to the other two. ColBERT was able to synthesize results from the given data and ranked them very accurately, with reranking scores between 0.6 - 0.7 out of 1. With this, ColBERT had the most potential, being able to determine which responses were most related and important to answering the query. -- Purpose in larger system - - Passes the reranking result to the knowledge graph for storage and to the model as one source of context for inference. -- Future contributions - - Once agent multiprocessing is integrated, reranking can be integrated into the `ChatAgent` class. - - Future Benchmarking: Include the Cohere Rerank 3 model and others in the [reranking analysis](https://docs.google.com/document/d/1gHzvgktqnHcg7wbIuKHr6W5NMYk6UVlJkRQfSqzk9e4/edit). The data used for benchmarking can be found [here](https://docs.google.com/document/d/1knfJRsoEzjKziilmF_ZwSwMRBvYbF0yNlRdpDteDiW4/edit?usp=sharing). Add to it! +### Customizable Memory +memary deploys knowledge graphs to **track agent actions**. View, search and configure memory for your purposes. Join different memories together for improved retrieval and toggle between your favorite graph providers. All available in your dashboard. -## Contributing +### Playgrounds +- **Tool** Playground: Simply define python functions and add it as one of your agent tools. View all available tools and remove any if necessary. Do this all in your dashboard! +- **Model** Playground: Select specific models for tasks across memary to lower system LLM costs. All models deployed on HF will be avilable in your dashboard. +- **Benchmarking** Playground: Easily run different memary configurations against each other to evaluate which memory options are more suitable for a specific task. -We welcome contributions from the community and hope to see memary advance as agents do! +### memaryParse +Parse and clean your proprietry data before inserting into your agent memory. memary **supports various file types** including table and image extraction. Combine different parsers to form a **parent parser** with advanced capabilities. Also access templates for predefined database schemas and set of node relationships or **define your own!** This is all available in your dashboard. -Initial Contributors: [Julian Saks](https://www.linkedin.com/in/juliansaks/), [Kevin Li](https://www.linkedin.com/in/kevin-li8/), [Seyeong Han](https://github.com/seyeong-han), [Arnav Chopra](https://www.linkedin.com/in/arnav-chopra/), [Aishwarya Balaji](https://www.linkedin.com/in/aishwarya--balaji/), [Anshu Siripurapu](https://www.linkedin.com/in/anshusiripurapu/) (Hook 'em!) +### memaryRetrieval +Use different techniques to retrieve agent memory. Also combine various retrievers to form a **parent retriever** with advanced capabilities. All avilable in your dashboard. -## License +## License memary is released under the MIT License. From 09a1b4d9cdc5c998e12fbf69f6a9c21b8b7ad8c2 Mon Sep 17 00:00:00 2001 From: kingjulio8238 <120517860+kingjulio8238@users.noreply.github.com> Date: Mon, 17 Jun 2024 17:41:43 -0700 Subject: [PATCH 02/11] Added new memary logo Updated slogan: Emulating Human Memory for Agentic Systems --- diagrams/memary-logo-new.png | Bin 0 -> 21804 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 diagrams/memary-logo-new.png diff --git a/diagrams/memary-logo-new.png b/diagrams/memary-logo-new.png new file mode 100644 index 0000000000000000000000000000000000000000..167846808d16535aad7c4737550aacbb0b14497c GIT binary patch literal 21804 zcmeFZWmH~Wvn}`_0fKu79wfLs!66VJ5S-xd?(Xgh4#6R~1cGaT0KwfYxVw8V-gEAE z&v$Nj|LE?~qkl95#shn=y`*Z^tXcH{VREt(D2Vuo5C{ZC@`IQH1Oj#b{DlAquJlhW zhl7`wwjb0SAQ05w&tFgpbf^Rn$ctBIN}nA+%Y5WDu(4v)Gqlk+Vsy2#1*0JlK387w zt(B3Z9;vI9rL_aED?imgBY460&zG5~1Q1F8^MlXc(3n?2O#DBGf}i-QOdTCO_*4CczBqYS(#W_8Ndhz2RCa+Jy!;62XZjezfUD*)z zwVu9>lOsPB)xSpl$CeBY{p59EQVCcYS?Srkky_fA*pSkZT3YH^>5-aQ z8ydNin%L{vnwlAqGLZh)G1f*dq}uQ zcQ8_Nvo+$UQZRC`ak4is`mYfA&k05Cjr1Ii3}$6 zcXgCB6ky@h=Qh-5;z) z^hAx^71}3;x%q)pmqmKPmDE5jZ8ny2yqAa+XiSWG%zM}zS)F(+R|H}YWoD3|rMe9Bv^kVx z!3vW?Ajd_xsfSPyh;J|XHUxqvGy(--_RWHU=t6|yA-^F0s1RQ$SRx1n27wm>fkStM zK#)oQ|AGI%dH!Dqh0vrU8l({WF=Y$q{4fdg6{Y0RJriB^xp0y75_=4??+aOU*mg%W z=pRFZw~8-Bd%DXD%@tfHEAsM<6a}dv`L?}8)ND`phx;r^6fU11dj(|}Dkk4KGj#&ft8Rzi6PMZ}!7VcY{|GL_FW?2~@`- zESPx;Z%~jZB^jK`ZU-X2O=^zwnv)1#pt<#Gxjp$bU$doDs`$J)@`7mUxLTr6k3?v} zSLZrZknOlmU6gFmPsdr1s3u*!IN9D_&>MXrV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Z1Ay?l6oGsx>>mN?@D`WbkQSngQs7FLZMBBxK!}p5cfJchAJJ8vWnOsp@ zyKi&(L=W3N>Y4K7UUCNghjJS^E;bRQvR&uG<|9{nEEew`>OyCW{Pz-8OW8(>7RJrFnW@cv9K@V0E%Ho>;>m)){;-Ls#obiGQ z+1XvVnugOD z{qmoIJYHO1%u5}8ef{QD@7mefVf`0Hvtrki>umzWJ(+XbOGX Date: Mon, 17 Jun 2024 17:50:32 -0700 Subject: [PATCH 03/11] Updated Images & Descriptions Added new logo and updated new features section --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 57b646ed..cb1f3faf 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# memary: Emulating Human Memory for Agentic Systems memary logo +

+ memary_logo +

[![Documentation](https://img.shields.io/badge/Documentation-memary-428BCA?style=flat&logo=open-book)](https://kingjulio8238.github.io/memarydocs/) [![Demo](https://img.shields.io/badge/Watch-Demo-red?logo=youtube)](https://youtu.be/GnUU3_xK6bg) @@ -430,7 +432,7 @@ def _summarize_contexts(self, total_tokens: int): ## Future Features ๐Ÿ”œ ### Speak to Your Agents Memory -memary's **chat interface** offers a portal to access agent memories, integrating capabilitiies such as **searching** (e.g., "What do we know about Emily?"), **removing** memories (e.g., "Remove Emily as a customer"), viewing agent memory **over specified periods** ("What did agent X learn today?") and more all under one umbrella. All this is available in your dashboard. +memary's **chat interface** offers a portal to access agent memories, integrating capabilitiies such as **searching**, **removing** and **viewing** agent memories **over specified periods** and more all under one umbrella available in your dashboard. ### Track Memories memary **breaks down agent memory for each response generated**. A list of agent responses with their respective memories will be avilable in your dashbord. Human input (good/bad response) can help your systems improve. From 1a0fe7cf562265ed6174284b3cbd87bbfc8e7597 Mon Sep 17 00:00:00 2001 From: kingjulio8238 <120517860+kingjulio8238@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:32:49 -0700 Subject: [PATCH 04/11] Update README.md Updates docs --- README.md | 57 +++++++++++++++++++++++++------------------------------ 1 file changed, 26 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index cb1f3faf..fa126952 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ [![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -## Manage Your AI Agent Memories +## Manage Your Agent Memories -Agents promote human-type reasoning and is an advancement towards building AGI and understanding ourselves. Memory is a key component of how humans approach tasks and should be weighted the same when building agentic systems. memary emulates human memory to advance these agentic systems. +Agents promote human-type reasoning and is a great advancement towards building AGI and understanding ourselves as humans. Memory is a key component of how humans approach tasks and should be weighted the same when building agentic systems. **memary** emulates human memory to advance these agentic systems. ## Memory Dashboard ๐Ÿง  (coming soon) @@ -20,11 +20,11 @@ Agents promote human-type reasoning and is an advancement towards building AGI a | Features | Benefits | |---------------------------------------------------|----------------------------------------------------------------| | ๐Ÿ—ฃ๏ธ Chat to Agent Memory | Access certain memories | -| ๐Ÿง  Analyze Agent Learnings | Track how agents develop their memory over time | +| ๐Ÿง  Analyze Agent Progress | Track how agents develop their memory over time | | โฎ๏ธ Rewind Executions | Review agent memories to understand specific responses | | ๐Ÿง‘โ€๐Ÿง‘โ€๐Ÿง’โ€๐Ÿง’ Audience Preferences | Understand audiences' best and most recent preferences | -| โœ๐Ÿป memaryParse | Inject proprietary data into agent memory | -| ๐Ÿ”— Parent Parsers | Combine parsers for advanced data ingestion | +| โœ๐Ÿป memaryParse | Inject proprietary data into agent memory & combine parsers for advanced data ingestion | +| ๐Ÿ—‚๏ธ memaryRetrieval | Access memories & combine retrievers for advanced memory retrieval | | ๐Ÿงช Configure Agent Memory | Search and combine memory databases | | ๐Ÿ› Playgrounds | Specify models and tools used as well as benchmark different memory techniques | | ๐Ÿ” Stay Up To Date | Receive notifications when agent memories have been added, updated or removed | @@ -56,21 +56,7 @@ At the time of writing, memary assumes installation of local models and we curre memary will default to the locally run models unless explicitly specified. Additionally, memary allows developers to **easily switch between downloaded models**. -The current structure of memary is detailed in the diagram below. - -memary overview - -At the time of writing, the above system design includes the routing agent, knoweldge graph and memory module are all integrated into the `ChatAgent` class located in the `src/agent` directory. - -Raw source code for these components can also be found in their respective directories including benchmarks, notebooks, and updates. - ### Run memary -**Note:** memary currently assumes the local installation method and currently supports any models available through Ollama: -- LLM running locally using Ollama (Llama 3 8B/40B as suggested defaults) **OR** `gpt-3.5-turbo` -- Vision model running locally using Ollama (LLaVA as suggested default) **OR** `gpt-4-vision-preview` - -memary will default to the locally run models unless explicitly specified. - **Steps** 1. [Optional] If running models locally using Ollama, follow this the instructions in this [repo](https://github.com/ollama/ollama). @@ -159,8 +145,14 @@ More information about creating custom tools for the LlamaIndex ReAct Agent can ```python chat_agent.remove_tool("multiply") ``` - ## Core Concepts ๐Ÿงช +The current structure of memary is detailed in the diagram below. + +memary overview + +At the time of writing, the above system design includes the routing agent, knoweldge graph and memory module are all integrated into the `ChatAgent` class located in the `src/agent` directory. + +Raw source code for these components can also be found in their respective directories including benchmarks, notebooks, and updates. ### Principles memary integrates itself onto your existing agents with as little developer implementation as possible. We achieve this sticking to a few principles. @@ -431,29 +423,32 @@ def _summarize_contexts(self, total_tokens: int): ## Future Features ๐Ÿ”œ -### Speak to Your Agents Memory +### Speak to Your Agents Memory ๐Ÿ—ฃ๏ธ memary's **chat interface** offers a portal to access agent memories, integrating capabilitiies such as **searching**, **removing** and **viewing** agent memories **over specified periods** and more all under one umbrella available in your dashboard. -### Track Memories +### Analyze Agent Progress ๐Ÿง  +Track how agents develop their memory. We will provide access to relevant metrics to represent the growth of agent memories over time which will be available in your dashboard. + +### Track Memories โฎ๏ธ memary **breaks down agent memory for each response generated**. A list of agent responses with their respective memories will be avilable in your dashbord. Human input (good/bad response) can help your systems improve. -### Audience Preferences +### Audience Preferences ๐Ÿง‘โ€๐Ÿง‘โ€๐Ÿง’โ€๐Ÿง’ Through our proprietary memory modules, we are able to infer audience preferences for certain time periods. Audiences' **best and most recent** preferences are continously updated and will be available in your dashboard. -### Customizable Memory +### memaryParse โœ๐Ÿป +Parse and clean your proprietry data before inserting into your agent memory. memary **supports various file types** including table and image extraction. Combine different parsers to form a **parent parser** with advanced capabilities. Also access templates for predefined database schemas and set of node relationships or **define your own!** This is all available in your dashboard. + +### memaryRetrieval ๐Ÿ—‚๏ธ +Use different techniques to retrieve agent memory. Also combine various retrievers to form a **parent retriever** with advanced capabilities. All avilable in your dashboard. + +### Customizable Memory ๐Ÿงช memary deploys knowledge graphs to **track agent actions**. View, search and configure memory for your purposes. Join different memories together for improved retrieval and toggle between your favorite graph providers. All available in your dashboard. -### Playgrounds +### Playgrounds ๐Ÿ› - **Tool** Playground: Simply define python functions and add it as one of your agent tools. View all available tools and remove any if necessary. Do this all in your dashboard! - **Model** Playground: Select specific models for tasks across memary to lower system LLM costs. All models deployed on HF will be avilable in your dashboard. - **Benchmarking** Playground: Easily run different memary configurations against each other to evaluate which memory options are more suitable for a specific task. -### memaryParse -Parse and clean your proprietry data before inserting into your agent memory. memary **supports various file types** including table and image extraction. Combine different parsers to form a **parent parser** with advanced capabilities. Also access templates for predefined database schemas and set of node relationships or **define your own!** This is all available in your dashboard. - -### memaryRetrieval -Use different techniques to retrieve agent memory. Also combine various retrievers to form a **parent retriever** with advanced capabilities. All avilable in your dashboard. - ## License memary is released under the MIT License. From e77bf227e0ee1b38fcb0a8013b3f18edbbec44d1 Mon Sep 17 00:00:00 2001 From: kingjulio8238 <120517860+kingjulio8238@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:35:19 -0700 Subject: [PATCH 05/11] Update README.md grammar fixes --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fa126952..0b5da267 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Agents promote human-type reasoning and is a great advancement towards building | Features | Benefits | |---------------------------------------------------|----------------------------------------------------------------| | ๐Ÿ—ฃ๏ธ Chat to Agent Memory | Access certain memories | -| ๐Ÿง  Analyze Agent Progress | Track how agents develop their memory over time | +| ๐Ÿง  Analyze Agent Progress | Track how agents develop their memories over time | | โฎ๏ธ Rewind Executions | Review agent memories to understand specific responses | | ๐Ÿง‘โ€๐Ÿง‘โ€๐Ÿง’โ€๐Ÿง’ Audience Preferences | Understand audiences' best and most recent preferences | | โœ๐Ÿป memaryParse | Inject proprietary data into agent memory & combine parsers for advanced data ingestion | From b409b2c838051692d183093fe78eba3ac6d81f9b Mon Sep 17 00:00:00 2001 From: kingjulio8238 <120517860+kingjulio8238@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:37:44 -0700 Subject: [PATCH 06/11] Update README.md small structure changes --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0b5da267..6818bbc0 100644 --- a/README.md +++ b/README.md @@ -427,7 +427,7 @@ def _summarize_contexts(self, total_tokens: int): memary's **chat interface** offers a portal to access agent memories, integrating capabilitiies such as **searching**, **removing** and **viewing** agent memories **over specified periods** and more all under one umbrella available in your dashboard. ### Analyze Agent Progress ๐Ÿง  -Track how agents develop their memory. We will provide access to relevant metrics to represent the growth of agent memories over time which will be available in your dashboard. +**Track how your agents develop their memory.** We will provide access to relevant metrics to represent the growth of agent memories over time which will be available in your dashboard. ### Track Memories โฎ๏ธ memary **breaks down agent memory for each response generated**. A list of agent responses with their respective memories will be avilable in your dashbord. Human input (good/bad response) can help your systems improve. From 4af01247c7e5cd60a4843ab7f35cc5b8c0fde443 Mon Sep 17 00:00:00 2001 From: kingjulio8238 <120517860+kingjulio8238@users.noreply.github.com> Date: Mon, 17 Jun 2024 21:44:38 -0700 Subject: [PATCH 07/11] Update README.md updated "why memary" section --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6818bbc0..c0c7f6b3 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ ## Manage Your Agent Memories -Agents promote human-type reasoning and is a great advancement towards building AGI and understanding ourselves as humans. Memory is a key component of how humans approach tasks and should be weighted the same when building agentic systems. **memary** emulates human memory to advance these agentic systems. +Agents promote human-type reasoning and are a great advancement towards building AGI and understanding ourselves as humans. Memory is a key component of how humans approach tasks and should be weighted the same when building agentic systems. **memary emulates human memory to advance these agentic systems.** ## Memory Dashboard ๐Ÿง  (coming soon) From a424421f4105f006ec657784c22301846c00a794 Mon Sep 17 00:00:00 2001 From: kingjulio8238 <120517860+kingjulio8238@users.noreply.github.com> Date: Thu, 20 Jun 2024 09:17:01 -0700 Subject: [PATCH 08/11] Upload latest memary logo Change in slogan --- diagrams/memary-logo-latest.png | Bin 0 -> 19637 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 diagrams/memary-logo-latest.png diff --git a/diagrams/memary-logo-latest.png b/diagrams/memary-logo-latest.png new file mode 100644 index 0000000000000000000000000000000000000000..1822c4b1778d8c807b1bb12adff9d18cdf8d8081 GIT binary patch literal 19637 zcmeIaby$|~wl4Y+0us`wfPe_n-HoJxbV+x2cQ*(q-Q5z>4N6LPH%NCkoQL0>Ypyxx zI(uK&K40P{ck8$w44cXHUNo;J}r> z$)!;6?YZ?w6*~yzMaR=`s935Oco4`lOcRCA_Mas`aq3xF(CX-0=^D^FTUdk95D2$3 zC-~9Az+Q*Q*}~k?j?f9_ST$q zbWToAv`$R4R<=fT3>+LBbo7jLjEpp31dW}GrM-?bjiuc?Fw?(IC1hZyXKP|@Z(?Oh z^fa}Ou9bs54;k4%M*VF|`g;FZ#@fNw{I5my_2>-D4J-^S?d|9oXc_)xm->2~_9ph` z2LHD459ap&cE#M}=_H)yI+jK}WX?4D28KEg=JsT~76ukNwk|~GRz_AtR7B?HIu<%a zCYJgJ&O}DGI@ZP}dPFot|2&49?rHbtCjT`3UswKhMY{i+ef>4;pUm+8&_W;V?QKnT z|6wIdJ6fH;t~flImKJ!OPDlUAPW1m`r@uYL`9a_ApEmw<5_togf4c%K^>o8p$JWk3 z!NuBuhfL1E&dR}7&)}co@%IS@Z4Gqn4fJ^#=^2@6=viqP>AC6t?bbg$%>DNp!p`<$ z`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V&*_U&6v=c5c98r2-YyW511S3yrj13(|!lDoV#-@Uz` z$5T;MtWp{C^=roU=_VI`&IB%jke8|{o}D4EO@sY*R97Tn8E{E*1^B=Pd`Ui`n(*NW zes}vd$oL*7J!DCIUM)bc6)SU{0pNq`_eXtq`vR!J3qUoMY$DBb9y7)tf1obqa`Hzk zUs;j4V_`u9NcGtkkH&N3Pe8%3*lm2GQLWlaTY8E5Vk(o*pOTVNK~s~~%IfgFMs!%* zDX68sS5<*anv==fRR($I`5Z;xzk~XQB&>6ERr%#SD(Dn|hem-mUEkmL7!qYYS_b71 wsA>8pA^)RF=6|8+`R}3sZGrzY7Puo+!)_p-H@2b#y+??cu#`}#fVS`d1^$&2%m4rY literal 0 HcmV?d00001 From d3aede75627a590ae740d6019f453f3584328407 Mon Sep 17 00:00:00 2001 From: kingjulio8238 <120517860+kingjulio8238@users.noreply.github.com> Date: Thu, 20 Jun 2024 09:18:10 -0700 Subject: [PATCH 09/11] Updated slogan --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c0c7f6b3..2ce86685 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- memary_logo + memary_logo

[![Documentation](https://img.shields.io/badge/Documentation-memary-428BCA?style=flat&logo=open-book)](https://kingjulio8238.github.io/memarydocs/) From d5a37b6473c2f6892d692ab1dbdf96f33e32ee26 Mon Sep 17 00:00:00 2001 From: kingjulio8238 <120517860+kingjulio8238@users.noreply.github.com> Date: Thu, 20 Jun 2024 09:18:54 -0700 Subject: [PATCH 10/11] Rephrase info --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2ce86685..1c1d0f2d 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ ## Manage Your Agent Memories -Agents promote human-type reasoning and are a great advancement towards building AGI and understanding ourselves as humans. Memory is a key component of how humans approach tasks and should be weighted the same when building agentic systems. **memary emulates human memory to advance these agentic systems.** +Agents promote human-type reasoning and are a great advancement towards building AGI and understanding ourselves as humans. Memory is a key component of how humans approach tasks and should be weighted the same when building AI agents. **memary emulates human memory to advance these agents.** ## Memory Dashboard ๐Ÿง  (coming soon) From 58f18b1501961c5776ad65aade0005a85cde31a5 Mon Sep 17 00:00:00 2001 From: kevinl424 Date: Thu, 20 Jun 2024 22:45:13 -0400 Subject: [PATCH 11/11] fix layout --- README.md | 60 ++++++++++++++++++++++++------------------------------- 1 file changed, 26 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 1c1d0f2d..93cc23dc 100644 --- a/README.md +++ b/README.md @@ -14,22 +14,6 @@ Agents promote human-type reasoning and are a great advancement towards building AGI and understanding ourselves as humans. Memory is a key component of how humans approach tasks and should be weighted the same when building AI agents. **memary emulates human memory to advance these agents.** -## Memory Dashboard ๐Ÿง  -(coming soon) - -| Features | Benefits | -|---------------------------------------------------|----------------------------------------------------------------| -| ๐Ÿ—ฃ๏ธ Chat to Agent Memory | Access certain memories | -| ๐Ÿง  Analyze Agent Progress | Track how agents develop their memories over time | -| โฎ๏ธ Rewind Executions | Review agent memories to understand specific responses | -| ๐Ÿง‘โ€๐Ÿง‘โ€๐Ÿง’โ€๐Ÿง’ Audience Preferences | Understand audiences' best and most recent preferences | -| โœ๐Ÿป memaryParse | Inject proprietary data into agent memory & combine parsers for advanced data ingestion | -| ๐Ÿ—‚๏ธ memaryRetrieval | Access memories & combine retrievers for advanced memory retrieval | -| ๐Ÿงช Configure Agent Memory | Search and combine memory databases | -| ๐Ÿ› Playgrounds | Specify models and tools used as well as benchmark different memory techniques | -| ๐Ÿ” Stay Up To Date | Receive notifications when agent memories have been added, updated or removed | - - ## Quickstart ๐Ÿ ### Install memary @@ -80,24 +64,16 @@ memary will default to the locally run models unless explicitly specified. Addit 3. Fetch API credentials:
API Info - ``` - OpenAI key: https://openai.com/index/openai-api - - Neo4j: https://neo4j.com/cloud/platform/aura-graph-database/?ref=nav-get-started-cta - Click 'Start for free' - Create a free instance - Open auto-downloaded txt file and use the credentials - - Perplexity key: https://www.perplexity.ai/settings/api - Google Maps: - Keys are generated in the 'Credentials' page of the 'APIs & Services' tab of Google Cloud Console - https://console.cloud.google.com/apis/credentials - - Alpha Vantage: (this key is for getting real time stock data) - https://www.alphavantage.co/support/#api-key - Reccomend use https://10minutemail.com/ to generate a temporary email to use - ``` + - [**OpenAI key**](https://openai.com/index/openai-api) + - [**Neo4j**](https://neo4j.com/cloud/platform/aura-graph-database/?ref=nav-get-started-cta) + - Click 'Start for free` → Create a free instance → Open auto-downloaded txt file and use the credentials + - [**Perplexity key**](https://www.perplexity.ai/settings/api) + - [**Google Maps**](https://console.cloud.google.com/apis/credentials) + - Keys are generated in the 'Credentials' page of the 'APIs & Services' tab of Google Cloud Console + - [Alpha Vantage](https://www.alphavantage.co/support/#api-key) + - Recommended to use https://10minutemail.com/ to generate a temporary email to use +
4. Update user persona which can be found in `streamlit_app/data/user_persona.txt` using the user persona template which can be found in `streamlit_app/data/user_persona_template.txt`. Instructions have been provided - replace the curly brackets with relevant information. @@ -111,7 +87,7 @@ cd streamlit_app streamlit run app.py ``` -## More Basic Functionality +## Basic Usage ```python from memary.agent.chat_agent import ChatAgent @@ -145,6 +121,22 @@ More information about creating custom tools for the LlamaIndex ReAct Agent can ```python chat_agent.remove_tool("multiply") ``` + +## Memory Dashboard ๐Ÿง  +(coming soon) + +| Features | Benefits | +|---------------------------------------------------|----------------------------------------------------------------| +| ๐Ÿ—ฃ๏ธ Chat to Agent Memory | Access certain memories | +| ๐Ÿง  Analyze Agent Progress | Track how agents develop their memories over time | +| โฎ๏ธ Rewind Executions | Review agent memories to understand specific responses | +| ๐Ÿง‘โ€๐Ÿง‘โ€๐Ÿง’โ€๐Ÿง’ Audience Preferences | Understand audiences' best and most recent preferences | +| โœ๐Ÿป memaryParse | Inject proprietary data into agent memory & combine parsers for advanced data ingestion | +| ๐Ÿ—‚๏ธ memaryRetrieval | Access memories & combine retrievers for advanced memory retrieval | +| ๐Ÿงช Configure Agent Memory | Search and combine memory databases | +| ๐Ÿ› Playgrounds | Specify models and tools used as well as benchmark different memory techniques | +| ๐Ÿ” Stay Up To Date | Receive notifications when agent memories have been added, updated or removed | + ## Core Concepts ๐Ÿงช The current structure of memary is detailed in the diagram below.