Build an AI Sales Research Multi-Agent System With LangGraph, Treg and FastAPI: Architecture, Checks and Build vs Buy

An AI sales research multi-agent system takes a company name, sends separate agents to search the web, gather company facts and find key people, then writes a cited brief. LangGraph runs the workflow, a tool gateway such as Treg supplies data, and FastAPI exposes it. Treat the output as leads to verify, not facts.

What the tutorial builds

The source is a 48 minute video by the channel DSwithBappy, published 26 November 2026. Disclosure: its description links to Treg with a referral code and says viewers who sign up and top up $10 get $5 in extra credits. Treg's terms say referrers can be rewarded too. Koryo has no arrangement with the channel or with Treg, and the link is not repeated here.

The project takes a company name and returns a sales brief: overview, products and news, key people, a sales hypothesis, limitations and sources. The video lays out four worker agents and a supervisor.

Web research searches the web, finds the official site and extracts content. Company intelligence gathers industry, product and news data. People research finds executives using the company's domain. Report writer turns the collected evidence into a structured brief with citations. The supervisor decides which runs next.

A FastAPI backend exposes a research endpoint and a health check, and serves a plain HTML page. The model in the demo is an OpenAI one; the presenter says others would do.

How the architecture works

Three parts do the work, and each can be swapped.

LangGraph: state, nodes and routing

LangGraph's documentation calls it a low-level orchestration framework for long-running, stateful agents, in which workflows are graphs of shared state, nodes and edges that can mix deterministic steps with model-driven ones. The tutorial's state holds company, website, evidence, completed steps, warnings, report and next step. Each worker adds evidence and returns to the supervisor.

Treg: one key for many tools

Treg describes itself as "OpenRouter for agent tools": one token, prepaid balance, calls billed at the provider's rate with no markup. Its site listed 4,200+ endpoints from 141 providers on 29 November 2026; the video said 3,700+. Its terms call the hosted service early access with no uptime commitment. The site says Apache 2.0, while the license file adds terms that restrict offering it to third parties as a hosted service without permission. You must also follow each underlying data provider's terms.

Guardrails in code

The tutorial validates the company name, rejects unsafe or internal URLs, and strips fields such as email, phone and passwords before evidence reaches the model. It also sets an optional spending cap. These are ordinary code, which is right: a check the model cannot talk its way around is worth more than an instruction in a prompt.

Does it need several agents?

Often not. LangChain's own multi-agent guide says not every complex task needs it, because a single agent with the right tools and prompt can often do as well. The order in this tutorial is nearly fixed: search, company, people, write. A plain sequence would produce the same brief with fewer model calls and fewer places to fail.

Splitting earns its cost when steps can run in parallel, when each needs a different model or permission, or when you want to test one step alone. The most useful split here is between collecting and writing. The writer should see only the evidence that passed the filters, so anything in the brief can be traced to a stored item.

Judge the output, not the demo

The video is candid enough to show what goes wrong.

Wrong company. Given the channel's own name, the system returned a brief about DS Smith, a packaging supplier. A fluent report about the wrong business is worse than an error. Fix it by requiring a domain as input, or by making a person confirm the matched site before the other agents run.

Undated people. The Nvidia run left out the executive the presenter expected to see, who put it down to a database gap. Nvidia had announced earlier that month that its chief executive had resigned and an interim was in place, so the omission may have been correct. Nothing in the brief, as shown, let anyone tell. It should date each person and role, and say when sources disagree.

Before anyone uses it, run twenty companies you know well and score each claim: right, wrong, outdated or unsupported. Then open every citation. Check that the page loads, names this company and says what the brief says. The sales hypothesis is the model's guess and should be labelled as one.

Hostile pages. OWASP lists indirect prompt injection, where a web page carries instructions to the model, among the main risks for these systems, and says it is unclear whether any prevention is foolproof. Keep the research agent unable to send email or change records. The cost shown in the demo, a tiny fraction of a cent, was the presenter's figure for Treg calls on one run; model calls are billed separately.

People data has rules

Looking up executives is processing personal data in many countries, even when the source is public. Under the GDPR, Article 14 covers data obtained from somewhere other than the person. It expects you to tell them, including where the data came from, within a reasonable period and at most one month, or at the first communication if you use it to contact them, with limited exceptions.

In practice: collect a name, role and source link, not everything available. Keep it only while there is a live reason. Record the source beside the field. Honor objections and carry them into your suppression list. Check what each provider's terms let you store, and what the gateway keeps: Treg's privacy policy says it may keep a copy of a provider's answer and that a team admin can turn that off.

Research permission is not contact permission. Whether you may email the person is a separate question. This is general information, not legal advice.

Build or buy

Build if you have someone to maintain it, your research needs sources that products lack, or the project is for learning. Budget for upkeep: providers change, prompts drift, and somebody must rerun the test set.

Buy if the brief is standard and the team is small. Compare on how sources are shown, how company matches are confirmed, and what is stored.

Either way, decide where the brief lands. A report in a browser tab gets read once. It belongs on the lead record with its date and sources, and a person should decide what happens next. In Koryo, agents connect over MCP as operators with their own permissions and daily caps, every action is attributed, and outbound messages pass a sending gate. Agents can be limited to suggesting, which suits research. Koryo also has Company Scout, which prospects from job boards and company registries.

Frequently asked questions

What is Treg and who runs it?
Treg is a gateway that gives AI agents one token for many third-party tools and data sources, billed per call from a prepaid balance. Its terms name Superdesign Dev Pty Ltd as operator and describe the hosted service as early access with no uptime commitment. The source is public, under Apache 2.0 plus extra terms.
Do you need LangGraph to build a sales research agent?
No. The job is a short sequence of searches followed by a written summary, and plain code or a single agent with tools can do it. LangGraph helps when you need shared state, branching, retries or a pause for human review. Its documentation says it does not prescribe any particular agent architecture.
How accurate are AI sales research reports?
It varies, and fluency hides errors. Common failures are matching the wrong company, listing people who have left and stating a guess as fact. Test with companies you know, score each claim and open the citations. A report that says it found nothing is more useful than one that fills the gap.
Is it legal to collect executives' names with an AI agent?
Often it can be, with conditions. In the EU and UK, names and work roles are personal data, so you need a lawful basis, a purpose and usually a notice to the person. Provider terms may restrict storage or reuse. Rules differ by country, so get advice for your own case.