Ali Baizhanov

Mengram - AI memory API with 3 types: facts, events, and workflows

AI memory API with 3 types: semantic (facts), episodic (events), and procedural (learned workflows). One API call extracts all three automatically. Killer feature: your agent completes a task → Mengram saves the steps → next time it already knows the optimal path with success/failure tracking. Works with Claude (MCP), LangChain, CrewAI, OpenClaw. Free, open-source, Apache 2.0.

Add a comment

Replies

Best
Ali Baizhanov
Hey Product Hunt! I'm Ali, a 32-year-old developer from Almaty, Kazakhstan. I built Mengram because every AI memory tool I tried only stored facts. But human memory has 3 types — we remember facts (semantic), events (episodic), and how to do things (procedural). So I built an API that does all three. The killer feature: your AI agent completes a task → Mengram saves the steps as a procedure → next time, it already knows the optimal path. No other memory API does this. It's free, open-source, and takes 60 seconds to set up. Would love your feedback!
Shawn WB

Hey! This sounds really cool, do you have any example code for using this with LangChain?

Ali Baizhanov

@sizorax 
Hey Shawn! Full LangChain integration with examples is in the docs:
https://github.com/alibaizhanov/mengram/blob/main/integrations/langchain.py

Drop-in replacement for both memory and retriever — searches all 3 types in one call. Let me know if you hit any issues!

Mykola Kondratiuk

Building with agents means hitting memory walls fast - semantic search on a flat vector store doesn't cut it once you have multiple intent types to track. The 3-way split makes sense to me because facts, events, and workflows really do need different retrieval patterns.

One thing I haven't seen clean answers to: preferences that should trigger recurring actions. A user likes X -> that becomes a workflow trigger eventually. Is that modeled in Mengram or application concern?

Ali Baizhanov

@mykola_kondratiuk 
right now that's an application concern, but we're building smart triggers for exactly this. the idea is: if a semantic fact ("user likes X") keeps showing up in episodes with a consistent action, it gets promoted to a procedure automatically. system learns "when X comes up, do Y" without manual rules.

not shipped yet but it's the next priority.

Mykola Kondratiuk

Memory is one of those things that sounds simple until you're actually building with it. Three types makes sense as a decomposition but I'm curious about edge cases where something blurs between categories - like a user preference that's both a fact AND affects how workflows run. Do you reconcile that at write time or does the consumer figure it out?

Ali Baizhanov

@mykola_kondratiuk 
both. extraction can tag the same info across multiple types — "user always deploys on fridays" is a fact AND a procedural pattern. we don't force it into one bucket.

at read time, search_all() returns all three types ranked by relevance, so the consumer sees the full picture. fuzzy boundaries are a feature, not a bug — human memory works the same way.

Curious Kitty
How do you handle the hard edge cases of long-term memory in production—contradictions, staleness, and “what happened last week” temporal queries—without making developers build their own maintenance rules around your API?
Ali Baizhanov

@curiouskitty 
All three are handled out of the box — contradictions (Smart Triggers auto-detect conflicts), staleness (Ebbinghaus decay + Curator agent), and temporal queries (episodic memory with date-range filtering). Zero maintenance rules needed from the developer.

Full details: https://mengram.io/docs

https://mengram.io
https://github.com/alibaizhanov/mengram/blob/main/README.md