Where source code goes when using AI coding assistants

Running an AI coding assistant on premises? Check where source code, embeddings and assistant prompts go before approving your setup.

“Local” has more than one boundary

Can source code stay inside your network when you use an AI coding assistant? The documented open-source SocratiCode setup runs indexing and search on your machine, with native Ollama for embeddings and local Qdrant for index storage.

Check separately where the assistant host sends prompts and tool results, which may contain source excerpts. Plan for the initial package, Docker image and model downloads, which require network access.

Indexing path
Source chunks → local Ollama → local Qdrant

Assistant path
Prompt + selected tool results → assistant provider, according to that host’s settings

Use the approval checklist to review both paths before using sensitive source.

Self-hosted code intelligence

Self-hosted code intelligence means the organisation operates the indexing and search infrastructure. It does not necessarily mean that every component runs on each developer's laptop.

For an individual, the local setup below uses Ollama for embeddings and local Qdrant for storage. For a team, the documented open-source pattern lets authorised developers keep their own source checkouts and connect SocratiCode to a company-operated Qdrant index. The organisation owns that endpoint, its credentials and who can access it.

Choose where source chunks are sent for embedding as a separate decision. Processes sharing an index need compatible embedding provider, model, dimensions and indexed-representation settings. One designated writer checkout creates and updates the shared index; reader checkouts query it and should match its source revision. A shared index is not a live union of everyone's uncommitted changes. Follow the shared-team operating pattern for the configuration, reader settings and update ownership.

The coding assistant remains a separate data boundary. Its provider may receive prompts and returned source excerpts even when the organisation operates the embeddings and index itself. Self-hosting the index does not establish that the complete workflow is private, offline or air-gapped. Review the assistant's configuration and the downloads described below as well.

Keep SocratiCode indexing and search on the machine

This setup needs Node.js 18.17 or newer with npx, running Docker, and a running native Ollama installation.

Set these variables on the SocratiCode MCP server before its first index:

OLLAMA_MODE=external
OLLAMA_URL=http://localhost:11434

Leave EMBEDDING_PROVIDER, EMBEDDING_MODEL, and QDRANT_MODE unset. The defaults select Ollama, nomic-embed-text, and managed local Qdrant. Restart the MCP server after changing its environment.

Open the source project and call codebase_health, then codebase_index. The embedding model downloads on first use if it is not already present. Check codebase_status until indexing completes, then run codebase_search for a feature you know exists.

The default watcher keeps the index current while the process is running.

What remains on the network

The initial npm package, Docker image, and model downloads require network access. Those downloads are different from sending project source to a remote embedding provider, but they still matter in a restricted environment.

The assistant boundary is also separate. Depending on the selected host and model provider, prompts and SocratiCode tool results may leave the machine. A local embedding model does not change that provider’s behaviour.

If the organisation uses external Qdrant, a cloud embedding provider, or a managed assistant, document each endpoint and the data sent to it. Avoid collapsing them into one “AI tool” box during review.

Existing indexes need deliberate handling

Changing embedding settings does not silently convert vectors already stored under another profile. Before changing provider, model, dimensions, or indexed representation, inspect the effective index profile and follow the project’s documented re-index path.

This matters because an apparently healthy process can still be pointing at an index produced with incompatible settings. Failure should stay visible rather than being treated as an empty search result.

A boundary checklist for approval

Open source and Cloud beta are different reviews

The open-source local path can be inspected and operated directly. SocratiCode Cloud is a private beta and introduces a managed service boundary. Treat it as a separate deployment review. Availability, data flow, and controls for a proposed Cloud environment should be confirmed during onboarding, not inferred from the local setup.

For team-wide operation, continue with shared team context. For an authorised review workflow, use security review context.

Request beta access →

Prefer the open-source route? View source guide →