Skip to main content

vault404: Collective AI coding agent brain - every verified fix makes ALL agents smarter

Project description

๐Ÿง  vault404

Collective Intelligence for AI Coding Agents

PyPI npm CI License Stars

Fixes Contributors Brain Size

Quick Start โ€ข How It Works โ€ข Features โ€ข Integrations โ€ข Issues


Stack Overflow taught developers. vault404 teaches AI.

Every bug you fix makes every AI agent smarter. Every bug anyone fixes makes your AI smarter.

Fix it once. Fix it for everyone.

The Problem

AI coding assistants have amnesia. Every session starts fresh. You fix a bug today, and tomorrow your AI suggests the same broken fix. Millions of developers hit the same errors, solve them in isolation, and the knowledge disappears.

Stack Overflow solved this for humans. vault404 solves it for AI.

Quick Start

Install

pip install vault404        # Python / MCP
npm install vault404        # JavaScript / TypeScript

Claude Code Setup (Required)

Run this after installation to enable silent operation:

vault404 setup-claude

This command:

  1. Registers vault404 as an MCP server
  2. Configures auto-allow permissions (no more approval prompts!)
  3. Restart Claude Code after running

Without this setup, Claude Code will prompt for permission on every vault404 operation, defeating the purpose of automatic knowledge capture.

Use in 30 Seconds

from vault404 import find_solution, log_error_fix

# Search the collective brain
solutions = find_solution("ECONNREFUSED 127.0.0.1:5432")

# Log a fix (auto-shared when verified)
log_error_fix(
    error_message="ECONNREFUSED 127.0.0.1:5432",
    solution="Use internal hostname instead of localhost",
    verified=True
)

That's it. Your fix now helps every AI agent worldwide.

How It Works

You fix a bug
     โ†“
Log it โ†’ Verify it works
     โ†“
Automatically shared (anonymized)
     โ†“
Every AI agent now knows that fix
     โ†“
Someone else fixes a different bug
     โ†“
Your AI learns it too

The more people use it, the smarter everyone's AI gets.

Features

๐Ÿ” Semantic Search

vault404 understands meaning, not just keywords:

"Cannot read property 'x' of undefined"
     โ†“ matches โ†“
"undefined property access error"
  • Embedding-based similarity using sentence-transformers
  • Hybrid scoring: 70% semantic + 30% keyword matching
  • Context-aware: language, framework, and recency boost relevant results
  • Auto-installs on first search (one-time ~90MB model download)

๐Ÿ“Š Smart Ranking

Not all solutions are equal:

Signal Weight Description
Semantic match 35% Meaning similarity via embeddings
Context match 20% Same language/framework/database
Recency 20% Recent fixes rank higher
Verification 10% Community-verified solutions
Success rate 10% Historical success/failure ratio
Popularity 5% Usage frequency

๐Ÿ”’ Privacy & Security

Your code stays yours. Only anonymized patterns are shared:

โœ… What's Shared โŒ What's NOT Shared
Error patterns Your actual code
Solution approaches File paths
Framework context Project names
Verification count API keys, secrets

Security features:

  • Automatic secret redaction (API keys, passwords, tokens stripped)
  • API key authentication for write operations
  • Rate limiting (60 searches/min, 20 writes/min)
  • Input validation on all endpoints
  • CI/CD with security scanning

๐Ÿ“ Three Knowledge Types

Type Purpose Example
Error Fixes Solutions that worked "CORS error โ†’ Add credentials: include"
Decisions Architectural choices "Chose Zustand over Redux because..."
Patterns Reusable approaches "Optimistic UI update pattern"

Integrations

Claude Code (MCP) - Recommended

Automatic setup (recommended):

vault404 setup-claude
# Then restart Claude Code

This configures both MCP registration AND auto-allow permissions so vault404 operates silently.

Manual setup (if needed):

  1. Add to ~/.claude/claude_desktop_config.json:
{
  "mcpServers": {
    "vault404": {
      "command": "python",
      "args": ["-m", "vault404.mcp_server"]
    }
  }
}
  1. Add to ~/.claude/settings.json to enable silent operation:
{
  "permissions": {
    "allow": [
      "mcp__vault404__log_error_fix",
      "mcp__vault404__log_decision",
      "mcp__vault404__log_pattern",
      "mcp__vault404__find_solution",
      "mcp__vault404__find_decision",
      "mcp__vault404__find_pattern",
      "mcp__vault404__verify_solution",
      "mcp__vault404__agent_brain_stats"
    ]
  }
}

Without permissions configuration, Claude Code will prompt for approval on every vault404 tool call.

REST API

vault404-api  # Start server on port 8000
POST /api/v1/solutions/search    # Find solutions
POST /api/v1/solutions/log       # Log error fix
POST /api/v1/solutions/verify    # Verify solution
POST /api/v1/decisions/log       # Log decision
POST /api/v1/patterns/log        # Log pattern
GET  /api/v1/stats               # Knowledge base stats

JavaScript/TypeScript

import { Vault404Client } from 'vault404';

const client = new Vault404Client();

// Find solutions
const solutions = await client.findSolution({
  errorMessage: 'Cannot find module react',
  language: 'typescript'
});

// Log a fix
await client.logErrorFix({
  errorMessage: 'Module not found',
  solution: 'npm install',
  verified: true
});

Python

from vault404 import Vault404

client = Vault404()

# Search
solutions = client.find_solution(
    error_message="Connection refused",
    language="python",
    framework="fastapi"
)

# Log
client.log_error_fix(
    error_message="Connection refused",
    solution="Start the database service",
    verified=True
)

Works With

AI Agent Integration
Claude Code MCP server (native)
Cursor REST API or JS SDK
Aider Python SDK
LangChain Tool wrapper
OpenAI/GPT Function calling
Custom agents REST API

CLI Commands

vault404 setup-claude       # Configure Claude Code (run first!)
vault404 stats              # View knowledge base stats
vault404 search "error"     # Search solutions
vault404 serve              # Start REST API server
vault404 serve-mcp          # Start MCP server
vault404 export             # Export your data
vault404 purge --confirm    # Delete all data

The Flywheel

   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   โ”‚                                     โ”‚
   โ–ผ                                     โ”‚
More Users โ”€โ”€โ–บ More Fixes โ”€โ”€โ–บ Smarter AI โ”˜

This only works if people contribute. Every verified fix you log makes the system better for everyone.

Comparison

Tool Scope Learning Semantic Search
Text files You only Manual โŒ
ReMe You only Automatic โŒ
vault404 Everyone Automatic โœ…

ReMe gives YOUR agent memory. vault404 gives ALL agents memory.

License

FSL-1.1-Apache-2.0 (Functional Source License)

  • โœ… Free for personal and company internal use
  • โœ… Self-host anywhere
  • โŒ Cannot offer as competing hosted service
  • ๐Ÿ”“ Becomes Apache 2.0 (fully open) after 4 years

Contributing

The collective brain grows with every contribution:

  1. Use it - Log your fixes, verify what works
  2. Report issues - Help us improve
  3. Spread the word - More users = smarter AI for everyone
pip install vault404

Fix it once. Fix it for everyone.

GitHub โ€ข PyPI โ€ข npm

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

vault404-0.2.0.tar.gz (63.5 kB view details)

Uploaded Source

Built Distribution

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

vault404-0.2.0-py3-none-any.whl (79.9 kB view details)

Uploaded Python 3

File details

Details for the file vault404-0.2.0.tar.gz.

File metadata

  • Download URL: vault404-0.2.0.tar.gz
  • Upload date:
  • Size: 63.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for vault404-0.2.0.tar.gz
Algorithm Hash digest
SHA256 72a49180d4b363c5c391df32571a934f94d0dfcda903d027e7ec121d1f1040f2
MD5 f50e7f03d239fa31b30d36403fb87cce
BLAKE2b-256 2e0742bcfc15528a888ebe64b9e8f4aec3f1b815c78e052e838e86863e01dcb9

See more details on using hashes here.

File details

Details for the file vault404-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: vault404-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 79.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for vault404-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7cc8c2bcf97749ff25699ede5f8f058a38e6a0de17120d53bf0863143463ef4f
MD5 50e621d952a8a541c34a80a63db064fc
BLAKE2b-256 ee2590d45918c3a6afca2286578aae22e3f98db742e00272e34340d11928a3cb

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