A visual guide to the architecture

Your knowledge.
Your infrastructure.

Search your documents with local AI models and Qdrant. Connect an application, or let an AI agent ask in plain language. Keep the search on your computer or private network.

A search stack you can ownFig. 02
Applications and agents reach your local search services Your application talks to the middleware directly. An AI agent, with optional skill instructions, connects through the optional MCP server. Only the middleware calls Smart Embedder and Qdrant. The search services are shown inside your computer or private network; your choice of agent determines where its language model runs. YOUR COMPUTER / PRIVATE NETWORK Your app / API client AI agent + optional skill MCP serverOPTIONAL BRIDGE Middleware Smart EmbedderLOCAL MODELS QdrantYOUR VECTOR STORE
One coordinator. Clear responsibilities.
An explainer from Smart Semantic Searcher
01 / Connect→02 / Search locally→03 / Return evidence

You choose the data boundary. Host Qdrant and your agent’s language model locally to keep the full workflow on your own infrastructure. A cloud-backed agent can receive your questions and returned passages. See the three setups ↓

01 / The big picture

A small team behind every search.

Think of an archive: one desk handles requests, a specialist understands the text, and a catalog finds the promising passages.

THE FRONT DESK

Middleware coordinates.

The entry point for searching and managing collections. It checks requests, calls the right services, and assembles the results.

One API for your applications and the MCP bridge.
THE TEXT SPECIALIST

Smart Embedder understands.

Local models turn text into numerical representations and give promising matches a second, closer reading.

Embedding + reranking on your own CPU or NVIDIA GPU.
THE SEARCHABLE ARCHIVE

Qdrant stores and retrieves.

A vector database stores passage text, metadata and vectors. It searches for both meaning and vocabulary signals, then combines the rankings.

Your Qdrant instance on a machine or network you control.
For AI agents

An optional MCP server exposes these operations as tools. An optional skill teaches the agent how to use them. The core search stack works without either.

Understand the difference
02 / Follow one request

From a plain question
to your own evidence.

Follow an agent searching a pre-indexed collection of team documents. Each step shows who acts and what crosses the next connection.

Inside your architectureReady when you are
01 / Start in your own words

You ask.
Your agent interprets.

An AI agent turns your request into a plan. If its host loads the supplied skill, the agent gets guidance on choosing tools, checking the collection and using the results.

Agent host · optional skill instructions
The skill is a playbook for the agent. It is not another running service.
You, in natural language

“Find our remote-work policy and show me the source.”

Your AI agentUnderstands the request
Optional skill

Check the collection.
Search before answering.
Keep the source.

The agent’s language model can be local or cloud-hosted.

02 / Cross a standard connection

MCP gives the agent
a set of tools.

The connected client exposes the search tool to the agent. The MCP server translates a structured tool call into a request to the middleware.

MCP server · optional tool bridge
MCP provides the connection. The agent decides how to use the returned information.
A structured search requestMCP TOOL
qdrant_search
Collection
team_docs
Question
remote-work policy
Reranking
enabled
MCP → MiddlewareAuthenticated HTTP request
POST /query/search

The MCP server never calls Qdrant or Smart Embedder directly.

03 / Coordinate the work

One front door.
One search workflow.

The middleware checks access, validates the request and coordinates the services. Your application or the local console can also use this API directly, without MCP.

Middleware · authentication and orchestration
An agent and an application reach the same search capabilities through different entry points.
Application / consoleDirect API request
AI agentRequest via MCP
MiddlewareValidate → orchestrate → return
Access checksRequest limitsSearch contract
04 / Run the local models

Give the question
two search signals.

Smart Embedder converts the question into a dense vector for meaning and a learned sparse vector for vocabulary signals. The chosen models run on your CPU or NVIDIA GPU.

Smart Embedder · local inference
Basic and advanced both provide dense + sparse embeddings and a reranker.
On your hardwareSmart EmbedderCPU / NVIDIA GPU

◎ Meaning / dense

A compact numerical representation

# Vocabulary / sparse

remoteworkpolicy

Selected, weighted vocabulary signals

Illustrative vectors. The collection must use the same embedding contract.

05 / Search your stored knowledge

Qdrant finds
the promising passages.

Qdrant searches the collection’s dense and sparse vectors, then fuses the rankings. The middleware receives a shortlist with the stored passage text and source metadata.

Qdrant · storage, retrieval and fusion
Qdrant is a separate instance you provide. Its location determines where the stored data lives.
Qdrant · team_docsPreviously indexed passages + vectors
◎ Dense search# Sparse search
Combine the rankings
01Remote-work policypolicy_2026
02Team working agreementshandbook
03Home-office guidanceoffice_guide

Passages and source labels are fictional examples.

06 / Take a closer look, then return

Local ranking.
Source-backed context.

The middleware sends a limited window to Smart Embedder’s reranker. It returns ordered results through MCP to the agent, which can use those passages to compose a sourced answer.

Embedder → Middleware → MCP → Agent
Search returns evidence. The agent’s own language model writes any final answer.
Local rerankerRanked passages
Returned evidence · passage 01

Remote-work policy

“Team members may work remotely under their team’s agreed schedule. Confirm the arrangement with your manager.”

Source: policy_2026Text + metadata + scores

Your agent receives the excerpt and its source. With a cloud-backed agent, this information may leave your local infrastructure.

You control the pace. Nothing plays automatically.Illustrative workflow · no requests are sent
Prefer to read? The architecture in six sentences
  1. Ask. An AI agent interprets your natural-language request, optionally guided by a client-side skill.
  2. Connect. The MCP server turns the agent’s tool call into an HTTP request to the middleware.
  3. Coordinate. The middleware checks the request and manages the search workflow; applications can also call it directly.
  4. Encode. Smart Embedder runs local models to create dense and learned sparse query vectors.
  5. Retrieve. Your Qdrant instance searches stored vectors and combines the rankings into one candidate pool.
  6. Return. After local reranking, passages return to the agent through the middleware and MCP; the agent’s model can then write an answer.
03 / Choose your boundaries

Same architecture.
Your place. Your hardware.

Explore where the components live, which models run, and which information crosses the boundary. These choices are independent.

Your deployment, illustratedInside this computer

Basic models, running on CPU.

Your computerYOUR SEARCH STACK
Local agent + local language modelThe skill stays with the agent. MCP connects it to search.
AgentMCPMiddleware
Local inferenceSmart EmbedderCPU · no GPU required
Storage + retrievalQdrantStored on this computer

Passage text, metadata and vectors stay in your local Qdrant instance.

Dense model
BGE-M3
Sparse model
BGE-M3
Reranker
BGE-reranker-v2-m3
The complete workflow can stay on this computer.

This assumes Qdrant and your agent’s model run locally too. Keep any additional agent tools and data sharing inside the same boundary.

Both embedding and reranking run on CPU. The autotuner chooses a suitable local runtime and conservative batching for your hardware.

Storage follows Qdrant. The stack connects to the Qdrant instance you configure, or starts one beside the middleware when QDRANT_BUNDLED=true. To keep stored data local, use your own PC or an internal server.

First-run preparation needs downloads. Container images, dependencies and pinned model weights must be available. Once prepared, embedding and reranking have no hosted inference dependency.

What makes a private-network setup private?

Keep the services and Qdrant on trusted infrastructure, control who can connect, and use an agent whose model and external integrations fit that boundary. The embedder host port binds to loopback. The middleware and MCP bind to loopback by default and can be published to an allowed private IPv4 address for authenticated trusted clients; neither is a public internet endpoint. A remote agent needs a supported private connection, VPN or authenticated tunnel.

The supplied template permits unauthenticated local access. Authentication depends on each service’s configured credentials and authentication mode. Follow the deployment configuration reference before enabling access from other machines. Connecting a cloud-backed agent does not move the vector database to the cloud, but selected tool results and conversation content may be processed by the model provider. A desktop agent app can still use a cloud model.

04 / Speak naturally. Act through tools.

MCP gives access.
A skill gives guidance.

You describe the task in ordinary language. The agent uses its model to choose an available tool, supplies structured arguments, and interprets the response.

The connection / MCP

A standard way to use tools.

The optional MCP server exposes the middleware as 28 tools, plus documentation, live-state resources and workflow prompts. It gives a compatible agent a defined way to search, inspect and manage your collections.

MCP connection reference ↗
The instructions / Skill

A playbook beside the agent.

The supplied skill teaches tool selection, search tuning and careful workflows. It is Markdown loaded by the agent host, not a container or a model. It complements the MCP tools; installing it alone does not create a connection.

Client-side skill reference ↗
A request, translatedIllustrative examples · nothing is sent
You say
“Find our remote-work policy and show me the source.”

The agent knows the target collection is team_docs. The documents have already been indexed.

The agent can use

qdrant_search

Search the collection with hybrid retrieval and reranking, then inspect the returned text and source metadata.

What comes back

Ranked passages with source IDs and scores. The agent can cite those sources when composing an answer.

Agent → MCP → Middleware → local models + Qdrant → returned evidence

The skill helps; the server enforces. Skills guide model behaviour, while authentication, input checks and implemented confirmation gates live in the services. Destructive actions need an intentional user-approved workflow; a skill is not an access-control boundary.

You connect the agent host. Configure its supported MCP connection, make the private endpoint reachable, authenticate, then load the skill if the host supports it. This stack supplies search tools, not the agent’s conversational language model.

05 / Built for local hybrid search

Prepared once.
Tuned for your hardware.

Dense and sparse retrieval find candidates; reranking gives the shortlist a closer look. The runtime is prepared for the model profile and machine you choose.

Choose a model family

Basic or advanced.

Basic pairs BGE-M3 with a BGE reranker. Advanced combines Qwen dense embeddings, MILCO learned sparse embeddings and a Qwen reranker. Both serve this dense + sparse + rerank workflow. Meet the models in each profile ↗.

Choose the hardware

CPU or NVIDIA GPU.

CPU execution needs no GPU. A compatible NVIDIA GPU can accelerate inference. Advanced also supports CPU, with conservative batching; actual speed and capacity depend on your hardware and workload.

Calibrate the runtime

Measure before serving.

A pre-start autotuner checks runtime candidates, batching and memory against quality and stability gates. Decisions are saved per profile and recalibrated when the hardware/software fingerprint changes.

Prepare the collection before askingDocuments need passages, vectors and source metadata stored in Qdrant. Search reuses those vectors. File staging and document preparation are operator steps; MCP is not a general filesystem or document-parsing service.

Changing profiles changes the vector spaceThe profile is selected at startup, not switched live. Collections carry an embedding contract; a profile mismatch is reported as incompatible. Use a compatible collection and a supported re-embedding or reindex workflow.

Keep the models close to the data.
Keep the service roles clear.
Keep the source with the answer.

On GPU, BASIC and safe ADVANCED use one inference lane. A measured ADVANCED profile can overlap embedding and reranking; each reranker instance remains serialized. Models use pinned revisions and local caches. For the ranking itself, follow the companion hybrid search and reranking guide.

A little less jargon.

What is a service?

A running program with a specific job and an interface other programs can call. Here, the middleware, Smart Embedder and optional MCP server have separate container images. Qdrant is a separately provided database.

What is an AI agent?

An application that uses a language model to interpret a task and choose actions through tools. Its host manages connections and context. The model can run locally or with an external provider; that choice matters for privacy.

What is MCP?

The Model Context Protocol is a standard for connecting AI applications to tools and context. This repository’s MCP server exposes middleware operations over streamable HTTP. Using HTTP does not by itself mean using the public internet.

What is an agent skill?

Instructions and reference material that a compatible agent host can load. This repository’s skill explains how to use its MCP tools. It does not run the embedding models, store documents or grant permission by itself.

What does “local” mean here?

The embedding and reranking models run on your hardware. For the whole workflow to remain within your PC or private network, Qdrant, the agent model and any external integrations must also stay within that boundary. Model downloads during setup are different from sending document text to a hosted inference service.

Why does hybrid search need Qdrant?

Smart Embedder produces vectors and reranker scores. Qdrant stores the passage vectors and text, retrieves candidates using dense and sparse search, and fuses the rankings. The middleware coordinates the two services.

Go one level deeper.

Checked against the repository’s service references and the linked primary documentation. This page is an offline explanation; it does not inspect your machine, connect to your services, or change their configuration.