Skip to content

vall200/agent-memory-loom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 

Repository files navigation

πŸ“¦ ContextVault β€” Persistent Memory Layer for AI Agents

Download

"Memory is the scaffold of intelligence. ContextVault gives your AI agents a permanent library, not a sticky note."

Welcome to ContextVault β€” a next-generation persistent memory system for AI agents that transcends the limitations of ephemeral chat logs and isolated session contexts. Inspired by the need for shared memory across tools, sessions, and projects, ContextVault reimagines how coding agents retain, retrieve, and reason about accumulated knowledge.

Unlike agent-recall, which focuses on task recovery, ContextVault is a memory ecosystem that allows agents to build long-term understanding, cross-reference project histories, and maintain context continuity across entirely different development environments. Think of it as giving your AI agent a neural diary that never forgets.


🧩 Table of Contents


πŸš€ Key Features

  • Persistent Cross-Session Memory β€” Agents remember conversations, code changes, and decisions across days, weeks, and months without manual state management.
  • Shared Context Across Projects β€” A single memory vault can be accessed by multiple agents working on related repositories, enabling collaborative knowledge accumulation.
  • Task Recovery & Continuity β€” If an agent is interrupted mid-task, ContextVault preserves the exact mental state, allowing seamless resumption without re-prompting.
  • Semantic Memory Indexing β€” Memories are stored with vector embeddings, enabling natural language retrieval: "Find the discussion about the API authentication issue from last Tuesday."
  • Privacy-First Architecture β€” All memory data is encrypted at rest and in transit, with local-first storage options for air-gapped environments.
  • Versioned Memory Timeline β€” Roll back to any previous memory state, useful for debugging agent behavior or undoing accidental overwrites.
  • Multi-Agent Memory Sharing β€” Enable different AI models (GPT-4, Claude 3, Gemini) to access and contribute to the same vault, creating a unified knowledge base.
  • Zero-Configuration Setup β€” Drop-in integration with existing agent frameworks via a single environment variable or configuration file.

Why "ContextVault"? Because your AI agent deserves a memory palace β€” not a temporary scratchpad. This is the difference between an agent that guesses and an agent that remembers.


🧭 Architecture Overview

Below is a high-level view of how ContextVault integrates with your existing agent workflows. The system operates as a lightweight daemon that intercepts and persists agent memory operations.

graph TD
    A[User Prompt] --> B[AI Agent]
    B --> C{ContextVault Middleware}
    C --> D[Memory Layer]
    D --> E[(Persistent Storage)]
    E --> F[Vector Index]
    E --> G[Encrypted Archive]
    F --> H[Semantic Retrieval]
    G --> I[Version History]
    H --> C
    I --> C
    C --> B
    B --> J[Agent Response]
    J --> K[User]
    C --> L[Shared Vaults]
    L --> M[Agent 2]
    L --> N[Agent 3]
Loading

Components:

  • Memory Layer: Intercepts all agent-internal context before it's consumed or generated.
  • Vector Index: Converts memory items into searchable embeddings using OpenAI's text-embedding-3-small or Claude's embedding API.
  • Encrypted Archive: Stores raw memory payloads with AES-256 encryption.
  • Version History: Maintains a git-like diff log for each memory entry.
  • Shared Vaults: Network-accessible memory pools that multiple agent instances can connect to.

βš™οΈ Example Profile Configuration

Below is a sample YAML profile that you can drop into your project's root directory. This configures ContextVault for a multi-agent code review setup.

# contextvault.yml
version: "2.0"
vault_name: "project-omega-memory"
encryption_key_env: CONTEXTVAULT_KEY

agents:
  - name: "code-reviewer"
    model: "openai/gpt-4-turbo"
    memory_strategy: "semantic"
    retention_days: 90
    shared_vaults:
      - "proj-omega-architect"
      - "proj-omega-security"

  - name: "documentation-bot"
    model: "claude-3-opus"
    memory_strategy: "sequential"
    retention_days: 365
    shared_vaults:
      - "proj-omega-architect"

storage:
  backend: "local"
  path: "./.contextvault/data"
  encryption: true
  compression: "zstd"

index:
  engine: "hybrid"
  vector_dimensions: 1536
  similarity_metric: "cosine"
  auto_index_interval: 5

retrieval:
  max_results: 10
  relevance_threshold: 0.75
  include_metadata: true

logging:
  level: "info"
  audit_trail: true
  metrics_endpoint: "http://localhost:9090/metrics"

Environment variables to set:

export CONTEXTVAULT_KEY="your-256-bit-hex-key-here"
export CONTEXTVAULT_ENDPOINT="http://localhost:8080"
export CONTEXTVAULT_SHARED_SECRET="shared-vault-access-token"

πŸ’» Example Console Invocation

Once ContextVault is configured, launching an agent with persistent memory is as simple as prefixing your existing command. Below are three idiomatic usage patterns.

Basic usage β€” single agent session:

contextvault run --profile ./contextvault.yml --agent code-reviewer "Review this PR for security vulnerabilities"

Multi-agent collaborative session:

contextvault run \
  --profile ./contextvault.yml \
  --agent code-reviewer \
  --agent documentation-bot \
  "We need to update the authentication module and write docs for it"

Recalling past memory directly:

contextvault recall --vault project-omega-memory --query "previous discussion on JWT expiry" --limit 5

Starting a fresh session but retaining previous context:

contextvault run --profile ./contextvault.yml --resume-last --agent code-reviewer "Continue from where we left off"

Server mode (runs as daemon):

contextvault serve --port 8080 --max-memory 2GB

πŸ’Ώ OS Compatibility Matrix

ContextVault is designed to work across all major operating systems used in development environments. The matrix below shows compatibility status as of 2026.

Operating System Version Compatibility Notes
🐧 Linux Ubuntu 20.04+ βœ… Full Support Native performance, recommended for production
🐧 Linux Debian 11+ βœ… Full Support Works with systemd or init.d
🐧 Linux Fedora 38+ βœ… Full Support Tested with dnf package manager
🐧 Linux Arch Linux βœ… Full Support AUR package available
🍏 macOS Ventura (13.0) βœ… Full Support Intel & Apple Silicon native binaries
🍏 macOS Sonoma (14.0) βœ… Full Support Supports Rosetta 2 emulation
πŸͺŸ Windows Windows 10 (22H2) βœ… Full Support WSL2 integration recommended
πŸͺŸ Windows Windows 11 βœ… Full Support Native PowerShell cmdlets
πŸͺŸ Windows Windows Server 2022 ⚠️ Partial Support Core features only, no vector index
πŸ“± macOS Monterey (12.x) ⚠️ Partial Support Legacy support β€” upgrade recommended
🐧 Linux Alpine Linux ⚠️ Partial Support Requires musl-compatible build

Note: For containerized environments, we provide officially maintained Docker images on the GitHub Container Registry.


πŸ”Œ API Integrations

ContextVault offers first-class integration with both OpenAI and Claude APIs, allowing you to leverage the best embedding and retrieval models available.

OpenAI API Integration

from contextvault import Vault

# Initialize with OpenAI
vault = Vault(
    api_provider="openai",
    api_key=os.getenv("OPENAI_API_KEY"),
    embedding_model="text-embedding-3-small",
    vector_dimensions=1536
)

# Store a memory
vault.store(
    agent_id="code-reviewer",
    content="The JWT refresh token should be rotated every 15 minutes for security.",
    metadata={"project": "omega", "module": "auth"}
)

# Retrieve similar memories
results = vault.retrieve("What was the refresh token policy?")
print(results[0].content)  # "The JWT refresh token should be rotated every 15 minutes..."

Claude API Integration

from contextvault import Vault

# Initialize with Anthropic Claude
vault = Vault(
    api_provider="anthropic",
    api_key=os.getenv("ANTHROPIC_API_KEY"),
    embedding_model="claude-3-embedding",
    vector_dimensions=1024
)

# Claude's context window optimization
vault.set_context_policy(
    max_tokens=100000,
    priority_strategy="relevance_first",
    compression_ratio=0.7
)

# Hybrid retrieval for Claude-native memory augmentation
results = vault.hybrid_retrieve(
    query="authentication architecture decisions",
    alpha=0.5,  # balance between semantic and keyword search
    boost_recent=True
)

Supported Providers:

  • βœ… OpenAI (GPT-4, GPT-4 Turbo, GPT-3.5)
  • βœ… Anthropic Claude (Claude 3 Opus, Sonnet, Haiku)
  • βœ… Google Gemini (Gemini Pro, Ultra)
  • βœ… Local models via Ollama + sentence-transformers
  • βœ… Custom embedding endpoints (any OpenAI-compatible API)

πŸ“± Responsive UI & Multilingual Support

Responsive Web Dashboard

ContextVault includes a fully responsive web dashboard that works on desktop, tablet, and mobile devices. The dashboard is built with modern web components and provides:

  • Real-time memory visualization β€” See agent memories being created and retrieved as they happen.
  • Semantic search interface β€” Natural language queries with instant results.
  • Memory timeline explorer β€” Browse the version history of any memory entry.
  • Agent activity log β€” Detailed audit trail of all memory operations.
  • Shared vault management β€” Configure which agents access which vaults.

The UI adapts seamlessly from a 27-inch monitor down to a 6-inch smartphone screen, using CSS Grid and container queries for layout flexibility.

Multilingual Support

ContextVault's memory layer is language-agnostic β€” it stores and retrieves content in any language without special configuration. The dashboard interface itself supports:

Language Locale Status
πŸ‡ΊπŸ‡Έ English en-US βœ… Complete
πŸ‡ͺπŸ‡Έ Spanish es-ES βœ… Complete
πŸ‡«πŸ‡· French fr-FR βœ… Complete
πŸ‡©πŸ‡ͺ German de-DE βœ… Complete
πŸ‡―πŸ‡΅ Japanese ja-JP βœ… Complete
πŸ‡¨πŸ‡³ Mandarin Chinese zh-CN βœ… Complete
πŸ‡°πŸ‡· Korean ko-KR ⚠️ Beta
πŸ‡§πŸ‡· Portuguese (BR) pt-BR ⚠️ Beta
πŸ‡·πŸ‡Ί Russian ru-RU ⚠️ Beta
πŸ‡ΈπŸ‡¦ Arabic ar-SA πŸ”„ In Progress

For developers: Adding a new language requires only a JSON translation file. The UI automatically detects the user's browser locale and switches accordingly.


πŸ›‘οΈ Disclaimer

ContextVault is provided as a tool for legitimate AI-assisted development workflows. The creators and maintainers of this project:

  1. Do not condone the use of this software for unauthorized surveillance, data exfiltration, or any activity that violates applicable privacy laws or terms of service of any AI platform.
  2. Are not responsible for any data loss, security breaches, or misuse arising from improper configuration or deployment of ContextVault in production environments.
  3. Recommend that users review their organization's data governance policies before deploying shared memory vaults in team or enterprise settings.
  4. Encourage users to encrypt sensitive memory payloads and rotate encryption keys regularly, especially when using multi-tenant or cloud-hosted storage backends.
  5. Advise that memory retrieval accuracy depends on the quality of embedding models and may not be suitable for mission-critical decision-making without human verification.

By using ContextVault, you acknowledge that:

  • You have read and understood this disclaimer.
  • You assume all risks associated with persistent memory storage for AI agents.
  • You will comply with all applicable laws and regulations regarding data retention and privacy.

If you have concerns about compliance or security, please open a discussion in the repository's Issues section.


πŸ“„ License

ContextVault is released under the MIT License.

Copyright (c) 2026

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Full license text


🌟 Final Thoughts

ContextVault is more than just a memory tool β€” it's a philosophical shift in how we think about AI agent continuity. Instead of treating each interaction as a self-contained island, we build bridges of understanding that span days, projects, and teams. Your agents become veterans of your codebase, not tourists.

"An agent with memory is an agent with wisdom."


Download

πŸ“¦ Installation Quick Links:


Built for the developers of 2026 β€” where AI agents remember everything that matters. 🧠✨

Releases

No releases published

Packages

 
 
 

Contributors