How We Used AI to Build a Stock Research Site

KB Cafe is a build-in-public shop: we use AI to build real sites, then write about how it went. One of the biggest so far is StockTools.AI, a free stock-research site built on public SEC filings. This post is about the building, not a feature tour: what AI did, what kept it on track, and the two design choices we would reuse on any AI product.

What it is, briefly

StockTools turns raw SEC EDGAR filings into clean datasets: Form 4 insider trades, 13F institutional holdings, 8-K filings, S-1 prospectuses, and DEF 14A proxy statements, plus congressional trades from STOCK Act disclosures. On top of that data sits an AI research layer. The rest of this post is about how those two parts got built.

The stack, and how much of it AI wrote

It is a Next.js app on Vercel, backed by Postgres. AI wrote large amounts of the plumbing that turns filings into tables, designed and iterated the interface (the repo holds a whole gallery of AI-generated design explorations), and powers the research features themselves. The title of this post is honest: AI did a lot of the work.

Written decisions kept the agent coherent

The build was documentation-driven: an architecture doc, a strategy doc, and a numbered log of design decisions. An AI coding agent starts every session without memory of the last one, so on a project this size the written record is what stops it from undoing last week's choices. Each decision lives where the agent reads it first. It is the same lesson as writing real code with AI: give the agent a source of truth instead of re-explaining the project every session.

AI that cites its sources

The research features run on the Anthropic Claude API and follow one rule: every conclusion traces back to the exact filing it came from. The house motto is “conclusion left, evidence right.” The Research Brief gives a plain-English overview of a ticker built only from filings and market data, with no price predictions. The Research Committee has a bull, a bear, a risk manager, and a portfolio manager argue a stock from its filings, then stops without a buy or sell call. That is the use of AI we like best: it stress-tests what you already think instead of telling you what to think.

Generate once, cache by the source

One engineering choice worth copying: each shared AI write-up is generated once and cached against the hash of its source filing. Thousands of readers share one generation, so the cost does not grow with traffic, and everyone reading about the same filing sees the same answer. It is a small example of wiring AI into a product rather than bolting on a chatbot.

The honest part

Money is where an overconfident AI does real damage, so the guardrails are part of the design. The data comes from primary filings with the methodology shown, the AI cites what it read and refuses to predict prices or give buy signals, and the footer says plainly that these are educational tools, not financial advice, and that AI can make mistakes. If you build with AI in any field where people act on the output, start with those guardrails.