{"uid":"cap_N-ADgU-WNwnRx_OMCqz8m","slug":"agentrag-hybrid-retrieval-augmented-query-41555b44","name":"AgentRAG – Hybrid Retrieval-Augmented Query","description":"Agent-native retrieval over x402 — send a query and, optionally, source URLs to index: get back ranked, cited chunks. Hybrid retrieval by default (dense vectors + BM25 keyword search, fused and reranked) beats vector-only search on exact tokens (error codes, API symbols, config keys). Pay-on-success: a query that matches nothing settles nothing. Ask $0.008; prepay $1 = 10,000 credits, spent at 80% of the per-op price (20% off). Docs: https://agentx402.ai","url":"https://api.agentx402.ai/v1/rag/ask","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"properties":{}},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.008","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.008/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.008","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.008","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_XRLIZSQQkrx94n6HITaA3","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.008","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Accepts a natural language query and optional source URLs, performs hybrid dense-vector + BM25 retrieval with reranking, and returns ranked, cited text chunks relevant to the query","exampleAgentPrompt":"Search my indexed docs at https://docs.myapp.com for how to resolve error code E_CONN_TIMEOUT — I need the most relevant cited chunks using hybrid retrieval.","exampleUseCases":[{"title":"API error code lookup in docs","prompt":"Search through the indexed API documentation at https://docs.stripe.com for everything about error code 'card_declined' — give me the top ranked cited passages explaining causes and remediation."},{"title":"Config key discovery for DevOps","prompt":"Look up the config key 'MAX_RETRY_INTERVAL' in my indexed infrastructure docs at https://internal.docs.myco.com and return the most relevant chunks explaining what it controls and its valid values."},{"title":"Research synthesis from multiple sources","prompt":"Query these three URLs — https://openai.com/docs, https://anthropic.com/docs, https://cohere.com/docs — for how each handles context window limits, and give me ranked cited excerpts from each."}],"resultDescription":"A list of ranked, cited text chunks matching the query, each accompanied by its source URL and relevance score, produced via fused dense-vector and BM25 retrieval with reranking. If no chunks match the query, no payment is settled.","failureModes":["Query matches no indexed content — returns empty results and no payment is charged","Provided source URL is unreachable or returns non-indexable content — indexing skipped for that source","Malformed query or missing required 'input' field — returns 400 validation error","Rate limit or credit exhaustion — returns 402 payment required or credit insufficient error","Source document too large or unsupported format — partial indexing or rejection"],"whenToPreferThis":"Prefer AgentRAG when you need precise retrieval over exact tokens such as error codes, API symbols, or configuration keys, where vector-only search underperforms. It is ideal when you have specific source URLs to ground retrieval and want cited, ranked chunks rather than a generated answer. Choose it over general web search when you want retrieval scoped to known documents, and over a pure vector store when keyword matching matters alongside semantic similarity.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:37:16.005Z","isFirstParty":false}