Script icon
Log icon
Loop icon
ChatCompletion icon
Ollama icon
Request icon
Set icon
Schedule icon

Watch SEC 8-K Filings and Summarize Them with a Local Ollama Model

Watch SEC EDGAR 8-K filings for your tickers, summarize each with a local Ollama LLM, and flag figures the model invented.

Categories
AIBusiness

Watch SEC EDGAR for new Form 8-K filings from the tickers you list, have a local Ollama model summarize each one and rate its sentiment for shareholders, and check the answers against the filing. No API keys or paid services.

How it works

  1. fetch_new_filings (Python) finds 8-Ks newer than each company's KV marker, or from the last lookback_days on a first run, and downloads each one with its Exhibit 99.
  2. summarize_each (Loop, one filing at a time) calls ChatCompletion with the Ollama provider. A JSON schema limits the answer to summary and sentiment.
  3. check_and_report flags answers with an invalid sentiment or with figures not in the filing.
  4. save_markers stores the newest processed filing per company in the KV store.

What you get

  • report (Markdown) and results (JSON): items, sentiment, summary, status and link per filing.
  • Item numbers come from EDGAR, not the LLM. Summaries are triage: read the linked filing.
  • A call timing out after 2 minutes is reported as summary_unavailable and its marker advances; if Ollama is down, the run fails and markers stay.

Who it's for

Investors, analysts and finance or compliance teams who follow a set of companies.

Why orchestrate this with Kestra

  • KV markers keep state between runs, so a late or skipped run loses nothing.
  • Timeouts, schedules and logs are built in; another LLM provider is a provider block change.

Prerequisites

  • Ollama with qwen2.5:1.5b pulled. The default endpoint works on Docker Desktop; on Linux, give Kestra extra_hosts: host.docker.internal:host-gateway (or use the host IP) and set OLLAMA_HOST=0.0.0.0 for Ollama.
  • Docker for the Python tasks. SEC requires a name and email: the KV pair in Quick start.

Secrets

None needed: the SEC identity is a KV pair, not a secret, because it is not a credential; it is sent in plain text with every request.

Quick start

  1. Namespaces > company.team > KV Store > Create: key SEC_EDGAR_USER_AGENT, type STRING, value your name and email (Jane Doe jane.doe@example.com). Save.
  2. Execute the flow, then check the report output.
  3. Enable the every_30_minutes trigger.

How to extend

  • Send results to Slack, for example only for items 1.05 or 5.02.
  • Watch 8-K/A or 10-Q by changing the form filter in fetch_new_filings.
  • Keep the summary and sentiment names unless you retest (see the jsonSchema comment).

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.