Architecture · Pipeline · Design decisions

How ASX Intel works

ASX Intel is a two-agent AI pipeline built by a network engineer to demonstrate practical LLM application development. Every design decision was made deliberately — here's what's running under the hood.

Two agents. One verdict.

Most AI tools use a single prompt to do everything. ASX Intel separates analysis from validation — Agent 1 forms a view, Agent 2 stress-tests it with live web search before anything reaches you. The same pattern a senior analyst uses to pressure-test a junior's work before it goes to a client.

yfinance Live financials NewsAPI Recent headlines ASX ticker User input Agent 1 — Financial Analyst Reads data · assigns signals · triages concerns with confidence scoring Structured concern objects Gemini Live web search Google grounding Agent 2 — Devil's Advocate Stress-tests conclusions · adjusts signals · compliance scan Enriched JSON output Signals · verdict · investor fit · risks · disclaimer FastAPI + Jinja2 Renders analysis as HTML · Azure hosted

Separation of concerns

Each agent has a single focused role, a defined input contract, and a defined output contract. Neither agent does the other's job.

Agent 1
Financial Analyst
Receives structured financial data from yfinance and recent headlines from NewsAPI. Interprets the numbers in plain English, assigns colour-coded signals per metric, and triages any concerns — flagging confidence level and what to search for.
Input: financial data + news · No web access
Agent 2
Devil's Advocate
Receives Agent 1's full output including flagged concerns. Runs a batched Gemini web search to verify each concern against real-world context — ASX announcements, sector news, macro conditions. Adjusts signals where evidence warrants and runs a compliance check before output is returned.
Input: Agent 1 JSON + Gemini search findings

Tools and why they were chosen

Component Technology Rationale
LLM — both agents Anthropic Claude Haiku Fast, cost-effective, and deterministic at temperature=0. Signal consistency requires the same input to always produce the same output.
Web search Gemini Flash + Google grounding Batched search — one API call covers all flagged concerns. Date-anchored queries prevent stale cached results.
Financial data yfinance Free, ASX-compatible with .AX suffix tickers. Price data is live (15-20 min delay). Fundamentals reflect most recent filing.
News NewsAPI Free tier sufficient for development and demo use. Known limitation: search relevance is broad. Replacement planned.
Orchestration Native Python CrewAI was evaluated and rejected — it makes 4-6 hidden API calls per execution, consistently hitting rate limits. Native Python gives full control over every API call.
Backend FastAPI + Jinja2 Async-native foundation built for parallelisation. Jinja2 templates give full control over HTML output.
Deployment Azure App Service B1 Australia East region. GitHub Actions CI/CD — every push to main deploys automatically.
Language Python 3.11 Industry standard for AI/LLM tooling. Broad library ecosystem, strong Azure support.

What this tool can and can't do

Architectural honesty matters. These are the current constraints — each one has a planned resolution.

Analysis time is 40–55 seconds. Two sequential Claude calls plus Gemini web search. Milestone 8 introduces async parallelisation and prompt optimisation to reduce this meaningfully.
Fundamentals data lags by up to 12 months. yfinance returns the most recent annual or semi-annual filing. The tool discloses this in the disclaimer on every analysis.
News relevance is broad. NewsAPI free tier search is not company-specific. A dedicated ASX announcements feed is planned as a replacement.
Single instance hosting. Azure B1 runs one server process. Concurrent users queue. Four uvicorn workers partially mitigate this — proper async pipeline is the full fix.
General financial information only. This tool does not constitute financial advice. Always verify against ASX announcements and consult a licensed financial adviser before making investment decisions.

The roadmap

Upcoming
RAG integration
PDF ingestion of ASX annual reports into ChromaDB. Anomaly deep dives cite actual report sections rather than generic disclaimers.
Planned
Better data sources
Replace NewsAPI with a dedicated ASX announcements feed. Alpha Vantage integration to cross-verify balance sheet data.
Future
ASX200 screener
Scan the full ASX200 automatically. Surface the top undervalued stocks by configurable criteria.
See it in action
Enter any ASX ticker and get a plain-English verdict in under a minute.
Analyse a stock →