You are helping me build the following AI agent workflow. ## Goal Webpage Scraper and RAG Knowledge Base: Ingests web pages via URL into a vector store and answers questions using retrieved context with reranking. ## Specification - What it does: You can instantly turn any webpage into a searchable knowledge base by sending its URL via webhook. This agent scrapes the content with Firecrawl, stores it in Pinecone, and answers your questions using high-quality context retrieved and reranked by Cohere before generating responses. - Trigger: Triggered by an event (Event ยท on webhook URL submission) - Autonomy: Fully hands-off - Expected setup effort: a few focused days - Tools/services involved: - Firecrawl: Scraping web pages into markdown - OpenAI Embeddings: Generating vector embeddings from content - Pinecone Vector Store: Storing and retrieving vector embeddings - OpenRouter Chat Model: Answering questions via RAG agent - Cohere Reranker: Improving retrieval quality for answers ## Known pitfalls, handle each one explicitly in your implementation 1. OpenRouter model selection affects response quality and cost, so monitor usage metrics and switch models based on performance needs. ## Reference implementation https://n8n.io/workflows/13964 (workflow template) Fetch and inspect this before building. If it matches my stack, adapt it; if not, rebuild the pattern with my tools. ## Process requirements 1. Before building: ask me which of the listed tools I actually use and what my platform is (n8n / Make / code / other). Do not assume. 2. Adapt the pattern to my answers; do not force the reference stack. 3. Address every pitfall above; tell me how you handled each. 4. Provide a test plan I can run before letting this touch real data. 5. Ask before any step that sends messages, modifies data, or spends money. Source: https://usecasesforagents.com/use-case/webpage-scraper-and-rag-knowledge-base/ via usecasesforagents.com