← all repositories
kingjulio8238/Memary

Stop resetting your agents' brains after every chat

Memary adds persistent, human-inspired memory to agents so they accumulate knowledge across sessions instead of starting every conversation from scratch.

2.6k stars Jupyter Notebook AgentsRAG · Search
Memary
Not currently ranked — collecting fresh signals.
star history

What it does Memary wraps a persistent memory system around LLM agents. It stores agent interactions and extracted entities in a graph database (Neo4j or FalkorDB), then retrieves context through recursive, multi-hop subgraph searches rather than dumping the whole knowledge base into the prompt. The current ChatAgent class bundles memory modules, a routing agent, and the knowledge graph together into one package.

The interesting bit The memory module takes its cues from Microsoft Research’s K-LaMP paper, pairing a time-stamped Memory Stream that logs the breadth of encountered concepts with an Entity Knowledge Store. When a query arrives, the system carves out a local subgraph of relevant entities up to two hops away, and only calls out to external search if the graph draws a blank. Agent responses are written back to the knowledge graph, so the system theoretically grows smarter as it runs.

Key highlights

  • Human-memory-inspired architecture with auto-updating Memory Stream and Entity Knowledge Store
  • Recursive retrieval and multi-hop reasoning over Neo4j or FalkorDB to avoid full-graph scans
  • Supports local models via Ollama or OpenAI APIs, with optional vision, location, and stock tools
  • Multi-graph support in FalkorDB for isolating memory contexts across different agents
  • Custom tools can be injected into the built-in LlamaIndex ReAct agent interface

Caveats

  • The bundled ReAct agent is labeled demo-grade and scheduled for removal; provider-agnostic support is still pending
  • “Rewind memories” and full decoupling from the agent implementation are marked “coming soon”
  • Running it requires API keys for OpenAI, Perplexity, Google Maps, Alpha Vantage, plus graph database credentials, and Python must be <= 3.11.9

Verdict Worth exploring if you are building long-running agents that need to accumulate user context without paying for infinite context windows. Skip it if you want a universal, drop-in memory backend today; the current ChatAgent coupling and bundled agent make it closer to an opinionated starter kit than a pluggable layer.

Frequently asked

What is kingjulio8238/Memary?
Memary adds persistent, human-inspired memory to agents so they accumulate knowledge across sessions instead of starting every conversation from scratch.
Is Memary open source?
Yes — kingjulio8238/Memary is open source, released under the MIT license.
What language is Memary written in?
kingjulio8238/Memary is primarily written in Jupyter Notebook.
How popular is Memary?
kingjulio8238/Memary has 2.6k stars on GitHub.
Where can I find Memary?
kingjulio8238/Memary is on GitHub at https://github.com/kingjulio8238/Memary.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.