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.
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.
Step by step
- Configure n8n webhooks or Telegram bot nodes to accept incoming user queries and route them to the AI agent workflow.
- Set up environment variables for Gemini API keys, Tavily API credentials, and Supabase connection strings in the n8n instance.
- Define the vector store schema in Supabase to store embeddings with metadata tags for Indonesian stock tickers and document types.
Where the LLM does the work
- Prompt engineering is required to instruct the LLM on how to synthesize conflicting data from real-time API metrics versus web search results.
- The system prompt must define specific formatting rules for financial summaries to ensure consistency across different user queries.
- LLM judgment is needed to determine whether a query requires deep document context retrieval or just simple ticker lookups.
Watch out for
Web search results may contain outdated financial news so the LLM prompt should prioritize timestamps and recent sources for accuracy.
Vector embeddings of financial documents can drift in relevance if not chunked properly so use metadata filtering by date and sector.
Tools that fit
Gemini API LLM LLM processing and web search grounding
Tavily Search API Web search capabilities
Supabase Vector Store Service Storing and retrieving document embeddings
The agent brief
Everything your agent needs, including the gotchas. Copy it and go.
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
Frequently asked questions
Can I use a different Automation Platform than n8n?
Yes. n8n is only the example automation platform in this recipe. The same flow works with Home Assistant. Swap the automation platform connection and keep the rest of the setup as written.
Want this running in your business?
This is what I do. I design and build AI agents like this one, and keep them running. If you want it set up for your team instead of doing it yourself, get in touch.
Who it's for
Built for data analysts who want the pull-and-summarize grind automated.
Works just as well for personal use, no business context needed.