What This Example Shows
- Turn a single paragraph describing your startup into a polished, application-ready market research report
- Use
AutoSwarmBuilder to spin up the exact analyst team you need — Market Sizer, Competitor Mapper, ICP Definer, Moat Analyst, and GTM Strategist — without writing a single agent prompt
- Layer
AdvancedResearch on top to attach real citations to your TAM/SAM/SOM and competitor claims
- Enforce a Pydantic schema so the output is structured every time — no glue-code hell
- Render the final result as a Markdown report you can paste straight into your YC, Techstars, or AngelPad application
- Total cost: roughly the price of a sandwich. Total time: less than a coffee break.
You can try the entire pipeline below on a free starter API key. Grab one in 60 seconds via the Quickstart — no credit card, no demo call.
Why This Matters
A serious founder spends 30-40 hours on the market section of a YC application. You read crunchbase, you grep Pitchbook, you skim 50 competitor websites, you argue with your co-founder about whether to claim a $4B or $40B TAM, and you end up with a Notion doc that nobody but you understands. That work is necessary, but most of it is mechanical: pull market sizes, name competitors, find their weaknesses, define the ICP, identify a moat, pick a wedge. This pipeline does the mechanical 80% in under ten minutes — cited, structured, and in your house format. You still rewrite the voice and inject the founder insight that only you have. But the research is done before your second espresso.
What You’ll Produce
A single Markdown report with this table of contents — the same scaffolding YC partners and pre-seed VCs expect to see:
# Market Research Report — <Your Startup>
1. Executive Summary
- One-paragraph thesis, market opportunity, and recommended wedge
2. Market Size
- TAM (with sources)
- SAM (with sources)
- SOM (with sources and the assumption set)
3. Competitive Landscape
- Top 5 competitors
- For each: positioning, pricing, traction, and weakness vectors you can attack
4. Ideal Customer Profile
- Firmographics, role, pain, and a named persona
- "Where do you find 100 of them this month?"
5. Moat Analysis
- Data, distribution, regulatory, network-effect, and switching-cost angles
- The single moat you should bet the company on
6. Recommended Go-to-Market
- Motion (PLG, sales-led, community-led, partner-led)
- First 10 customers playbook
- 90-day GTM plan
That’s a deliverable a partner can actually read. Not a Notion mess.
The Architecture
┌──────────────────────────┐
│ Your one-paragraph │
│ startup IDEA │
└────────────┬─────────────┘
│
▼
┌──────────────────────────┐
│ AutoSwarmBuilder │
│ (composes the team) │
└────────────┬─────────────┘
│
┌────────────┬───────────┼───────────┬────────────┐
▼ ▼ ▼ ▼ ▼
┌────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌──────────┐
│ Market │ │Competitor│ │ ICP │ │ Moat │ │ GTM │
│ Sizer │ │ Mapper │ │Definer │ │ Analyst │ │Strategist│
└───┬────┘ └─────┬────┘ └────┬───┘ └────┬────┘ └────┬─────┘
└─────────────┴───────────┼──────────┴───────────┘
│
▼
┌──────────────────────────┐
│ AdvancedResearch │
│ (cites the claims) │
└────────────┬─────────────┘
│
▼
┌──────────────────────────┐
│ Final Synthesizer │
│ (Pydantic-enforced JSON) │
└────────────┬─────────────┘
│
▼
┌──────────────────────────┐
│ Polished Markdown │
│ Application Report │
└──────────────────────────┘
Step 1: Setup
pip install requests python-dotenv pydantic jinja2
export SWARMS_API_KEY="your-api-key-here"
import json
import os
import requests
from dotenv import load_dotenv
load_dotenv()
API_KEY = os.getenv("SWARMS_API_KEY")
BASE_URL = "https://api.swarms.world"
headers = {
"x-api-key": API_KEY,
"Content-Type": "application/json",
}
Step 2: Define the Research Schema
You want the output to be structured, every run, no matter which analyst team the builder composes. Define a Pydantic model that locks the shape down — TAM/SAM/SOM, competitors, ICP, moats, and GTM. This is what your renderer and the downstream Markdown template will consume.
from typing import List, Optional
from pydantic import BaseModel, Field
class MarketSize(BaseModel):
value_usd: str = Field(..., description="e.g. '$12.4B'")
year: int = Field(..., description="Year the figure refers to")
methodology: str = Field(..., description="How the number was derived (top-down, bottom-up, analogous)")
source_urls: List[str] = Field(default_factory=list)
class Competitor(BaseModel):
name: str
positioning: str
pricing_model: str
estimated_traction: str = Field(..., description="ARR, users, funding stage, or other proxy")
weakness_vectors: List[str] = Field(..., description="Specific angles a startup can attack")
source_urls: List[str] = Field(default_factory=list)
class Persona(BaseModel):
name: str
title: str
company_size: str
daily_pain: str
where_to_find_them: str = Field(..., description="Channels, communities, conferences")
class ICP(BaseModel):
firmographics: str
primary_buyer_role: str
top_three_pains: List[str]
persona: Persona
class Moat(BaseModel):
category: str = Field(..., description="data | distribution | network | regulatory | switching-cost | brand")
thesis: str
strength_today: str = Field(..., description="weak | emerging | strong")
how_to_build_it: str
class GoToMarket(BaseModel):
motion: str = Field(..., description="PLG | sales-led | community-led | partner-led | hybrid")
first_ten_customers_playbook: str
ninety_day_plan: List[str]
primary_channel: str
why_this_motion: str
class MarketResearchReport(BaseModel):
startup_idea: str
executive_summary: str
tam: MarketSize
sam: MarketSize
som: MarketSize
competitors: List[Competitor] = Field(..., min_length=5, max_length=5)
icp: ICP
moats: List[Moat]
recommended_moat: str
gtm: GoToMarket
That schema is the contract. Every section of the final report maps to a field above.
Step 3: Generate the Analyst Team with Auto Swarm Builder
Now hand the idea to AutoSwarmBuilder. You don’t write the agents — you write the deliverable. The builder spins up the right team (typically a coordinator plus the five analysts you actually need) and executes the run.
IDEA = """
We're building a vertical AI platform for independent insurance agencies.
Our software ingests a small agency's book of business and quoting history,
then automatically markets renewals to the carriers most likely to win, drafts
client-ready quote comparisons, and surfaces upsell opportunities — all in
one pane. Target customer: 5-50 person property & casualty agencies in the
US Sunbelt who currently use AMS360 or HawkSoft.
"""
builder_task = f"""
You are producing a YC-application-grade market research report for the
following startup idea.
STARTUP IDEA:
{IDEA}
Required deliverable: a single structured report covering
1. Executive summary (max 150 words, founder voice)
2. Market size: TAM, SAM, SOM — each with year, methodology, and source URLs
3. Top 5 competitors with positioning, pricing, traction, and concrete
weakness vectors a small startup can attack
4. Ideal Customer Profile (firmographics + buyer role + top 3 pains) plus a
named persona with title, company size, daily pain, and where to find them
5. Moat analysis across data, distribution, network, regulatory, switching
cost, and brand — pick the single moat to bet the company on
6. Recommended go-to-market motion (PLG, sales-led, community-led, partner
-led, or hybrid) with a first-10-customers playbook and a 90-day plan
Constraints:
- Be specific. No "the market is growing." Give numbers, names, dates.
- Every market size number must include the methodology used to derive it.
- Competitor weaknesses must be attackable by a 2-person founding team.
- The ICP must be specific enough that we could build a list of 100 of them
in a week.
- Output as a single JSON object matching the MarketResearchReport schema.
"""
payload = {
"name": "YC App Market Research Swarm",
"description": "Composes a 5-analyst team to produce a structured market research report.",
"max_loops": 2,
"model_name": "gpt-4.1",
"task": builder_task,
}
response = requests.post(
f"{BASE_URL}/v1/swarm/completions",
headers=headers,
json={**payload, "swarm_type": "AutoSwarmBuilder"},
timeout=900,
)
response.raise_for_status()
builder_result = response.json()
print(json.dumps(builder_result, indent=2)[:2000])
max_loops=2 lets the swarm critique and tighten its own draft once before returning. For a YC-grade artifact that single extra pass is worth the few extra cents — it’s the difference between “a draft” and “something a partner would read.”
Step 4: Add a Citation Layer with Advanced Research
The builder gives you the analyst team and the structured first draft. To make the market sizing and competitor claims trustworthy enough to put in front of investors, run a second pass with AdvancedResearch — its director-worker architecture runs external searches and attaches real source URLs to the specific factual claims that need them.
citation_task = f"""
For the following startup idea, produce a citation pack covering:
1. TAM, SAM, and SOM for the relevant market — each with at least 3 source
URLs (analyst reports, government statistics, industry associations,
credible trade publications). Include the dollar figure each source
supports.
2. The top 5 competitors. For each: 1-2 source URLs that substantiate the
positioning, pricing, traction, or weakness claims.
STARTUP IDEA:
{IDEA}
If a claim cannot be sourced, mark it [unsourced] rather than fabricating a
URL. Return a single JSON object with two keys: market_sources (array) and
competitor_sources (array of {{name, urls}}).
"""
citation_payload = {
"name": "YC App Citation Pack",
"description": "Attaches source URLs to the market sizing and competitor claims.",
"task": citation_task,
}
citation_response = requests.post(
f"{BASE_URL}/v1/swarm/completions",
headers=headers,
json={**citation_payload, "swarm_type": "AdvancedResearch"},
timeout=900,
)
citation_response.raise_for_status()
citations = citation_response.json()
print(json.dumps(citations, indent=2)[:2000])
The [unsourced] instruction is load-bearing. It forces hallucinations to be visible — you’d rather see “[unsourced]” in your draft than a fake URL you only catch when a YC partner clicks it.
Step 5: Compile the Final Markdown
Merge the structured report from Step 3 with the citation pack from Step 4 and render the whole thing through a small Jinja template into a polished application-ready Markdown document.
from jinja2 import Template
REPORT_TEMPLATE = Template("""# Market Research Report — {{ report.startup_idea[:80] }}...
## 1. Executive Summary
{{ report.executive_summary }}
## 2. Market Size
**TAM ({{ report.tam.year }}):** {{ report.tam.value_usd }}
*Methodology:* {{ report.tam.methodology }}
*Sources:*
{% for url in report.tam.source_urls %}- {{ url }}
{% endfor %}
**SAM ({{ report.sam.year }}):** {{ report.sam.value_usd }}
*Methodology:* {{ report.sam.methodology }}
*Sources:*
{% for url in report.sam.source_urls %}- {{ url }}
{% endfor %}
**SOM ({{ report.som.year }}):** {{ report.som.value_usd }}
*Methodology:* {{ report.som.methodology }}
*Sources:*
{% for url in report.som.source_urls %}- {{ url }}
{% endfor %}
## 3. Competitive Landscape
{% for c in report.competitors %}### {{ loop.index }}. {{ c.name }}
- **Positioning:** {{ c.positioning }}
- **Pricing:** {{ c.pricing_model }}
- **Traction:** {{ c.estimated_traction }}
- **Weakness vectors:**
{% for w in c.weakness_vectors %} - {{ w }}
{% endfor %}
- **Sources:** {{ c.source_urls | join(', ') }}
{% endfor %}
## 4. Ideal Customer Profile
- **Firmographics:** {{ report.icp.firmographics }}
- **Primary buyer:** {{ report.icp.primary_buyer_role }}
- **Top pains:**
{% for p in report.icp.top_three_pains %} - {{ p }}
{% endfor %}
### Named Persona — {{ report.icp.persona.name }}
- **Title:** {{ report.icp.persona.title }}
- **Company size:** {{ report.icp.persona.company_size }}
- **Daily pain:** {{ report.icp.persona.daily_pain }}
- **Where to find them:** {{ report.icp.persona.where_to_find_them }}
## 5. Moat Analysis
{% for m in report.moats %}- **{{ m.category | capitalize }}** ({{ m.strength_today }}): {{ m.thesis }}
*How to build:* {{ m.how_to_build_it }}
{% endfor %}
**Recommended moat to bet on:** {{ report.recommended_moat }}
## 6. Recommended Go-to-Market
- **Motion:** {{ report.gtm.motion }}
- **Why this motion:** {{ report.gtm.why_this_motion }}
- **Primary channel:** {{ report.gtm.primary_channel }}
### First 10 Customers Playbook
{{ report.gtm.first_ten_customers_playbook }}
### 90-Day Plan
{% for step in report.gtm.ninety_day_plan %}{{ loop.index }}. {{ step }}
{% endfor %}
""")
def extract_structured(builder_result: dict) -> dict:
"""Pull the JSON payload out of the AutoSwarmBuilder response."""
outputs = builder_result.get("outputs") or builder_result.get("output") or {}
if isinstance(outputs, list):
outputs = outputs[-1]
if isinstance(outputs, dict):
content = outputs.get("content") or outputs.get("final_output") or outputs
else:
content = outputs
if isinstance(content, str):
start, end = content.find("{"), content.rfind("}")
if start != -1 and end != -1:
return json.loads(content[start : end + 1])
return content
structured = extract_structured(builder_result)
report = MarketResearchReport(**structured)
markdown = REPORT_TEMPLATE.render(report=report)
with open("yc_market_research.md", "w") as f:
f.write(markdown)
print(markdown[:1800])
The first ~30 lines of the rendered output look like this — paste-ready into your application:
# Market Research Report — We're building a vertical AI platform for independent...
## 1. Executive Summary
US independent P&C agencies (5-50 employees) operate on margins compressed by
carrier consolidation and a 90s-era AMS stack. They quote, market renewals,
and chase upsells manually across AMS360 or HawkSoft, Outlook, and carrier
portals. A vertical AI co-pilot that automates renewal marketing, generates
client-ready quote comparisons, and surfaces upsells can win a wedge into a
$1.4B SAM by replacing 6-10 hours of producer time per agency per week. The
right initial motion is community-led — Big I and PIA chapters — followed by
a partner-led expansion through AMS resellers.
## 2. Market Size
**TAM (2025):** $14.8B
*Methodology:* Top-down: US P&C agency software spend (~3% of $493B premium
written) per IBISWorld and III data, cross-checked against Vertafore /
Applied Systems disclosed ARR.
*Sources:*
- https://www.iii.org/publications/insurance-handbook
- https://www.ibisworld.com/united-states/...
- https://www.spglobal.com/marketintelligence/...
**SAM (2025):** $1.4B
*Methodology:* Bottom-up: ~38,000 US independent P&C agencies in the 5-50
employee band x $36K average annual software spend, adjusted for the Sunbelt
geographic focus and AMS360/HawkSoft compatibility.
That’s a real report. That’s something you paste into the YC application’s market section, rewrite three paragraphs in your founder voice, and ship.
Try It With Your Idea
Replace the IDEA variable with one paragraph describing your startup and re-run the pipeline. The schema, the analyst team, the citation layer, and the template all stay the same — only the input string changes.
IDEA = """
Your one-paragraph startup idea here. Be specific: what you build, who buys
it, and what they use today instead. The more concrete the input, the more
concrete the report. Two to four sentences is the sweet spot.
"""
# Re-run Steps 3-5 above. Total wall clock: ~5-10 minutes.
If you’re staring at the YC deadline tonight, run it three times with three slightly different framings of your idea and pick the report with the strongest wedge. That entire exercise still costs less than five dollars.
Real Cost
Concrete numbers from a real run:
| Approach | Time | Cost |
|---|
| Founder hand-rolling the YC market section | 30-40 hours | $0 cash, weeks of opportunity cost |
| Market research consulting engagement | 3-6 weeks | $5,000 - $15,000 |
| Boutique strategy deck from an ex-MBB freelancer | 1-2 weeks | $3,000 - $8,000 |
| This pipeline (AutoSwarmBuilder + AdvancedResearch) | ~5-10 minutes wall clock | ~$0.50 - $1.50 per full report |
You can run it five times for a different framing of the same idea, pick the strongest version, and still be out less than the cost of dinner. The consulting engagement costs as much as your seed round wire fee.
This is research scaffolding, not investment advice — and no LLM has been to a Big I chapter meeting. Treat the output as a strong first draft. Replace numbers you can’t substantiate, sharpen the persona with one real customer interview, and rewrite the executive summary in your founder voice before submission.
Next Steps