Skip to main content

Sync AI coding context from Git AI to Redis Agent Memory Server for semantic search and recall.

Project description

DevMemory 🧠🚀

CI PyPI License: MIT

DevMemory is a long‑term memory for AI coding agents that can explain why any file or function looks the way it does and let agents reuse that understanding across sessions without re-reading the whole repo.

Built on Git AI for capture and Redis Agent Memory Server for semantic search and recall.

Status: currently in Beta, non-production ready.

AI code attribution that answers "why?" — for developers and AI agents.

DevMemory tracks which AI tool wrote which line of code, then makes that knowledge searchable. Ask "why did we use this pattern?" and get answers backed by commits, prompts, and context.


Choose Your Setup

Option 1: Local (SQLite) — Free, No Infrastructure

For tracking AI code attributions locally without external services.

# 1. Install
pip install devmemory

# 2. Set up in your repo
cd your-project
devmemory install --mode local

# 3. Start coding — commits auto-sync
git commit -m "feat: new login"  # AI attribution tracked automatically
devmemory attribution lookup path/to/file.py  # See who wrote what

What's included:

  • AI code line attribution (SQLite)
  • Git hooks for auto-sync
  • devmemory attribution commands
  • Sentry error tracking with AI attributions

Sentry Integration (Local Mode)

When an error hits Sentry, see which AI tool and model wrote the code that caused it.

import sentry_sdk
from devmemory.sentry import create_before_send

sentry_sdk.init(
    dsn="YOUR_SENTRY_DSN",
    before_send=create_before_send(),
)

This adds ai_model, ai_tool, author, commit_sha, and other tags and context to every Sentry event from your app.


Option 2: Cloud (Redis AMS) — Full Features

Note: Full Cloud mode is coming soon. Some features below require additional setup.

For teams who want semantic search, team stats, and AI agent memory.

# 1. Install
pip install devmemory

# 2. Start Redis AMS
docker compose --profile debug up -d

# 3. Set up in your repo
cd your-project
devmemory install --mode cloud

# Start using
devmemory why src/auth.py          # Ask why a file looks this way
devmemory search "how do we auth?" # Semantic search
devmemory stats                    # AI vs Human code stats

What's included:

  • Everything in Local mode
  • Semantic memory search
  • Team code statistics
  • Cursor/Claude agent integration
  • Context briefings on branch switch

Sentry integration (Cloud): Error tracking with AI attribution is coming soon — requires API call to enrich events.


Why DevMemory?

For Developers For AI Agents
"Why did we choose this pattern?" Start with repo context, not from scratch
"Who wrote this — AI or human?" Remember what previous agents learned
Team AI vs Human code stats Reuse knowledge across sessions

With Sentry Integration: Errors automatically include AI attribution data — see exactly which AI tool and model generated the code that caused the crash.


Commands

Local Mode

Command Description
devmemory attribution lookup <file> See who wrote each line
devmemory attribution history <file> View attribution history
devmemory sync Sync Git AI notes to SQLite
devmemory status Check system health

Cloud Mode

Command Description
devmemory why <file> Explain why a file/function looks this way
devmemory search <query> Semantic search across all memories
devmemory stats AI vs Human code contribution
devmemory attribution lookup <file> See who wrote each line
devmemory attribution history <file> View attribution history
devmemory sync Sync Git AI notes to AMS
devmemory status Check system health

Requirements

  • Python 3.10+
  • Git AI — for capturing AI code attribution
  • (Cloud mode) Docker — for Redis AMS

Learn More


Stop re-explaining your code. Let DevMemory remember.

Project details


Download files

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

Source Distribution

devmemory-0.1.28.tar.gz (9.7 MB view details)

Uploaded Source

Built Distribution

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

devmemory-0.1.28-py3-none-any.whl (98.0 kB view details)

Uploaded Python 3

File details

Details for the file devmemory-0.1.28.tar.gz.

File metadata

  • Download URL: devmemory-0.1.28.tar.gz
  • Upload date:
  • Size: 9.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for devmemory-0.1.28.tar.gz
Algorithm Hash digest
SHA256 8afb7faacc4b16d12c1b852e50a32af6aeee785d9141e1a78ea613e0976cb567
MD5 e9e5552c7185d6848343aa5990cd31bc
BLAKE2b-256 e48c693842d5d55b59862f859390ae0e0a117a3bf1df82421e318e70fa6a4061

See more details on using hashes here.

File details

Details for the file devmemory-0.1.28-py3-none-any.whl.

File metadata

  • Download URL: devmemory-0.1.28-py3-none-any.whl
  • Upload date:
  • Size: 98.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for devmemory-0.1.28-py3-none-any.whl
Algorithm Hash digest
SHA256 8463af0d4d1599b3694e35147386626457556ad5d9a3be12997b031d5c648d16
MD5 2b597a486037be9f6b22bcf374c7baf9
BLAKE2b-256 2fcf7df20dff3c914e6d42fbeaf239f3ebdb21a7a4b68ed6f851a88c998c9732

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