Headline Summary

Designing and building a multi-layer agentic AI system for trading signal generation — transforming unstructured data (news, filings, earnings, macro indicators) into structured buy/sell signals through specialized LLM agents with explicit reasoning, memory, and guardrails. Perception, Cognition, and Action layers implemented; Memory layer in active development.


What I'm Building

A modular agent architecture that decomposes financial decision-making into specialized layers — each responsible for a distinct cognitive function. Rather than a monolithic model that maps raw text to signals, the system uses explicit agent decomposition with structured state passing, tool use, and a novel Thesis→Antithesis→Synthesis reasoning pattern.

The core insight: financial information is heterogeneous (news vs. filings vs. price action), arrives at different timescales, and often contradicts itself. Agentic decomposition provides a better inductive bias for this than end-to-end prediction.

Tech stack: Python · LangGraph · Qdrant · PostgreSQL/pgvector · Pydantic · OpenAI / Anthropic / Gemini APIs · Jinja2


🖼️ System Architecture

https://sh1319.github.io/diagrams/agentic_architecture_diagram.html


Architecture: 4-Layer Design

Layer 1: Perception — "What's happening now?"

Specialized agents parse raw data sources into structured analyses:

Agent Input Output
Price OHLCV data + chart images Technical analysis (RSI, MACD, Bollinger)
News Financial news, social media Sentiment analysis with relevance reranking
Filings SEC filings, earnings calls Key financial factor extraction via RAG
Macro Economic indicators Macro-to-sector-to-company chain of thought

Each agent outputs Pydantic-typed structured objects — not free-form text — ensuring type safety and downstream composability.

Layer 2: Memory — "Has this happened before?" (in development)

Retrieval layer that grounds current analysis in historical context: