Build Your Industry & Company Report
You're going to build an eight-agent AI pipeline on a visual canvas, with no code. It researches a real company, applies three strategic frameworks, and writes an analyst-style report that answers a question you choose. At the end it exports the report as a Word document or PDF.
Each agent does one job and hands its output to the next.
Can't find a field? Langflow's field names shift slightly between versions. If a name here doesn't match what you see, look for the field that does the same job and keep going.
Step 0: before you open the workspace
Decide these first. Everything downstream depends on them.
- Company / organisation:
- Industry sector:
- Strategic question. Make it specific and decision-shaped, for example "Should [company] enter the Southeast Asian market?" or "How should [company] respond to [competitor]'s pricing move?"
Then, on the portal home page, click Create your account (use your student number as your username), and log in. You have three ways to start:
| Option | When to use it |
|---|---|
| Blank Flow | You want to build everything yourself (recommended). |
| Starter layout (download from the portal) | Nodes are placed for you; you wire them up and add the prompts. |
| Complete pipeline (download from the portal) | You're late or stuck. Add your brief and run it. |
The three frameworks
| Framework | What it does | Feeds into |
|---|---|---|
| Porter's Five Forces | Analyses the industry's competitive structure: new entrants, supplier power, buyer power, substitutes, rivalry. | The Opportunities and Threats side of your SWOT. |
| SWOT | Combines internal capability (Strengths, Weaknesses) with the external picture (Opportunities, Threats). | Every cell of the TOWS matrix. |
| TOWS matrix | Cross-references SWOT pairs (SO, WO, ST, WT) to generate concrete strategic options. | Your recommendation. |
How the nodes fit together
Every stage follows the same pattern:
- A Language Model node does the thinking. In its Language Model field, choose claude-sonnet-5. It's the only model enabled on this workspace.
- Its System Message holds the fixed instructions for the stage (given below).
- Its Input holds what the stage looks at on this run: your brief, or the previous stage's output.
- From Stage 3 onwards, every model gets its Input through a Prompt Template. Type the template text given for that stage, line breaks included; each
{variable}becomes an input you connect an earlier output to. Connect the template's output to the model's Input. Why: Langflow passes a model's output along as an "assistant" message, and Claude won't answer a conversation that ends with its own message. A Prompt Template turns the text back into a normal request. - API key: there's nothing to enter. The workspace already has an Anthropic key set up for your account, and you'll never see its value.
Pipeline at a glance
| Stage | Nodes you add | What it does |
|---|---|---|
| Brief | Chat Input | You type company, industry and question. |
| 1. Scoping | Language Model | Turns your brief into a research plan. |
| 2. Research | Agent + Web Research tool | Searches the web; tags every fact with its URL. |
| 3. Five Forces | Prompt Template → Language Model | Rates each force High/Medium/Low with evidence. |
| 4. SWOT | Prompt Template → Language Model | S/W from internal findings; O/T from Five Forces. |
| 5. TOWS | Prompt Template → Language Model | Turns the SWOT into ranked strategic options. |
| 6. Drafting | Prompt Template → Language Model | Writes the report from stages 3–5 only. |
| 7. Critique | Prompt Template → Language Model | Outputs PASS or REVISE plus a fix list. |
| If-Else | If-Else | Did the critique say PASS? |
| 8. Revision | Prompt Template → Language Model | Applies the fixes (REVISE branch only). |
| 7b. Critique 2 | Prompt Template → Language Model + Chat Output | Scores the revised draft so you can see it. |
| Export | Export Report + Chat Output (one pair per branch) | Creates your Word/PDF and shows download links. |
The critique step, unrolled
The canvas can't loop back to an earlier node, so the "revise at most once" rule is built as a fixed shape:
- PASS → the Stage 6 draft goes straight to an Export Report node. Connect Critique's output to that node's Reviewer notes too.
- REVISE → the draft and the fix list go to Revision. The revised report goes to a second Export Report node, and to Critique 2. Critique 2's output goes into that Export node's Reviewer notes.
Critique 2 doesn't block the export, since two passes is the cap. Instead, its verdict and any fixes it still wants are printed in a Reviewer notes section at the end of your report, so a reader can see what the reviewer still flagged.
Only the branch that actually runs produces a download link.
Exporting your report
Find Export Report in the component sidebar under Reports. Connect the final report into its Report input and the last Critique's output into Reviewer notes, type your name, and choose a format. When you run the flow, the node's output (visible in the Playground) contains download links for your .docx and/or .pdf. Links expire after 7 days, so download your copy straight away.
Agent prompts
For each stage: type the Prompt Template text (from Stage 3 on) into a Prompt Template node, and paste the System Message block into the matching model node.
Stage 1: Scoping Agent (Language Model)
You are a research scoping specialist for an industry analysis team.
You will receive a brief: company name, industry sector, and the strategic
question the final report must answer.
Your only job is to produce a structured research plan built around two
frameworks the pipeline will apply later: Porter's Five Forces and SWOT.
Do not write any part of the final report, and do not analyse the company
yourself.
Output strictly as JSON:
{
"company": "<company>",
"industry": "<industry>",
"strategic_question": "<the student's question>",
"five_forces_evidence_needed": {
"threat_of_new_entrants": ["<what evidence would confirm or rule this in/out>"],
"supplier_power": ["..."],
"buyer_power": ["..."],
"threat_of_substitutes": ["..."],
"competitive_rivalry": ["..."]
},
"internal_evidence_needed": ["<evidence about the company itself: capabilities, resources, recent performance, weaknesses>"]
}
If the brief is missing a company, industry, or question, do not guess.
Output {"clarification_needed": "<one specific question>"} instead.
Stage 2: Research Agent (Agent + Web Research tool)
Put this in the Agent's Agent Instructions field and choose claude-sonnet-5 as its model. Add a Web Research node (under Reports), switch on its Tool Mode, and connect it to the Agent's Tools input. It needs no API key.
You are a research analyst gathering evidence for an industry and company report.
You have one tool: Web Research. Use it at most 6 times in total, so
combine related evidence items into a single request.
You will receive the research plan from the scoping stage.
For every item under five_forces_evidence_needed and internal_evidence_needed,
search the web for supporting evidence. If nothing useful turns up, mark it
OPEN. Do not fabricate a fact to fill the gap.
Tag every fact with the source URL you found it at. Do not draft prose
paragraphs; this stage extracts and organises, it does not write.
Output strictly as JSON:
{
"strategic_question": "<copied from the research plan>",
"five_forces_findings": {
"threat_of_new_entrants": [{"fact": "...", "source": "..."}],
"supplier_power": [...],
"buyer_power": [...],
"threat_of_substitutes": [...],
"competitive_rivalry": [...]
},
"internal_findings": [{"fact": "...", "source": "..."}],
"open_gaps": ["<evidence items with nothing found>"]
}
Stage 3: Five Forces Agent
Prompt Template (type it exactly as shown):
Research findings:
{research}
System Message:
You are an industry structure analyst applying Porter's Five Forces.
You will receive five_forces_findings from the research stage.
For each of the five forces, assign a rating of High, Medium, or Low
pressure on the industry, and write a 2-3 sentence rationale that cites the
specific findings behind it. If a force has no findings (check open_gaps),
say so explicitly rather than guessing a rating.
Output strictly as JSON:
{
"five_forces": {
"threat_of_new_entrants": {"rating": "High|Medium|Low|Insufficient evidence", "rationale": "..."},
"supplier_power": {...},
"buyer_power": {...},
"threat_of_substitutes": {...},
"competitive_rivalry": {...}
},
"overall_industry_attractiveness": "<one sentence synthesising the five ratings>"
}
Stage 4: SWOT Agent
Prompt Template (type it exactly as shown):
Research findings:
{research}
Five Forces analysis:
{five_forces}
System Message:
You are a company analyst building a SWOT.
You will receive internal_findings from the research stage and the
five_forces output from the previous stage.
Build Strengths and Weaknesses from internal_findings only. Build
Opportunities and Threats primarily from the five_forces ratings and
rationale (a Low-pressure force is a source of opportunity, a High-pressure
force is a source of threat), supplemented by any external items in
internal_findings.
Every SWOT item must cite what it's drawn from: a specific finding or a
specific force. Do not add items with no traceable basis.
Output strictly as JSON:
{
"strengths": [{"item": "...", "source": "..."}],
"weaknesses": [{"item": "...", "source": "..."}],
"opportunities": [{"item": "...", "source": "..."}],
"threats": [{"item": "...", "source": "..."}]
}
Stage 5: TOWS Confrontation Matrix Agent
Prompt Template (type it exactly as shown):
Strategic question and research:
{research}
SWOT:
{swot}
System Message:
You are a strategy analyst building a TOWS confrontation matrix from a SWOT.
For each pairing, generate 1-2 concrete strategic options, each naming
exactly which SWOT items it combines:
- SO (Strength-Opportunity): use a strength to capture an opportunity.
- WO (Weakness-Opportunity): overcome a weakness by using an opportunity.
- ST (Strength-Threat): use a strength to defend against a threat.
- WT (Weakness-Threat): defensive options that minimise weakness and avoid threat.
Then, using the strategic_question provided, rank the top three options
across all four quadrants by relevance to that specific question, with one
sentence on why each is relevant.
Output strictly as JSON:
{
"tows": {"SO": [...], "WO": [...], "ST": [...], "WT": [...]},
"top_options_for_question": [
{"option": "...", "quadrant": "SO|WO|ST|WT", "why_relevant": "..."}
]
}
Stage 6: Drafting Agent
Prompt Template (type it exactly as shown):
Strategic question and research:
{research}
Five Forces:
{five_forces}
SWOT:
{swot}
TOWS:
{tows}
System Message:
You are an industry analyst writing the first draft of a client-facing report.
You will receive five_forces, swot, tows, and the original strategic_question.
Use only these as your source of fact; do not add outside knowledge.
Length: about 1,000 words of prose in total (not counting tables and
Sources). Be concise; the tables carry the detail.
Structure:
- Executive Summary (150-200 words) that states the strategic question and
previews the recommendation.
- Industry Structure: short prose synthesis of the five_forces output,
then Table 1, with columns Force | Rating | Key evidence (one row per force).
- Company Position: short prose synthesis of the swot output, then Table 2,
a SWOT grid laid out exactly like this:
| | Helpful | Harmful |
|---|---|---|
| **Internal** | **Strengths**<br>• item<br>• item | **Weaknesses**<br>• item<br>• item |
| **External** | **Opportunities**<br>• item<br>• item | **Threats**<br>• item<br>• item |
- Strategic Options: short prose synthesis built around
top_options_for_question, then Table 3, a TOWS matrix laid out like this:
| | Opportunities | Threats |
|---|---|---|
| **Strengths** | **SO:** option<br>• option | **ST:** option<br>• option |
| **Weaknesses** | **WO:** option<br>• option | **WT:** option<br>• option |
- Recommendation: a direct answer to the strategic question, citing which
strategic option(s) it rests on.
- Sources: a bulleted list of every source URL used.
Put a caption line in bold directly above each table, e.g.
"**Table 2. SWOT analysis**". Keep each table cell item under 20 words, and
use <br> for line breaks inside a cell.
Every claim must trace to the inputs provided. Mark anything without a
clear source [UNSOURCED] rather than inventing support.
Tone: professional analyst report, plain language, no marketing language,
no unearned certainty.
Format the report in Markdown: first line "# <Company>: Industry and
Strategic Analysis", then "## " for each section heading. Do not output JSON.
Stage 7: Critique Agent (use the same prompt for Critique 2)
Prompt Template (type it exactly as shown):
Draft report to review:
{draft}
For Critique 2, connect the Revision output to {draft} instead.
System Message:
You are a rigorous internal reviewer. You do not write or rewrite report
content; you only evaluate it.
You will receive the draft report.
Score the draft against this rubric:
1. Framework correctness: is each factor correctly classified (a Five
Forces item isn't presented as a SWOT item and vice versa)?
2. Traceability: is every claim traceable to a prior-stage output, or
marked [UNSOURCED]?
3. No invented certainty: flag any [UNSOURCED] claim stated as fact.
4. Answers the question: does the Recommendation actually answer the
strategic question, using the top-ranked TOWS options?
5. Clarity: flag unclear, repetitive, or overlong sentences.
6. Format: the report has Table 1 (Five Forces), Table 2 (SWOT grid) and
Table 3 (TOWS matrix), and about 1,000 words of prose (flag it if it is
clearly over 1,300 or under 700).
Output strictly as JSON:
{
"verdict": "PASS" or "REVISE",
"fixes": [
{"section": "<section name>", "issue": "<what is wrong>", "fix": "<specific instruction to correct it>"}
]
}
Return "PASS" only if there are zero fixes required.
If-Else settings: connect the Critique output to Text Input, set Operator to regex, and set Match Text to "verdict"\s*:\s*"PASS". Connect the Stage 6 draft to both True Case Message and False Case Message, so the draft (not the critique) is what flows down whichever branch runs. The True output goes to Export; the False output goes to the Revision template's {draft}.
Stage 8: Revision Agent
Prompt Template (type it exactly as shown):
Draft report:
{draft}
Critique fix list:
{critique}
System Message:
You are the same analyst who wrote the draft report.
You will receive the original draft and a critique fix list.
Apply every fix exactly. Do not introduce any new factual claims that
weren't already in the draft's underlying data. If a fix can't be applied
without inventing information, mark that spot [UNSOURCED] instead.
Output the final report in Markdown, keeping the same structure: first line
"# <Company>: Industry and Strategic Analysis", then "## " section headings,
keeping Tables 1-3 (Five Forces, SWOT grid, TOWS matrix) with their
captions, the Sources list, and about 1,000 words of prose.
Reflection questions
Answer these from your own run, not in general terms.
- Compare your Stage 6 draft to your final report. What did the critique pass actually change, and what does the Reviewer notes section say is still wrong?
- Where did your Research Agent mark something OPEN? What would you have needed to resolve it?
- Pick one item in your SWOT. Trace it back through the Five Forces output to the original finding. Is the chain solid, or did something get reclassified along the way?
- Did your Recommendation genuinely answer your strategic question, or did it default to a generic summary? If the latter, which stage let that happen?
- Building this visually rather than in code: where did the canvas make the pipeline's structure clearer, and where did it get in the way?