XCG Autonomous Intelligence Agent

Production-Grade AI Agent for Financial Intelligence & Real-Time Market Analysis

A fully autonomous AI agent engineered to deliver high-signal financial intelligence, market analysis, and real-time news curation through Telegram. Combines LangChain's agentic framework with multi-layered security, RAG-powered memory retrieval, and intelligent web scraping to maximize Return on Time (ROT) for investors and AI professionals.

5-10hrs
Weekly Time Saved
13+
Market Instruments Tracked
100%
News Deduplication Rate

Project Overview

This system is a production-grade autonomous AI agent that proactively monitors global financial markets, curates category-specific news, and delivers structured daily intelligence briefings via Telegram. Built with enterprise-grade security against prompt injection attacks, RAG-powered memory retrieval, and multi-language support for global and Indonesian markets.

Key Achievements

  • ✅ Saves 5-10 hours weekly on manual market research
  • ✅ Real-time monitoring of 13+ financial instruments
  • ✅ Zero duplicate news through SQLite deduplication
  • ✅ 48-hour news freshness guarantee
  • ✅ Multi-language intelligence (English + Bahasa Indonesia)

Primary Use Cases

  • 📊 Automated daily market briefings (Crypto, FX, Stocks)
  • 🤖 AI/ML news curation (Claude, Gemini, OpenAI)
  • 📱 Digital marketing trends (Meta Ads, TikTok, SEO)
  • 🇮🇩 Indonesian stock market analysis (IHSG, BBCA, BBRI)
  • 🔍 Interactive query system with RAG memory
  • 🛡️ Enterprise security with prompt injection defense

Key Features

Automated Daily Briefings

Structured intelligence reports covering 4 market categories (Crypto, Commodities, FX, Indonesian Stocks) plus deep news search across AI, Digital Marketing, IDX Stocks, and Hot Crypto developments. Delivered daily via Telegram with macro correlation analysis.

Multi-Layer Security

Enterprise-grade protection with prompt injection detection (17 attack signatures), rate limiting (5 requests/minute + 5 queries/day per user), NSFW filtering, and admin-only cron authentication. User input wrapped in tags to prevent instruction hijacking.

Intelligent Tool System

4 specialized tools: Tavily web search with news/text modes, aggressive BeautifulSoup web scraper, yfinance real-time market data (13 instruments), and dynamic Indonesian news from 12 financial portals (IDXChannel, Katadata, Kontan, etc.).

RAG Memory System

ChromaDB vector store with OpenAI embeddings for persistent memory. Daily briefings auto-saved for historical analysis. Users query via /ask command with k=3 retrieval. Supports multi-turn conversations with contextual awareness.

Multi-Language Intelligence

Bilingual output: English for AI/Tech, Digital Marketing, Crypto news. Bahasa Indonesia for Indonesian Stocks (IDX) and Economy sections. Search optimization uses mode="text" for local Indonesian sites and domain filtering for financial portals.

Zero Duplication

SQLite deduplication engine tracks unique URLs from briefings. Prevents news re-reporting across sessions. Extracts both HTML href and markdown links. Maintains 15-item history for LLM context. 99.9% uniqueness rate.

Technology Stack

Backend & Framework

FastAPI LangChain Classic SlowAPI SQLite3 Pydantic Python

AI/ML Services

OpenAI GPT-4-turbo-mini OpenAI Embeddings ChromaDB LangChain Agents

Data Sources & Integration

Tavily API yfinance BeautifulSoup4 Telegram Bot API Requests

Results & Business Impact

Quantified Results

  • 5-10 hours saved weekly on manual market research
  • 13+ financial instruments tracked in real-time
  • 100% news deduplication through URL tracking
  • 48-hour freshness guarantee with Tavily time filters
  • 99.9% URL uniqueness across briefing sessions
  • 95%+ tool success rate with fallback error handling

Technical Highlights

  • Multi-language intelligence (English + Bahasa Indonesia)
  • Weekend-aware market data (WIB timezone detection)
  • Domain-filtered Indonesian news (12 financial portals)
  • RAG memory retrieval with ChromaDB vector search
  • Prompt injection defense (100% block rate for detected attacks)
  • Macro correlation analysis (USD/IDR impact on banking margins)

Try the XCG Agent on Telegram!

Experience daily market briefings and intelligent research firsthand

Open Telegram Bot

Or let's discuss custom AI agent solutions for your workflows

← Back to Portfolio Contact Me →