Claw-dex: Collective AI coding agent brain - every verified fix makes ALL agents smarter
Project description
Claw-dex ๐ฆ
Collective AI Coding Agent Brain
Every verified fix makes ALL AI agents smarter. Automatic sharing, fully anonymized.
"Fix it once, fix it for everyone."
How It Works
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ AGENT A fixes a bug โ
โ โ โ
โ โผ โ
โ log_error_fix() โโโบ LOCAL STORAGE (encrypted, private) โ
โ โ โ
โ โผ โ
โ verify_solution(success=True) โ
โ โ โ
โ โโโโบ ANONYMIZE (strips paths, IPs, secrets, identifiers) โ
โ โ โ
โ โผ โ
โ AUTO-CONTRIBUTE โโโบ COMMUNITY BRAIN โ
โ โ โ
โ โผ โ
โ AGENT B, C, D... โโโ find_solution() โโโบ Returns ranked matches โ
โ โ
โ THE BRAIN GROWS WITH EVERY VERIFIED FIX โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
No opt-in. No manual steps. Verified = Shared.
Security: Why Automatic Sharing is Safe
| Layer | Protection |
|---|---|
| Secret Redaction | 20+ patterns strip API keys, passwords, tokens BEFORE local storage |
| Anonymization | Project paths, IPs, UUIDs, emails stripped BEFORE sharing |
| Local Encryption | AES-256 for your private copy |
| Verification Gate | Only WORKING solutions get shared (verify_solution=True) |
| No Raw Data | Community sees patterns, not your code |
What It Does
- Logs errors and fixes - When you fix a bug, Claw-dex remembers how
- Records decisions - Captures architectural choices and their rationale
- Builds pattern library - Extracts reusable patterns from experience
- Semantic search - Finds relevant solutions using AI-powered matching
- Auto-redacts secrets - API keys, passwords, tokens are never stored
Installation
# Clone the repo
git clone https://github.com/yourusername/clawdex
cd clawdex
# Install with uv (recommended)
uv pip install -e .
# Or with pip
pip install -e .
Usage with Claude Code
Add to your ~/.claude.json:
{
"mcpServers": {
"clawdex": {
"command": "python",
"args": ["-m", "clawdex.mcp_server"]
}
}
}
Tools
Recording
| Tool | Purpose |
|---|---|
log_error_fix |
Record an error and its solution (secrets auto-redacted) |
log_decision |
Record an architectural decision |
log_pattern |
Record a reusable pattern |
Querying
| Tool | Purpose |
|---|---|
find_solution |
Search local + community for solutions |
find_decision |
Look up past decisions |
find_pattern |
Find patterns for a problem |
Verification (Triggers Auto-Share)
| Tool | Purpose |
|---|---|
verify_solution |
Confirm fix worked โ AUTO-CONTRIBUTES to community |
Maintenance
| Tool | Purpose |
|---|---|
get_stats |
Get knowledge base statistics |
purge_all |
Delete all YOUR data (local only) |
export_all |
Export all your data |
Example: The Full Loop
1. Agent Fixes a Bug
log_error_fix(
error_message="ECONNREFUSED 127.0.0.1:5432",
solution="Use Railway internal hostname instead of localhost",
platform="railway",
database="postgresql",
category="deployment"
)
# โ Saved locally (encrypted, secrets redacted)
2. Confirm It Worked โ Auto-Share
verify_solution(record_id="abc123", success=True)
# โ Marked as verified
# โ AUTOMATICALLY anonymized and contributed to community brain
# โ "Marked solution abc123 as successful โ Auto-contributed to community brain."
3. All Agents Benefit
# Any agent, anywhere, hits similar error:
find_solution(
error_message="Connection refused to postgres database",
platform="railway"
)
# Returns:
# - YOUR local matches (highest trust)
# - Community matches (ranked by verification count)
That's it. No manual sharing. The brain grows automatically.
Secret Detection
Claw-dex automatically detects and redacts sensitive data:
BEFORE (what you log):
DATABASE_URL=postgresql://user:secretpass123@db.example.com:5432/mydb
AFTER (what gets stored):
DATABASE_URL=postgresql://[REDACTED]@db.example.com:5432/mydb
Detected patterns:
- API keys (OpenAI, Stripe, GitHub, AWS, etc.)
- Passwords and secrets
- Connection strings
- Auth tokens
- Private keys
Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Claw-dex (MCP Server) โ
โ โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โ โ log_error_fix โ โ find_solution โโโโโ โ
โ โ log_decision โ โ find_decision โ โ โ
โ โ log_pattern โ โ find_pattern โ โ โ
โ โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ โ
โ โผ โ โ
โ โโโโโโโโโโโโโโโโโโโ โ โ
โ โ Secret Redactor โ (20+ patterns) โ โ
โ โโโโโโโโโโฌโโโโโโโโโ โ โ
โ โ โ โ
โ โผ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ LOCAL STORAGE โโโโโโโโโ โ
โ โ ~/.clawdex/ (AES-256) โ โ
โ โโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โ verify_solution(success=True) โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโ โ
โ โ ANONYMIZER โ (strips paths, IPs, identifiers) โ
โ โโโโโโโโโโฌโโโโโโโโโ โ
โ โ โ
โ โ AUTO-CONTRIBUTE (no manual step) โ
โ โผ โ
โโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ COMMUNITY BRAIN โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ Agent A's โ โ Agent B's โ โ Agent C's โ ... โ
โ โ verified โ โ verified โ โ verified โ โ
โ โ solutions โ โ solutions โ โ solutions โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ
โ Ranked by: verification_count, context_match, recency โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Data Rights
| Right | Command |
|---|---|
| Right to Export | clawdex export > my-data.json |
| Right to Delete | clawdex purge --confirm |
| Right to Know | All data is locally stored at ~/.clawdex/ |
License
FSL-1.1-Apache-2.0 (Functional Source License)
- โ Free for personal use
- โ Free for company internal use
- โ Free to modify and self-host
- โ Cannot offer as a competing hosted service
- ๐ Becomes Apache 2.0 (fully open) after 4 years
See LICENSE for details.
Based On
- Mempalace - MIT License
- Karpathy's LLM Wiki Pattern
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 clawdex-0.1.2.tar.gz.
File metadata
- Download URL: clawdex-0.1.2.tar.gz
- Upload date:
- Size: 32.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
056462d7159e6c305b0575845cbc4ef09c96c0c27f038631b3192fdd085c945f
|
|
| MD5 |
ea1e9a9f484d05e0ecb7084c0a0ed4ab
|
|
| BLAKE2b-256 |
bae6acdc8ddee8b1859b30f2e75e215c68c42469fa0990ebe4e679ffe8e3c08e
|
File details
Details for the file clawdex-0.1.2-py3-none-any.whl.
File metadata
- Download URL: clawdex-0.1.2-py3-none-any.whl
- Upload date:
- Size: 42.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ec4e04fca70c2044d0451a78c8d72fcc35d5ea8ed2c94e462033518818081be
|
|
| MD5 |
ea3862762ec9684dd95f7d8b846fb4b7
|
|
| BLAKE2b-256 |
3a21644177a4dfd92f7f04b9305e3762a03cff3193895cec3178f665f533850a
|