Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

ADR 26004: Implementation of Agentic RAG for Autonomous Research

Title

Standardizing Autonomous Knowledge Retrieval via an Agentic RAG “Pre-Flight” Workflow for aider.

Status

Prposed

Date

2026-01-13

Context

Our repository is a massive knowledge base (KB) exceeding 1 million tokens, containing critical workflows and software stack instructions. Converting it to the ctandard RAG (Retrieval-Augmented Generation) in aider or Open WebUI faces several industrial-grade constraints:

Decision

We will implement an Agentic RAG “Pre-Flight” Wrapper (the aidx pattern). This transforms the current passive retrieval into an active, autonomous research loop.

  1. Architecture: A two-stage “Research-Apply” pipeline.

  2. The Researcher (Stage 1): Before launching aider, a lightweight agent (e.g., ministral) queries a dedicated local vector database (Qdrant or PostgreSQL with pgvector).

  3. The Code Agent (Stage 2): aider is launched automatically with the retrieved snippets or file paths injected into its initial context via the --message-file or --read parameters.

  4. Namespace Partitioning: The RAG will use separate namespaces (collections) for “Global_Workflows” and “Project_Specific” data to ensure high-precision retrieval.

Consequences

Positive

Negative

Alternatives

References

Participants

  1. Vadim Rudakov

  2. Senior AI Architect (Consultant)