Back to Home
zircote icon

subcog

Verified Safe

by zircote

Overview

Subcog acts as a persistent subconscious memory system for AI coding assistants, capturing decisions, patterns, learnings, and context from coding sessions, and surfacing them through semantic search and MCP server integration.

Installation

Run Command
subcog serve --transport http --port 3000

Environment Variables

  • OPENAI_API_KEY
  • ANTHROPIC_API_KEY
  • OLLAMA_HOST
  • OLLAMA_MODEL
  • LMSTUDIO_ENDPOINT
  • LMSTUDIO_MODEL
  • SUBCOG_CONFIG_PATH
  • SUBCOG_EMBEDDING_BULKHEAD_MAX_CONCURRENT
  • SUBCOG_EMBEDDING_BULKHEAD_ACQUIRE_TIMEOUT_MS
  • SUBCOG_EMBEDDING_BULKHEAD_FAIL_FAST
  • SUBCOG_LLM_MAX_RETRIES
  • SUBCOG_LLM_RETRY_BACKOFF_MS
  • SUBCOG_LLM_BREAKER_FAILURE_THRESHOLD
  • SUBCOG_LLM_BREAKER_RESET_MS
  • SUBCOG_LLM_BREAKER_HALF_OPEN_MAX_CALLS
  • SUBCOG_LLM_LATENCY_SLO_MS
  • SUBCOG_LLM_ERROR_BUDGET_RATIO
  • SUBCOG_LLM_ERROR_BUDGET_WINDOW_SECS
  • SUBCOG_LLM_TIMEOUT_MS
  • SUBCOG_LLM_CONNECT_TIMEOUT_MS
  • SUBCOG_USER_ID
  • SUBCOG_ORG_ID
  • SUBCOG_RETENTION_DAYS
  • SUBCOG_EXPIRATION_CLEANUP_PROBABILITY
  • SUBCOG_ENCRYPTION_KEY
  • RUST_LOG
  • OTEL_EXPORTER_OTLP_ENDPOINT
  • OTEL_EXPORTER_OTLP_PROTOCOL
  • SUBCOG_METRICS_PROMETHEUS_PORT
  • SUBCOG_METRICS_PUSH_GATEWAY_ENDPOINT
  • SUBCOG_METRICS_PUSH_GATEWAY_USERNAME
  • SUBCOG_METRICS_PUSH_GATEWAY_PASSWORD
  • SUBCOG_METRICS_PUSH_GATEWAY_USE_HTTP_POST
  • SUBCOG_CORS_ALLOWED_ORIGINS
  • SUBCOG_CORS_ALLOW_CREDENTIALS
  • SUBCOG_CORS_MAX_AGE_SECS
  • SUBCOG_JWT_SECRET
  • SUBCOG_JWT_ISSUER
  • SUBCOG_JWT_AUDIENCE

Security Notes

The project uses Rust's `forbid(unsafe_code)` for memory safety. It implements robust input validation, LLM prompt injection mitigation (XML escaping, strong system prompts), secrets and PII detection/redaction, JWT authentication with entropy validation, request rate limiting, and circuit breakers for external calls. File I/O operations include path traversal protection. Audit logging is also integrated. Score is 9, not 10, due to the inherent complexity of LLM integrations and local file storage, which always carry a residual risk, however well mitigated.

Similar Servers

Stats

Interest Score38
Security Score9
Cost ClassMedium
Avg Tokens3000
Stars4
Forks1
Last Update2026-01-19

Tags

AIMemory SystemCoding AssistantSemantic SearchLLMRustMCPKnowledge Graph