Skip to content

Air-gapped Dev Copilot

A self-hosted developer assistant for isolated environments.

Industry Level Difficulty Recommended mode
Software engineering 5 of 5 Frontier hnsw
  • Regulated teams cannot use cloud copilots.
  • Code must not leave.
  • Tools must be reviewable.
  1. SrvDB plus local models on internal hardware.
  2. Indexes repositories and docs.
  3. Reviewable Apache-2.0 component with SBOM.
  4. Shared via thread-safe service.
Today With Air-gapped Dev Copilot on SrvDB
No AI help Local AI help
Code leakage risk Zero egress
Opaque tools Open source
  1. Deploy local models.
  2. Index repos.
  3. Serve IDE plugin.
  4. Monitor usage.
  5. Update models.
  • Fully offline: SrvDB runs in-process and never opens a network connection.
  • Thread-safe handles: one database object can be shared between threads; searches run in parallel.
  • HNSW graph (hnsw): approximate search that visits a small part of large collections; tune with set_ef_search().
  • Crash-safe persist(): after it returns, data survives a crash or power loss and reopens exactly as committed.
  • Defence software
  • Banking code
  • Healthcare systems
  • Embedded firmware
  • Chip design
  • Government IT

embed() is your embedding model (for example sentence-transformers, or a function that turns your records into feature vectors).

import json
import srvdb
db = srvdb.Database("./air-gapped-dev-copilot-db", dimension=768, mode="hnsw")
def ingest(items):
"""items: list of (id, text, metadata dict)"""
db.upsert(
ids=[i for i, _, _ in items],
embeddings=[embed(t) for _, t, _ in items],
metadatas=[json.dumps(m) for _, _, m in items],
)
db.persist() # crash-safe checkpoint
def retrieve_code(query, k=5):
hits = db.search(embed(query), k)
return [(json.loads(db.get(i)), round(score, 3)) for i, score in hits]
  • Local model quality limits usefulness.
  1. Prototype: load a sample of real data with flat mode and check that searches return what an expert expects.
  2. Measure: if you move to an approximate mode, compare its results with flat on the same queries (recall).
  3. Pipeline: add continuous upsert and decide when to call persist().
  4. Harden: test restarts and crashes, add logging, review every output path with domain experts.
  5. Deploy: ship the database directory with the application or service.
Level Project What it does
1 · Beginner Code Search Find code by what it does.
2 · Intermediate Codebase Q&A Ask how the system works and get answers citing files.
3 · Advanced Bug Dedup Engine Links duplicate bug reports and similar stack traces.
4 · Expert Coding Agent Memory Long-term, crash-safe memory for autonomous coding agents.
5 · Frontier Air-gapped Dev Copilot (this page) A self-hosted developer assistant for isolated environments.

See also: Use cases · Live examples (coming soon)