Memary: The Open Source Memory Layer for Autonomous Agents

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Memary: The Open Source Memory Layer for Autonomous Agents

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

Analyzed by OSRepos on December 28, 2025

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:

  1. Create a virtual environment with Python version <= 3.11.9.
  2. 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.

Agent Sandbox: Secure Local Development for AI Coding Agents

Agent Sandbox: Secure Local Development for AI Coding Agents

August 17, 2026

Agent Sandbox provides a robust and secure local development environment specifically designed for collaborating with AI coding agents. It ensures minimal filesystem access, configurable network egress policies, and secure secret injection, protecting your local machine from potentially risky agent operations. This project supports various AI agents and integrates seamlessly with both CLI and popular IDE devcontainer setups.

agent-harnessagent-sandboxagents
FastMCP: The Pythonic Framework for Model Context Protocol Applications

FastMCP: The Pythonic Framework for Model Context Protocol Applications

August 11, 2026

FastMCP is a robust, Pythonic framework developed by PrefectHQ, designed to simplify the creation of Model Context Protocol (MCP) servers and clients. It provides a comprehensive application framework for connecting Large Language Models (LLMs) to tools and data, handling complexities like schema generation, validation, and protocol lifecycle. As the standard framework for MCP, FastMCP empowers developers to build powerful LLM-integrated applications efficiently.

fastmcpmcpmodel-context-protocol
CubeSandbox: Instant, Concurrent, and Secure Sandbox for AI Agents

CubeSandbox: Instant, Concurrent, and Secure Sandbox for AI Agents

August 9, 2026

CubeSandbox, developed by TencentCloud, is a high-performance, secure sandbox service built on RustVMM and KVM, designed specifically for AI agents. It offers ultra-fast startup times, hardware-level isolation, and high-density deployment, making it ideal for scalable and secure agent execution environments. The service is also fully compatible with the E2B SDK for seamless integration.

agentscontainersandbox
DeepFabric: High-Quality Synthetic Data for Agentic AI Systems

DeepFabric: High-Quality Synthetic Data for Agentic AI Systems

July 2, 2026

DeepFabric is an open-source Python library designed to generate high-quality synthetic training data for language models and agent evaluations. It excels at creating domain-specific datasets that teach models to think, plan, and act effectively, including correct tool usage and adherence to schema structures. This comprehensive pipeline also integrates training and evaluation capabilities, ensuring robust model development.

pythonaimachine-learning

Source repository

Open the original repository on GitHub.

13 counted GitHub visits

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️