Maturity Level: Emerging - Admin REST API under active development Version: v0.2.0
Mnemonic-api is a REST Admin API for managing the Mnemonic knowledge graph — primarily patterns.
# Store a new pattern
curl -X POST http://localhost:8080/v1/api/patterns \
-H "Content-Type: application/json" \
-d '{
"name": "go-error-wrapping",
"description": "Pattern for wrapping errors with context",
"content": "Use fmt.Errorf with %w for error chains...",
"tags": ["go", "error-handling"]
}'
# Search patterns semantically
curl -X GET "http://localhost:8080/v1/api/patterns/search?q=error+handling&limit=5"See the API Specification for complete endpoint documentation, or browse the Swagger UI at http://localhost:8080/swagger/index.html when the service is running.
Mnemonic-api is a Go service that exposes a REST Admin API (port 8080) backed by PostgreSQL, PGVector, and Neo4j.
- Patterns are stored with vector embeddings (PGVector) for semantic search and concept relationships (Neo4j) for graph traversal.
- Pattern enrichment automatically extracts embeddings and concepts via an LLM pipeline. See Pattern Processing.
- Scope: REST Admin API only — no MCP server, no routing engine.
- MVP scope: Local deployment via Docker Compose, single-user trusted environment, no authentication.
- Swagger UI: Available at
http://localhost:8080/swagger/index.htmlwhile the service is running. - Post-MVP: Multi-user authentication, rate limiting, and remote access are out of scope for Phase 1.
Clone and build:
git clone https://github.com/twistingmercury/mnemonic-api.git
cd mnemonic-api/src
./build/build.shThis builds the Docker image (ghcr.io/twistingmercury/mnemonic-api) and runs E2E tests via Docker Compose. Requires Go 1.26+, Docker 27+, and Docker Compose 2.32+.
Mnemonic-api uses layered configuration:
- Built-in defaults — safe defaults for all settings
- Config file —
config.yamlsearched in/etc/mnemonic/or the current directory - Environment variables —
MNEMONIC_prefix overrides any setting (e.g.MNEMONIC_SERVER_PORT=9090)
See the Configuration Reference for all available settings.
Regenerate Swagger docs locally before committing (run from src/):
make docs-swaggerUnit tests (run from src/):
go test ./...E2E tests (requires Docker, run from src/):
./build/build.shThis project follows Semantic Versioning 2.0.0.
Version is determined from git tags:
git describe --tags --alwaysNo releases published yet. See CHANGELOG.md for development progress.