Expose agentic retrieval via MCP and HTTP service endpoints - #2416
Conversation
Greptile SummaryAdds server-configured agentic retrieval to the existing query service.
|
| Filename | Overview |
|---|---|
| nemo_retriever/src/nemo_retriever/query/workflow.py | Adds explicit embedding-key resolution, but the same credential remains assigned to the independent LLM client. |
| nemo_retriever/src/nemo_retriever/service/vectordb_app.py | Adds dedicated agentic worker capacity whose semaphore follows the underlying future lifetime rather than the HTTP request lifetime. |
| nemo_retriever/src/nemo_retriever/service/routers/ingest.py | Adds agentic routing and timeout selection, while the gateway continues buffering raw query bodies before downstream validation. |
| nemo_retriever/src/nemo_retriever/service/query_schema.py | Adds agentic-only shape, format, non-empty-string, and 4096-character validation. |
| nemo_retriever/src/nemo_retriever/service/agentic_query.py | Adds the service adapter that constructs workflow requests and maps document-level rankings into the existing hits envelope. |
| nemo_retriever/src/nemo_retriever/service/mcp_server.py | Adds a configuration-gated agentic MCP tool with a dedicated long request timeout. |
| nemo_retriever/helm/templates/deployment-vectordb.yaml | Wires agentic CLI settings and secret-backed API-key environment configuration into the VectorDB deployment. |
Sequence Diagram
sequenceDiagram
participant Client
participant Gateway
participant VectorDB
participant Pool as Agentic worker pool
participant Embed as Embedding endpoint
participant LLM as LLM endpoint
Client->>Gateway: "POST /v1/query {agentic: true}"
Gateway->>VectorDB: Forward query body
VectorDB->>Pool: Admit and submit ReAct workflow
Pool->>Embed: Embed retrieval queries
Pool->>LLM: ReAct and selection calls
Pool-->>VectorDB: Ranked document IDs
VectorDB-->>Gateway: Standard hits envelope
Gateway-->>Client: Query response
Reviews (7): Last reviewed commit: "review fix" | Re-trigger Greptile
311108e to
9d8201f
Compare
Description
Add server-owned AgenticConfig and thin service adapters so existing agentic_query_documents() can run in service mode without changing AgenticRetriever internals.
Expose POST /v1/agentic/query on the VectorDB app (execution) and gateway proxy; add config-gated MCP tool agentic_query alongside unchanged plain query.
Wire Helm/retriever-service.yaml so gateway gets enablement + timeout from ConfigMap, and the VectorDB deployment gets --agentic* CLI flags + API key when a remote LLM URL is set.
Service mode requires remote invoke_url + llm_model (and remote embed); request body stays {query, top_k} with server-owned ReAct knobs. Hits remain slim (rank / doc_id / result_source).
Checklist