One AI Coordinator. Clear service boundaries.
Follow a question through the public harness snapshot, then explore the target design for specialist delegation and artifact evaluation. The walkthrough uses a fictional Atlas request.
- Single coordinator
- Prepared knowledge
- Durable state
- Provider-flexible
On this page
Retrieval index
Stored sources, bounded context.
A model request has a finite context window. Prepared source text and its searchable index persist outside that window; Retrieval MCP selects the relevant passages for each task. The corpus can grow independently of a conversation, while retrieval quality determines what reaches the model.
- Prepare sources
- Ingestion preserves source text and prepares document embeddings and a matching Qdrant index.
- Retrieve evidence
- Retrieval MCP encodes the question with shared BGE, searches the index and reads prepared text.
- Answer
- Relevant passages return to the coordinator for a grounded response.
Explore the full retrieval index diagram
Select a component to explore its role.
View all component details
- Source documents: Original source material remains intact while preparation creates the searchable release.
- Prepare source text: Convert supported inputs, preserve substantive source text and identify the excerpts to encode. Preparation supplies full text independently of document embeddings.
- Document encoding: The batch embedding worker calls shared BGE in document mode. It encodes source excerpts; it does not generate prepared full text.
- Prepared text: Retain prepared full source text for bounded reads. Pair it with the Qdrant index in the same active knowledge release.
- Search index: Qdrant stores the searchable dense and hashed lexical representation. Retrieval searches the active release index, then reads source text from its matching prepared store.
- Question: The AI Coordinator sends the question to Retrieval MCP. It does not encode the query or query Qdrant directly.
- Retrieval MCP: Receive the question, call shared BGE in query mode and use the returned vector to search Qdrant. Read matching prepared source text from the same active release, then return relevant evidence.
- Query encoding: Retrieval calls the same shared BGE service used for document encoding, applying query mode to the question. BGE returns the query vector to Retrieval; Retrieval owns search and source reads.
- Evidence context: Retrieval returns relevant source passages and their internal identity to the coordinator for grounding. Evidence identity is not a normal answer citation card.
- Grounded answer: The coordinator uses retrieved evidence in the selected model call, checks the returned result and gives a concise plain answer. Source titles or headings can be named in prose when requested.
Public harness snapshot
How one request reaches an answer.
Browser requests via HTTP/AG-UI and MCP requests via ask_nis reach the same bounded graph in Coordination. The graph searches the retrieval index, can read a source passage, selects a model route, and saves conversation checkpoints in PostgreSQL.
Read the request handlers or inspect the retrieval and inference graph in the pinned source.
This design view includes planning and synthesis for delegated work. The shipped answer path above uses a single graph with two retrieval tools.
- One coordinator
- The same AI Coordinator appears at planning and completion; these are two stages, not two services.
- Evidence and inference
- Retrieval MCP returns source evidence. A selected model route generates the response.
- Conversation state
- PostgreSQL retains conversation content independently of inference.
Explore the full request design diagram
Select a component to explore its role.
View all component details
- Question: Ask about Atlas. Topic / conversation
- AI Coordinator: Restore context. Plan retrieval
- Retrieval MCP: Receive the question from the coordinator, call shared BGE in query mode, search Qdrant and read prepared source text from the same active knowledge release. Return evidence to the coordinator.
- Model call: Generate a candidate answer from the question and retrieved evidence using the selected model route.
- AI Coordinator · completion: The coordinator checks the returned material against source evidence, applies bounded answer checks and completes the conversation. This is the same coordinator shown at planning.
- Answer: Explain the Atlas blockers in a concise plain answer. Evidence identity stays internal; requested source titles or headings can be named in prose. Ordinary answers omit citation cards and internal IDs.
- Conversation state: PostgreSQL retains conversation content and LangGraph checkpoints for continuation. Browser storage keeps the current conversation UUID.
- Model backends: Run the selected inference call through a configured backend such as Ollama or Fireworks AI.
Target architecture
Components, state, and system boundaries.
The target design extends the Coordination Layer with specialist delegation and separate Harbor Hub and Hugging Face evaluation routes. The public snapshot runs the bounded question-answering graph and provides an offline artifact review replay.
- Browser access
Browser UI CopilotKit
HTTP / AG-UI to the coordinator
- MCP tool access
MCP client → MCP Gateway LiteLLM Proxy
MCP Server FastMCP ·
ask_nisexposes the coordinator
AI Coordinator
Plans and delegates work, selects model routes, then combines results into an answer or artifact.
Deep Agents / LangGraphUses these services as the task requires:
- Retrieval index
- Retrieval MCP searches and reads prepared sources using BGE and Qdrant. Ingestion prepares them outside conversations.
- Model backends
- Ollama and Fireworks execute selected model calls.
- Evaluation
- Separate routes to Harbor Hub and Hugging Face return feedback for Synthetic Owner scoring and Real Owner approval.
- Conversation state
- PostgreSQL retains checkpoints so the conversation can continue.
Explore the full system diagram
Explore the full system architecture diagram
Select a component to explore its role.
View all component details
- MCP clients: Ask NIS questions and continue topic conversations through the exposed MCP tools, for example from Codex or OpenClaw.
- MCP Gateway: Provide MCP tool access through LiteLLM Proxy. The gateway exposes the tool entrance; the AI Coordinator retains task planning and model selection.
- MCP Server: FastMCP exposes the coordinator operation as ask_nis. It is the embedded interface into the same AI Coordinator, rather than another agent loop.
- AI Coordinator: Plan work, select model routes, delegate bounded tasks and synthesize results using Deep Agents/LangGraph.
- Browser UI: Ask questions and inspect answers through CopilotKit and HTTP/AG-UI, reaching the same coordinator operation as MCP clients.
- Question answering: Retrieve evidence, check grounding and return a concise plain answer. Evidence identity stays internal; source titles or headings can be named in prose when requested. Ordinary answers do not add citation cards or internal IDs.
- Artifact evaluation: The AI Coordinator selects prepared judges, collects feedback and supports two revision loops: Synthetic Owner scoring followed by Real Owner approval. Harbor Hub and Hugging Face are separate evaluation routes.
- Specialist subagents: Execute focused delegated tasks and return results to the AI Coordinator for synthesis.
- Ingestion: Prepare · verify. Activate release
- Retrieval MCP: Own query encoding through shared BGE, search the matching Qdrant index and read prepared source text. Return evidence through the MCP boundary.
- Evaluation services: Run prepared Harbor Hub tasks and access Hugging Face judge models through separate coordinator routes. Feedback returns to the coordinator; there is no Harbor-to-Hugging Face dependency.
- Model backends: Execute selected model calls through configured backends such as Ollama and Fireworks AI. DeepSeek is a model family that can be served through a backend.
- Conversation state: PostgreSQL retains LangGraph checkpoints and conversation content so the coordinator can continue a conversation.
Read the published architecture for component contracts and boundaries.
Models and orchestration
Assign the work. Select the inference.
In the target design, orchestration delegates bounded tasks and synthesizes their results. In the public snapshot, the model selector routes inference within the question-answering graph. Ollama and Fireworks are backends; DeepSeek is a model family. The selector first considers capability and quality requirements, then configured cost and latency assumptions. If no candidate meets the requirements, it can rank the remaining viable models instead, so those requirements are not guaranteed.
- Request
- The AI Coordinator receives the task, context and constraints.
- Select inference
- The design separates simple, general, reasoning and specialized model routes.
- Combine results
- The same coordinator gathers results, synthesizes and checks the response.
Explore the full model routing and orchestration diagram
Select a component to explore its role.
View all component details
- Inference request: Task · context · constraints
- AI Coordinator: Plan and route. Select model capabilities
- Simple route: Use a lightweight model when the task can be handled without advanced reasoning. Provider selection remains explicit configuration, not a hardcoded company-quality ranking.
- General: Broad task coverage
- Reasoning: Deeper reasoning route
- Specialized route: A task-specific model can serve a specialized call, for example through Fireworks AI. The chosen model capability and serving backend are separate configuration choices.
- AI Coordinator: This is the completion phase of the same coordinator. Model routing chooses where a call executes; orchestration plans dependencies, delegates tasks and combines their results.
- Response: Checked result
Ingestion
Preparation stays outside the conversation.
Selected knowledge can include project documents, design conversations, saved context, and owned source code. Preserve substantive text and its source version; keep summaries as linked derived documents.
Conversion, preparation, embedding, and import/verification are four operator-triggered jobs. They preserve originals and prepare matching text and index releases. Backups precede preparation; verification precedes activation and answer checks. Additions include stored knowledge, and rebuilds use the complete desired set.
- Prepare
- Selected sources pass through conversion and deterministic preparation.
- Encode and import
- Shared BGE generates embeddings; import verifies a complete bundle into a fresh index.
- Activate
- The operator selects matching prepared documents and index as the retrieval release.
Explore the full ingestion diagram
Select a component to explore its role.
View all component details
- Selected sources: Select original versions and preserve their bytes, dates and provenance. For a rebuild, include the complete desired source set. For additions, prepare a delta and assemble it with the retained complete corpus before import.
- Conversion: The conversion entrypoint accepts PDF, DOCX, HTML, PPTX, XLSX, Markdown and TXT. Markdown/TXT use direct readers; other formats use Docling. Originals are read only.
- Preparation: Normalize deterministically, preserve headings and substantive meaning, and record coverage, document hashes and stable chunk IDs. Chunk offsets and individual chunk hashes are not persisted. No LLM summaries or rewriting.
- Embedding: Encode document chunks with shared BGE. Preserve configuration and vectors. Bound batch load so interactive queries retain capacity. For additions, assemble the embedded delta with the retained bundle before import.
- Import + verify: Import the complete bundle into a fresh Qdrant collection, independently verify identities and counts, after taking database backups. Import alone does not activate the running service.
- Activate Retrieval: A literal-pin installation requires an explicit release overlay and recreation of only Retrieval. Pointer-following installations use current or a GCS pointer. The dated deployment record owns the selected activation mode. Database backups and matching prepared documents are recorded before the update.
Decisions & tradeoffs
Architecture decisions and tradeoffs.
Read the choices behind the system, examine the checks, or run the public source.