Memary  by kingjulio8238

Open-source memory layer for autonomous agents

created 1 year ago
2,290 stars

Top 20.3% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

Memary provides an open-source memory layer for autonomous agents, aiming to emulate human memory to enhance agent reasoning and task execution. It's designed for developers building advanced AI agents, offering a structured way to manage and leverage agent interactions and knowledge.

How It Works

Memary integrates with existing agents by automatically updating memory as the agent interacts. It utilizes a graph database (FalkorDB or Neo4j) for knowledge storage, with LlamaIndex used for adding nodes. For external queries, it leverages Perplexity (mistral-7b-instruct) or OpenAI. The system employs recursive retrieval and multi-hop reasoning for efficient knowledge graph querying, reducing latency by focusing on relevant subgraphs. Memory is managed through a Memory Stream (tracking entities and timestamps) and an Entity Knowledge Store (tracking entity frequency and recency).

Quick Start & Requirements

  • Install: pip install memary
  • Python Version: <= 3.11.9
  • Local Models: Requires Ollama for LLMs (e.g., Llama 3 8B/40B) and Vision models (e.g., LLaVA).
  • API Keys: OpenAI, Perplexity, Google Maps, Alpha Vantage, FalkorDB, or Neo4j.
  • Setup: Follow Ollama instructions for local models. Configure .env with API keys and database credentials.
  • Demo: Run streamlit run app.py from the streamlit_app directory.
  • Docs: OpenAI key, FalkorDB, Neo4j, Perplexity key, Google Maps, Alpha Vantage.

Highlighted Details

  • Supports multi-graph capabilities with FalkorDB for managing multiple agents.
  • Allows adding and removing custom tools for agent functionality.
  • Memory module design influenced by Microsoft Research's K-LaMP.
  • Features recursive retrieval and multi-hop reasoning for efficient KG querying.

Maintenance & Community

No specific contributors, sponsorships, or community links (Discord/Slack) are mentioned in the README.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: Permissive for commercial use and closed-source linking.

Limitations & Caveats

The project is noted to use a ReAct agent for demonstration purposes, with plans to remove it in future releases to support any agent type. The README specifies Python version <= 3.11.9, which might be a constraint for users on newer Python versions.

Health Check
Last commit

9 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
108 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.