The persistent memory layer for AI coding agents
Project description
ProjectMind AI
A persistent memory layer for AI coding agents. ProjectMind analyzes your codebase, builds a structured knowledge base, and generates context-enriched prompts — so every AI interaction starts with full project awareness instead of a blank slate.
What it does
Most AI coding tools start from zero every session. ProjectMind fixes that by:
- Extracting your project's DNA (language, frameworks, architecture, patterns)
- Running static analysis (circular deps, dead code, security issues, duplicates)
- Storing a persistent memory of decisions, errors, and patterns across sessions
- Compressing all of that into a token-efficient context that fits inside any LLM's window
- Generating enriched prompts that give agents everything they need upfront
Features
| Feature | Description |
|---|---|
| Project DNA Engine | Detects language, frameworks, architecture pattern, DB, auth, deployment |
| Architecture Analyzer | AST-based static analysis — cyclomatic complexity, circular deps, dead code, security scan |
| Persistent Memory | SQLite-backed store for tasks, decisions, known errors, and patterns |
| Vector Memory | ChromaDB semantic search across all memory types (no external server) |
| Token Compression | Converts .projectmind/ files into a compact JSON context — no LLM required |
| Smart Prompt Generator | Task + compressed context + relevant memories → enriched agent prompt |
| GitLab MR Reviewer | Two-stage LangChain review chain that posts directly to merge request comments |
| REST API | FastAPI backend with endpoints for all features |
| CLI | projectmind command for init, analyze, compress, generate-prompt, memory |
Stack
- Python 3.12 + Poetry
- FastAPI — REST API backend
- LangChain — LLM chains and RAG pipeline
- SQLModel — SQLite memory persistence
- ChromaDB — embedded vector store (no server needed)
- NVIDIA NIM / OpenAI / Anthropic / Ollama — LLM providers
- Docker — containerized deployment
Quick Start
Prerequisites
- Python 3.12+
- Poetry
Install
git clone <your-repo-url>
cd projectmind
poetry install
Configure
Copy .env.local and fill in your keys:
# LLM (NVIDIA NIM recommended — access to 50+ models)
API_URL=https://integrate.api.nvidia.com/v1
API_KEY=your-nvidia-api-key
CODE_MODEL=meta/llama-3.1-70b-instruct
CONVERSATION_MODEL=meta/llama-3.1-8b-instruct
LLM_PROVIDER=nvidia
# GitLab (only needed for MR reviewer)
GIT_TOKEN=your-gitlab-personal-access-token
GIT_BASE_URL=https://gitlab.com
Initialize a project
# Analyze your project and build the .projectmind/ memory directory
projectmind init /path/to/your/project
# With LLM-enhanced architectural summary
projectmind init /path/to/your/project --llm --provider nvidia
Run static analysis
projectmind analyze /path/to/your/project
Output: circular dependencies, dead code, duplicate functions, security issues, health score.
Compress context
# Get a token-efficient JSON summary of your project (no LLM needed)
projectmind compress /path/to/your/project
# With budget and text preview
projectmind compress /path/to/your/project --budget 6000 --show-text
Generate an agent prompt
projectmind generate-prompt /path/to/your/project --task "add JWT authentication to the API"
Outputs a context-enriched prompt ready to paste into any AI coding agent.
Manage memory
# List stored memories
projectmind memory list /path/to/your/project
# Record a decision
projectmind memory add-decision /path/to/your/project
# Record a known error + fix
projectmind memory add-error /path/to/your/project
# Semantic search across all memories
projectmind memory search /path/to/your/project --query "authentication pattern"
Start the API server
projectmind serve
# or
poetry run serve
API docs available at http://localhost:8000/docs
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST |
/analyze |
Extract project DNA and initialize .projectmind/ |
POST |
/architecture |
Run full static analysis |
POST |
/compress |
Compress project context to token-efficient JSON |
POST |
/prompt/generate |
Generate context-enriched agent prompt |
GET/POST |
/memory/tasks |
Task memory CRUD |
GET/POST |
/memory/errors |
Known error memory CRUD |
GET/POST |
/memory/decisions |
Decision memory CRUD |
GET/POST |
/memory/patterns |
Pattern memory CRUD |
GET |
/memory/search |
Semantic search across memories |
POST |
/review |
GitLab MR code review |
GET |
/health |
Health check |
Docker
# Start API + Redis
docker compose up --build
# API at http://localhost:8000
# API docs at http://localhost:8000/docs
Project structure
projectmind/
├── backend/
│ ├── api/ # FastAPI app and routes
│ ├── core/
│ │ ├── analyzer/ # AST parser, dep graph, dead code, security
│ │ ├── compression/ # Token budget + compressor
│ │ ├── dna/ # Project DNA extractor + generator
│ │ ├── memory/ # SQLite + ChromaDB memory store
│ │ └── prompt/ # Smart prompt generator
│ ├── git/ # GitLab client
│ ├── llm/ # LLM provider abstraction + prompts
│ └── vector/ # Embeddings + vector store
├── cli/ # Click CLI (projectmind command)
├── .projectmind/ # Generated per-project memory directory
│ ├── architecture.md
│ ├── coding_style.md
│ ├── decisions.md
│ ├── memory.db
│ └── embeddings/
└── pyproject.toml
LLM Providers
| Provider | How to use |
|---|---|
| NVIDIA NIM | Set LLM_PROVIDER=nvidia, API_KEY=nvapi-... — access to Llama, Mistral, Phi, and more |
| OpenAI | Set LLM_PROVIDER=openai, API_KEY=sk-... |
| Anthropic | Set LLM_PROVIDER=anthropic, ANTHROPIC_API_KEY=sk-ant-... |
| Ollama | Set LLM_PROVIDER=ollama, API_URL=http://localhost:11434 — fully local |
Requirements
- No LLM key needed for:
init,analyze,compress,generate-prompt(template mode) - LLM key needed for:
--llmflag on init/generate-prompt, GitLab MR reviewer - GitLab token needed for: MR reviewer only
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llm_reviewer-0.2.0.tar.gz.
File metadata
- Download URL: llm_reviewer-0.2.0.tar.gz
- Upload date:
- Size: 112.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78e3d0519515b668d71580f11fe3be0348cb054f7b7de97ed8853162d192f2d7
|
|
| MD5 |
4e7979240bd1bf79be69059cae1ebe9a
|
|
| BLAKE2b-256 |
1c9087a4f23c0d45a6993b93af40be839a498d9a0df6210a4c144527a9563fac
|
File details
Details for the file llm_reviewer-0.2.0-py3-none-any.whl.
File metadata
- Download URL: llm_reviewer-0.2.0-py3-none-any.whl
- Upload date:
- Size: 145.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9e600217787f1574f67ce6f8ffb0112f682004594f879daa23ef764fe0a10c1
|
|
| MD5 |
d1a4dc9f8c81e76d6e25a96406351576
|
|
| BLAKE2b-256 |
b232ac9fd79be65f7af5d8eccce4633a4aea954e54f9584027916863bd351e81
|