Air-gapped Dev Copilot
A self-hosted developer assistant for isolated environments.
| Industry | Level | Difficulty | Recommended mode |
|---|---|---|---|
| Software engineering | 5 of 5 | Frontier | hnsw |
The problem
Section titled “The problem”- Regulated teams cannot use cloud copilots.
- Code must not leave.
- Tools must be reviewable.
How SrvDB powers Air-gapped Dev Copilot
Section titled “How SrvDB powers Air-gapped Dev Copilot”- SrvDB plus local models on internal hardware.
- Indexes repositories and docs.
- Reviewable Apache-2.0 component with SBOM.
- Shared via thread-safe service.
What changes
Section titled “What changes”| Today | With Air-gapped Dev Copilot on SrvDB |
|---|---|
| No AI help | Local AI help |
| Code leakage risk | Zero egress |
| Opaque tools | Open source |
How it works
Section titled “How it works”- Deploy local models.
- Index repos.
- Serve IDE plugin.
- Monitor usage.
- Update models.
SrvDB features it uses
Section titled “SrvDB features it uses”- 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 withset_ef_search(). - Crash-safe
persist(): after it returns, data survives a crash or power loss and reopens exactly as committed.
Use cases
Section titled “Use cases”- Defence software
- Banking code
- Healthcare systems
- Embedded firmware
- Chip design
- Government IT
Core code
Section titled “Core code”embed() is your embedding model (for example sentence-transformers, or a function that turns your records into feature vectors).
import jsonimport 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]Limits and honest notes
Section titled “Limits and honest notes”- Local model quality limits usefulness.
Build roadmap
Section titled “Build roadmap”- Prototype: load a sample of real data with
flatmode and check that searches return what an expert expects. - Measure: if you move to an approximate mode, compare its results with
flaton the same queries (recall). - Pipeline: add continuous
upsertand decide when to callpersist(). - Harden: test restarts and crashes, add logging, review every output path with domain experts.
- Deploy: ship the database directory with the application or service.
All Software engineering projects
Section titled “All Software engineering projects”| 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)