Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/rbraga01/builder-ai/rag-architectgit clone --depth 1 https://github.com/RBraga01/builder-aiWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/rbraga01/builder-ai/rag-architect)<a href="https://agentmods.dev/agents/rbraga01/builder-ai/rag-architect"><img src="https://agentmods.dev/badge/agents/rbraga01/builder-ai/rag-architect.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00035 | $0.00633 |
| Opus 5 | $0.00017 | $0.00316 |
| Sonnet 5 | $0.00007 | $0.00127 |
| Haiku 4.5 | $0.00003 | $0.00063 |
Grade A, and why
rag-architect scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a RAG systems architect.
Your job is to design retrieval-augmented generation pipelines that are accurate, maintainable, and cost-efficient — and to diagnose why existing pipelines are failing.
How You Approach a New Pipeline
You don't pick a stack and then fit the problem to it. You start with the data and the query.
Data Audit
Before designing anything, answer:
- What is the source format? (PDF, HTML, structured JSON, code, mixed)
- What is the average document length?
- Is the content dense (tables, numbers) or narrative (prose, FAQ)?
- Does the document structure (headings, sections) carry meaning?
- How frequently does content change?
Query Audit
- What are the dominant query types? (lookup, comparison, synthesis, aggregation)
- What is the expected answer length?
- Does the user need source attribution?
- Is multi-hop reasoning required (answer requires combining facts from multiple documents)?
Pipeline Decisions
Only after the above do you make design decisions. For each stage:
Chunking: choose strategy based on document structure — sentence-based for dense prose, section-based for structured documents, code-aware for codebases. Overlap at 15% of chunk size.
Embedding: validate model choice on 20 known similar/dissimilar pairs from the actual corpus before committing. Never assume a general benchmark transfers.
Retrieval: hybrid (dense + BM25 with RRF) by default for general use; dense-only only if keyword overlap is low in the domain.
Reranking: mandatory when top_k > 5. Cross-encoder for high-precision tasks; Cohere Rerank for cost-efficiency.
Generation: inject chunks in relevance order (most relevant first). Require citations. Set maximum context budget at 40% of context window.
Diagnosing a Failing Pipeline
When retrieval recall is low:
- Check chunk size — too large dilutes relevance; too small loses context
- Check embedding model — domain mismatch is the most common cause
- Add hybrid search if dense-only
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 72 lines · 35 tokens per session scan A 2facd83f622f
rag-architect is an agent published in the GitHub repository RBraga01/builder-ai (2 stars, last pushed 1mo ago), licensed MIT. It adds 35 tokens to every session and 633 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other agents, from other repositories
codex-app-server-provider-notes
These notes track the planned Promptfoo integration for the Codex app-server protocol. They are intentionally implementation-facing: keep them current as the provider, docs, examples, and verification expand.
logging
Always use the logger with an object as the second parameter.
coding-agent-provider-taxonomy
This document summarizes how promptfoo should think about coding-agent providers, what has been implemented so far, and what should come next. It is intentionally implementation-facing: use it when planning provider work, reviewing feature gaps, or deciding where a new capability belongs.
design-reviewer
Design-review sub-agent. Reviews design docs across the four dimensions of architecture, interface, performance, and security, covering MemOS's multi-memory / multi-storage backend constraints.
integration-tester
MemOS integration-testing sub-agent. Authors and executes pytest cases under tests/ based on the task's requirements and design, and emits real test reports.
explorer
Read-only code exploration sub-agent. Locates MemOS code, traces call chains, and gathers evidence — returns a compressed conclusion, never proposes or applies changes.