Memary: The Open Source Memory Layer for Autonomous Agents
This repository profile is provided by osrepos.com, an open source repository discovery platform.

Summary
Memary is an innovative open-source memory layer designed to enhance autonomous agents by emulating human memory. It integrates knowledge graphs and memory modules to provide agents with advanced capabilities for reasoning and learning. This project aims to make agents more intelligent and capable of self-improvement.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
Memary is an innovative open-source project that provides a sophisticated memory layer for autonomous agents. Designed to emulate human memory, Memary equips AI agents with enhanced reasoning, learning, and self-improvement capabilities. By integrating advanced concepts like knowledge graphs and memory modules, Memary offers a robust framework for managing agent memories, making them more effective and intelligent.
Installation
Getting started with Memary is straightforward. To install via pip, ensure you are running Python version <= 3.11.9, then execute:
pip install memary
For a local installation:
- Create a virtual environment with Python version <= 3.11.9.
- Install dependencies:
pip install -r requirements.txt
Memary supports local models via Ollama (e.g., Llama 3, LLaVA) and also integrates with OpenAI models. You'll need to set up a .env file with necessary API keys for services like OpenAI, Perplexity, Google Maps, and database connections (FalkorDB or Neo4j).
Examples
Memary provides a ChatAgent class for easy integration.
Basic Usage:
from memary.agent.chat_agent import ChatAgent
system_persona_txt = "data/system_persona.txt"
user_persona_txt = "data/user_persona.txt"
past_chat_json = "data/past_chat.json"
memory_stream_json = "data/memory_stream.json"
entity_knowledge_store_json = "data/entity_knowledge_store.json"
chat_agent = ChatAgent(
"Personal Agent",
memory_stream_json,
entity_knowledge_store_json,
system_persona_txt,
user_persona_txt,
past_chat_json,
)
For multi-agent scenarios using FalkorDB, you can create separate agents with unique user_ids:
# User A personal agent
chat_agent_user_a = ChatAgent(
"Personal Agent",
memory_stream_json_user_a,
entity_knowledge_store_json_user_a,
system_persona_txt_user_a,
user_persona_txt_user_a,
past_chat_json_user_a,
user_id='user_a_id'
)
You can also easily add and remove custom tools:
def multiply(a: int, b: int) -> int:
"""Multiply two integers and returns the result integer"""
return a * b
chat_agent.add_tool({"multiply": multiply})
chat_agent.remove_tool("multiply")
Why Use Memary
Memary is built on core principles designed to enhance agent intelligence with minimal developer effort.
- Auto-generated Memory: Agent memory automatically updates as the agent interacts, capturing all memories for display and analysis. It supports combining different databases seamlessly.
- Memory Modules: Tracks user preferences and knowledge depth through the Memory Stream (breadth of knowledge) and Entity Knowledge Store (depth of knowledge), offering insights into user interests and learning.
- System Improvement: Mimics how human memory evolves and learns over time, providing metrics on agent improvement.
- Rewind Memories: Keeps track of all chats, allowing users to rewind agent executions and access memory at specific periods (feature coming soon).
- Knowledge Graphs: Utilizes graph databases to store knowledge, employing recursive and multi-hop retrieval for efficient information access and reduced latency.
- New Context Window: Tailors agent responses by integrating agent responses, most relevant entities, and summarized chat history to match the user's current interests and knowledge level.
Links
Related repositories
Similar repositories that may be relevant next.

agentmemory: Persistent Memory for AI Coding Agents
May 27, 2026
agentmemory provides persistent memory for AI coding agents, ensuring they remember past interactions and project context across sessions. This eliminates the need for re-explaining, significantly boosting agent efficiency and reducing token costs. Built on the `iii engine`, it offers high retrieval accuracy and multi-agent support without external databases.

agent-service-toolkit: A Comprehensive Toolkit for AI Agent Services with LangGraph
March 17, 2026
The agent-service-toolkit is a full-featured repository for building and running AI agent services. It leverages LangGraph for sophisticated agent logic, FastAPI for a robust service API, and Streamlit for an interactive chat interface. This toolkit provides a comprehensive and robust template for developing and deploying custom AI agents with ease.

Deep Agents: The Batteries-Included Agent Harness for Complex AI Tasks
March 4, 2026
Deep Agents is an agent harness built on LangChain and LangGraph, designed to simplify the creation of complex AI agents. It comes equipped with essential tools like planning, filesystem access, and the ability to spawn sub-agents, enabling it to handle sophisticated agentic tasks out of the box. This framework provides a ready-to-run agent that can be easily customized with additional tools, models, and prompts.

Company Research Agent: Deep Diligence with Multi-Agent AI and LangGraph
February 3, 2026
The Company Research Agent is an advanced tool designed for in-depth company diligence, leveraging a multi-agent framework built with LangGraph and Tavily. It efficiently gathers, filters, and synthesizes information from various sources. The system utilizes Google's Gemini 2.5 Flash for high-context synthesis and OpenAI's GPT-5.1 for precise formatting, delivering comprehensive research reports.
Source repository
Open the original repository on GitHub.