~/thinkingdbx/thinkingmemory
thinkingdbx / thinkingmemory
open source · MIT license
memory as infrastructure

$ agent.remember(everything)

ThinkingMemory is an agent-agnostic memory platform for AI agents. A layered architecture with reasoning-aware retrieval, built-in forgetting & compression. Make agents cheaper, more consistent, and genuinely improving over time.

▸ github repository explore architecture ↓
4
memory layers
95%
cost reduction
MIT
open source
architecture
Four layers of memory

Inspired by human cognition. Each layer serves a distinct purpose, working together to give AI agents comprehensive memory capabilities.

┌──────────────────────────────────────────────┐ │ ┌─ working (now) ttl: session │ │ ├─ episodic (events) temporal context │ │ ├─ semantic (knowledge) facts & concepts │ │ └─ procedural (skills) how-to memory │ └──────────────────────────────────────────────┘ ↑ ↓ store(...) recall(...)
  1. 01
    short-term · context-aware

    Working Memory

    Temporary storage for immediate context and current task information. Like a human's mental scratchpad — holds what the agent needs right now and automatically clears when tasks complete.

  2. 02
    event-based · temporal

    Episodic Memory

    Stores experiences and events with temporal context. Enables agents to recall past interactions, learn from outcomes, and build a rich history of what happened and why.

  3. 03
    knowledge · concepts

    Semantic Memory

    The agent's encyclopedia. Stores factual knowledge, domain concepts, and general information. Knowledge that doesn't depend on when or where it was learned.

  4. 04
    skills · procedures

    Procedural Memory

    Stores learned procedures, skills, and how-to knowledge. Enables agents to perform complex multi-step tasks reliably — muscle memory for AI.

what makes it different
Not just another vector database

ThinkingMemory is purpose-built memory infrastructure for AI agents.

  1. 01

    Reasoning-Aware Retrieval

    Agents don't just search for keywords — they ask what they need to remember. ThinkingMemory understands the reasoning context and returns the most relevant memories, not just the most similar vectors.

    • Context-aware memory retrieval
    • Intent-based query understanding
    • Cross-layer memory fusion
    // Agent asks what it needs to remember memory.recall({ context: "user asking about pipeline failure", intent: "diagnose root cause", layers: ["episodic", "semantic"] }) // Returns contextually relevant memories // → past failure patterns (episodic) // → pipeline topology knowledge (semantic) // → resolution procedures (procedural)
  2. 02

    Built-in Forgetting & Compression

    Just like human memory, not everything needs to be remembered forever. ThinkingMemory automatically compresses old memories, forgets irrelevant details, and consolidates patterns — keeping storage costs minimal and retrieval fast.

    • Intelligent memory decay algorithms
    • Pattern consolidation over time
    • Automatic storage optimization
    // Configure memory lifecycle memory.configure({ working: { ttl: "session" }, episodic: { compress_after: "7d", consolidate_after: "30d", forget_threshold: 0.1 }, semantic: { deduplicate: true }, procedural: { versioned: true } })
  3. 03

    Agent-Agnostic APIs

    Works with any AI framework and any LLM. REST APIs and SDKs that plug into LangChain, CrewAI, AutoGen, custom agents, or anything else. Your memory infrastructure shouldn't lock you into a framework.

    • REST API + Python / JS SDKs
    • Framework-agnostic integration
    • Works with any LLM provider
    # works with any framework from thinkingmemory import Memory mem = Memory(agent_id="my-agent") # store a memory mem.store( layer="episodic", content="Pipeline X failed at 3am", metadata={"severity": "high"}, ) # retrieve with reasoning context memories = mem.recall("Why did the pipeline fail?")
why thinkingmemory
Transform your AI agents

What changes when memory is real infrastructure, not a sidecar.

  1. 95% cost reduction

    Agents without memory repeat computations, re-fetch context, and waste tokens. Memory eliminates redundant processing, dramatically cutting API costs.

  2. Consistent behavior

    No more agents that forget previous interactions or give conflicting responses. Persistent memory ensures reliable, context-aware behavior across all sessions.

  3. Continuous improvement

    Agents learn from past experiences, improving performance over time without retraining. Every interaction makes the agent smarter and more capable.

  4. Framework independence

    Swap frameworks without losing memory. Switch LLM providers without rebuilding. Your agent's knowledge persists regardless of the stack underneath.

get started today

Give your agents memory

Join the open-source revolution in AI memory infrastructure. Make your agents cheaper, more consistent, and genuinely improving over time.

Cloud option available: Don't want to self-host? We offer a fully managed cloud version at nominal costs. Contact us for pricing.

— pull requests welcome ✎