Skip to main content

DevMemory is a long‑term memory for AI coding agents. Make AI knowledge searchable.

Project description

DevMemory 🧠🚀

CI PyPI License: MIT

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

Built on Git AI for capture.

Local mode: SQLite storage (free, works offline)
Cloud mode: API-based advanced features (coming soon)

Status: currently in Beta.

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.


Quick Install

# One-line install (local mode)
curl -sSL https://raw.githubusercontent.com/AI-Provenance/ai-dev-memory/main/scripts/install.sh | bash

Then in your project:

devmemory install --mode local

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

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

Python:

import sentry_sdk
from devmemory.sentry import create_before_send

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

Node.js / Next.js:

npm install @aiprovenance/sentry
import { createDevMemoryBeforeSend } from "@aiprovenance/sentry";

Sentry.init({
  dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
  beforeSend(event, hint) {
    return createDevMemoryBeforeSend()(event, hint);
  },
});

Auto-detects repoId from git remote or DEVMEMORY_REPO_ID env var.

This adds ai_model, ai_tool, author, commit_sha, and other tags to every Sentry event.


Option 2: Cloud — Advanced Features (Coming Soon)

Note: Cloud mode with advanced features is coming soon. Sign up at aiprove.org to get notified.

For teams who want semantic search, team analytics, and AI-powered insights.

# 1. Install
pip install devmemory

# 2. Get API key at aiprove.org
# 3. Set up in your repo
cd your-project
devmemory install --mode cloud --api-key YOUR_API_KEY

# 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 Cloud
devmemory status Check system health

Requirements

  • Python 3.10+
  • Git AI — for capturing AI code attribution
  • (Cloud mode) API key from aiprove.org

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.3.0.tar.gz (146.7 kB view details)

Uploaded Source

Built Distribution

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

devmemory-0.3.0-py3-none-any.whl (81.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: devmemory-0.3.0.tar.gz
  • Upload date:
  • Size: 146.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for devmemory-0.3.0.tar.gz
Algorithm Hash digest
SHA256 9ba1e0a652712f88e95af8a1a0ff92220bef4a54b293874942f0bfbce2c4e026
MD5 e13b3b2a9251a33d581f806eb1610ca5
BLAKE2b-256 ee0e0d0a5f7c9dd1029c561e1b8d1196eafc596aca968c138c38ef30b4bc2b58

See more details on using hashes here.

File details

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

File metadata

  • Download URL: devmemory-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 81.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for devmemory-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ead5835f9ca07e3649e3757edcdd06a130ad8210432a032be9b39eb18fb6996
MD5 a1704759e29857090ae4b8674f22fbfc
BLAKE2b-256 51868f9d27def223093febf44f9ae176b339e7dc538507bcce2bd2311a512c56

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