You are helping me build the following AI agent workflow. ## Goal Indonesian Stock Market Research Agent: Ask about IDX stocks via chat to get real-time metrics, web insights, or document-based analysis using Sectors App and Gemini. ## Specification - What it does: Get instant insights on Indonesian stocks via chat by retrieving real-time metrics from the Sectors App or searching web data with Gemini and Tavily. You can also upload your own documents to be analyzed alongside market trends using the integrated vector store. - Trigger: Run manually (Manual ยท on demand via chat) - Autonomy: Fully hands-off - Expected setup effort: about an afternoon - Tools/services involved: - n8n: Workflow orchestration and agent logic - Gemini API: LLM processing and web search grounding - Tavily Search: Web search capabilities - Sectors App API: Real-time IDX financial data retrieval - Supabase Vector Store: Storing and retrieving document embeddings ## Known pitfalls, handle each one explicitly in your implementation 1. Web search results may contain outdated financial news so the LLM prompt should prioritize timestamps and recent sources for accuracy. 2. Vector embeddings of financial documents can drift in relevance if not chunked properly so use metadata filtering by date and sector. ## Reference implementation https://n8n.io/workflows/9551 (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/indonesian-stock-market-research-agent/ via usecasesforagents.com