Projects / Live Company Check
Live Company Check In progress
An AI agent that checks a company's records, customer reviews and news while a reviewer watches live, answers its questions, pauses it and sends feedback. Charts are computed from the data, never written by the model.
- FastAPI
- LangGraph
- Temporal
- PostgreSQL
- Next.js
Demo
Overview
Live Company Check is an AI due-diligence assistant that works alongside a human reviewer. You give it a company name; it finds the company, reads its records, customer reviews and news, and produces findings and a report, asking you questions when it needs to and drawing charts as it goes.
It is built to be steered while it works. Every step streams live, you can pause it mid-sentence and resume it, answer its questions, and send feedback that redoes only the work it affects. A refresh or a crash replays the same view, because the view is a fold over an event log.
The demo below is a real run on the project's seeded data. I asked for "Brightline Logistics", which matches three lookalike companies, answered the agent's question, paused and resumed it, and read the result.
What it does
- Live streaming. Every step is an event in Postgres, streamed over server-sent events. A refresh or reconnect replays the same view.
- Questions. Single choice (for an ambiguous name), multiple choice and free text, each answered exactly once even on a double click.
- Pause and resume. Pause stops the agent within about a second, even mid-sentence, and resume continues the text. It survives restarts of the API, the worker and Temporal, and pauses of hours.
- Feedback rounds. Send feedback at any time. It is queued while the agent is busy, only the work it affects is redone, and repeats are no-ops.
- Charts the agent chooses. One general chart tool (line, bar or area; a week to a year; up to four series) plus a news timeline and tables. The agent decides what to draw, and code computes the numbers.
- Evidence-linked findings. Each finding is graded and cites the ids of the reviews or news items behind it.
- Failure handling. Retries with backoff, a fallback model, plain-language error messages with a Retry button, and graceful worker shutdown.
- Cost visible. Tokens, calls and estimated cost are shown for each check (this run: about 15.9k tokens, four calls, roughly $0.007).
- Tested. Workflow tests run on Temporal's time-skipping server: double clicks, pause and resume, an eight-hour pause, retries, queued feedback and continue-as-new.
Screenshots




How it works
- You start a check in the Next.js UI. The FastAPI server records the command (with an id, so a double click runs once) and signals Temporal.
- A Temporal workflow owns the check's state and schedules the agent as an activity.
- The LangGraph agent finds the company, asking you if the name is ambiguous, gathers data through tools, analyses it and writes the report, streaming from Gemini.
- Every step becomes an event in Postgres, and the agent checkpoints after each node so it can resume exactly where it stopped.
- Postgres notifies the API, which streams the events to the UI. Pause cancels the activity and saves the text, and resume continues from the checkpoint.
Install and try it
You need Docker and a Google AI Studio API key. Everything else (Postgres, Temporal, the API, the worker and the UI) runs in containers.
- Get the code and add your key
Then set
GOOGLE_API_KEYin.env.git clone https://github.com/BriskAM/live-company-check.git cd live-company-check cp .env.example .env - Start the stack
Open
http://localhost:3000. The API is on port 8000 and the Temporal UI on 8233. The seeded companies, including the lookalike names, load automatically.docker compose --profile app up -d --build - Try it
Type this into the box (three lookalike companies, so the agent will ask which one), or try
Pinecrest Home Services.Brightline Logistics - Check it is healthy
It should return
{"database":"ok","temporal":"ok"}.curl localhost:8000/health
Notes
- It is not hosted, because it needs a Temporal server, a worker and Postgres, so this page shows a recording of the local Docker stack.
- It runs on seeded demo data (nine companies with reviews and news), not live external sources, and has no sign-in, so it is a local development setup rather than a public service.
- The agent called Gemini on a free-tier key; the app's own estimate for this run was about $0.007.