Skip to main content

memory that answers why, not just what. causal graph memory with an mcp server.

Project description

iglegais

iglegais

memory that remembers why, not just what.

most memory tools keep your stuff as a flat pile of vectors. you ask something, they hand back the most similar chunk of text and call it a day. they cannot tell you why something happened, or how it changed over time.

iglegais stores each memory as a node with a vector and typed edges (caused_by, contradicts, follows). so recall does two things a flat store simply cannot:

  1. vector search to find the memory you actually mean
  2. walk the graph to hand you its cause, its contradictions, and how it evolved

the demo

Q: why did the pipeline go down?

closest memory:
   "ops got paged at 2am: the zorbex-9 pipeline went completely down."

caused by:
   "the zorbex-9 module leaked memory and crashed the data pipeline."

later fixed by:
   "patched the zorbex-9 memory leak and the pipeline recovered."

a flat store gives you the first line and shrugs. the graph is what finds the root cause.

real world test

two totally separate incidents (an auth outage and a caching bug) jumbled into one graph. the hard part is telling them apart and blaming the right thing:

Q: why were users getting logged out?
   root cause:  migrated the auth service to a new jwt library     (correct)

Q: why was the dashboard showing old numbers?
   root cause:  enabled a new caching layer                        (correct)

both passed. it kept the incidents straight.

runs on your machine, costs nothing

a local graph+vector database, local embeddings, no cloud, no api keys, no bill. your memories never leave the machine.

use it

three steps.

# 1. run a local graph+vector instance on localhost:6969 (persistent mode)

# 2. get a free llm key for edge inference (cerebras free tier works) and
#    drop it in a .env file next to where you run things:
#    CEREBRAS_API_KEY=csk-...

# 3. install and wire it into your assistant:
pip install iglegais
claude mcp add iglegais -- iglegais

your assistant now has three tools: remember, recall, why. it stores plain text, the causal links get inferred automatically, and it can walk a chain of causes when you ask why something happened.

library use, same three calls:

from iglegais import MemoryGraph

mg = MemoryGraph()
mg.setup()
mg.remember("the deploy script had a race condition")   # edges inferred
mg.recall("why did the service fail to boot?")            # cause + contradictions
mg.root_cause("why did the service fail to boot?")        # full chain to the root

or clone the repo and run the tests against your local instance:

python verify.py    # asserts the traversal returns the root cause
python realtest.py  # two mixed incidents, correct cause for each
python multihop.py  # walks a 3 level chain to the root

how it works

  • remember(content) embeds the text, adds a memory node, and lets an llm infer caused_by / contradicts / follows edges to earlier memories.
  • recall(query) vector searches to the closest memory, then walks the edges to give you the reasoning around it.
  • root_cause(query) keeps walking caused_by hops until it hits the root.

a few hundred lines of python over a graph+vector engine. small on purpose. the engine does the heavy lifting, iglegais is the brain wiring on top.

where it goes next

  • per user memory spaces
  • dedup on ingest
  • flag stale memories when a newer one contradicts them
  • a visual graph of your memory

built by @Cintu07.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iglegais-0.1.0-py3-none-any.whl (33.7 kB view details)

Uploaded Python 3

File details

Details for the file iglegais-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: iglegais-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 33.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for iglegais-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 457f4d3faf374f924d3d068fa468ad9debbc8b6b419e361178439a661a438c26
MD5 dde2d61361a7712e09688a139a659ed3
BLAKE2b-256 b5cdcdf848cd7c2f9ca60d3617b19343a1de59636dbe00a96085d8376e022011

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page