Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mavera.io/llms.txt

Use this file to discover all available pages before exploring further.

Mavera Surfaces Used

SurfaceRole
Mave Agent (POST /mave/chat)Deep research — competitive landscape, regulations, buyer profiles, GTM strategies
Mave Threads (POST /mave/chat with thread_id)Multi-turn follow-up to drill into specific findings
Chat + response_formatStructure raw research into a standardized market entry brief
Mave Agent has access to web search, knowledge bases, and real-time news. Every claim is sourced, so you can verify before acting.

What Value Does Mavera Add?

ValueHow
InsuranceResearch is sourced and verifiable — no hallucinated market data. Multi-turn threads let you challenge claims before committing.
Opening new doorsA full market entry brief in hours instead of weeks. Run multiple markets in parallel to compare opportunities.
Saving timeOne API call kicks off research that would take an analyst days. Structured output feeds directly into planning documents.

When to Use This

  • You’re evaluating whether to enter a new market, vertical, or geography.
  • You need a structured brief covering competition, regulation, buyers, and GTM — not a generic summary.
  • You want to compare multiple markets side-by-side using the same research framework.
  • You’re preparing a board deck or investment memo and need sourced market intelligence.

What You Need

RequirementDetails
Mavera API keyStarts with mvra_live_. Get one at Developer Settings.
Workspace IDFrom your dashboard URL (ws_...).
Market definitionThe market, vertical, or geography you’re evaluating (e.g. “B2B cybersecurity compliance for mid-market SaaS”).
Credits~100–300 total. See Credits Estimate.
Python 3.8+ or Node.js 18+requests / openai for Python; native fetch for Node.
MAVERA_API_KEY=mvra_live_your_key_here
MAVERA_WORKSPACE_ID=ws_your_workspace_id
TARGET_MARKET=B2B cybersecurity compliance for mid-market SaaS

The Research Framework

Every market entry brief covers five pillars. Mave researches each in a dedicated turn within the same thread, building context as it goes.

The Flow

1

Define the market

Set your target market, geography, and any constraints (budget, timeline, team size). This becomes the context for all research turns.
2

Research competitive landscape (Turn 1)

Ask Mave to identify key players, market share estimates, positioning, pricing models, and recent funding or M&A activity.
3

Research regulatory environment (Turn 2)

Within the same thread, ask Mave about compliance requirements, licensing, data privacy regulations, and any pending legislation.
4

Research buyer personas (Turn 3)

Ask Mave to profile the typical buyer — title, budget authority, pain points, decision criteria, and buying process.
5

Research go-to-market strategies (Turn 4)

Ask Mave to recommend GTM approaches based on the competitive and regulatory context it already has — channels, partnerships, pricing strategy, launch sequence.
6

Research risks and barriers (Turn 5)

Ask Mave to identify the top risks: switching costs, incumbent lock-in, regulatory barriers, and timing risks.
7

Structure the brief

Use Chat with response_format to transform the raw research into a standardized JSON brief you can feed into slide decks, memos, or planning tools.

Code: Full Market Entry Research Pipeline

Setup

import os
import json
import time
import requests
from openai import OpenAI

MAVERA_API_KEY = os.environ["MAVERA_API_KEY"]
WORKSPACE_ID = os.environ["MAVERA_WORKSPACE_ID"]
TARGET_MARKET = os.environ.get(
    "TARGET_MARKET",
    "B2B cybersecurity compliance for mid-market SaaS",
)

BASE = "https://app.mavera.io/api/v1"
HEADERS = {
    "Authorization": f"Bearer {MAVERA_API_KEY}",
    "Content-Type": "application/json",
}

mavera = OpenAI(
    api_key=MAVERA_API_KEY,
    base_url=BASE,
)

Stage 1 — Mave Research Thread (5 Turns)

Each turn builds on prior context. The thread ID links them so Mave remembers previous findings.
RESEARCH_PROMPTS = [
    {
        "pillar": "competitive_landscape",
        "prompt": (
            f"We're considering entering the {TARGET_MARKET} space. "
            "Research the competitive landscape:\n"
            "- Who are the top 5-10 players? (name, estimated market share, funding stage)\n"
            "- What positioning does each competitor use?\n"
            "- What are their pricing models?\n"
            "- Any recent M&A, funding rounds, or pivots?\n"
            "- Where are the gaps in the market that no one is addressing well?\n\n"
            "Cite your sources."
        ),
    },
    {
        "pillar": "regulatory_environment",
        "prompt": (
            "Now research the regulatory environment for this market:\n"
            "- What compliance frameworks apply (SOC 2, ISO 27001, GDPR, HIPAA, etc.)?\n"
            "- Are there licensing or certification requirements?\n"
            "- What pending legislation could impact this market in the next 12-24 months?\n"
            "- Are there geographic variations (US vs EU vs APAC)?\n"
            "- What are the compliance costs and timelines for a new entrant?\n\n"
            "Cite your sources."
        ),
    },
    {
        "pillar": "buyer_personas",
        "prompt": (
            "Based on what you've found about the competitive and regulatory landscape, "
            "research the typical buyers in this market:\n"
            "- What are the primary buyer titles and roles?\n"
            "- What budget range and authority do they have?\n"
            "- What are their top 3-5 pain points?\n"
            "- What decision criteria do they use when evaluating solutions?\n"
            "- What does their buying process look like (stages, timeline, stakeholders)?\n"
            "- Are there distinct buyer segments (enterprise vs mid-market vs SMB)?\n\n"
            "Cite your sources."
        ),
    },
    {
        "pillar": "gtm_strategies",
        "prompt": (
            "Given the competitive landscape, regulatory environment, and buyer profiles "
            "you've researched, recommend go-to-market strategies:\n"
            "- What channels are most effective for reaching these buyers?\n"
            "- Are there partnership or integration opportunities?\n"
            "- What pricing strategy would work (freemium, usage-based, seat-based, etc.)?\n"
            "- What should the launch sequence look like (beta → GA → expansion)?\n"
            "- What content and thought leadership topics would establish credibility?\n"
            "- How long until first revenue, and what's a realistic first-year target?\n\n"
            "Base your recommendations on the specific market context, not generic advice."
        ),
    },
    {
        "pillar": "risks_and_barriers",
        "prompt": (
            "Finally, identify the top risks and barriers to entry:\n"
            "- What switching costs exist for buyers using incumbent solutions?\n"
            "- Are there network effects or lock-in that favor incumbents?\n"
            "- What regulatory barriers could slow or block entry?\n"
            "- What timing risks exist (market maturity, economic conditions)?\n"
            "- What technical moats do incumbents have (data, integrations, patents)?\n"
            "- What would cause this market entry to fail?\n\n"
            "Rank risks by severity (high/medium/low) and likelihood."
        ),
    },
]


def run_research_thread() -> dict:
    """Run all 5 research turns in a single Mave thread."""
    thread_id = None
    research = {}

    for turn in RESEARCH_PROMPTS:
        payload = {"message": turn["prompt"]}
        if thread_id:
            payload["thread_id"] = thread_id

        resp = requests.post(
            f"{BASE}/mave/chat",
            headers=HEADERS,
            json=payload,
            timeout=120,
        ).json()

        if "error" in resp:
            raise Exception(f"Mave error on {turn['pillar']}: {resp['error']['message']}")

        if not thread_id:
            thread_id = resp.get("thread_id")

        research[turn["pillar"]] = {
            "content": resp.get("content", ""),
            "sources": resp.get("sources", []),
        }

        print(f"✓ {turn['pillar']}{len(resp.get('content', ''))} chars, "
              f"{len(resp.get('sources', []))} sources")

        time.sleep(2)

    return {"thread_id": thread_id, "pillars": research}
Each turn in the Mave thread builds on prior context. The competitive landscape informs buyer personas, which inform GTM strategy. This cascading context produces more coherent recommendations than isolated queries.

Stage 2 — Structure into a Market Entry Brief

Transform the raw research into a standardized JSON schema using Chat with response_format.
BRIEF_SCHEMA = {"type": "json_schema", "json_schema": {
    "name": "market_entry_brief", "strict": True,
    "schema": {
        "type": "object",
        "properties": {
            "market": {"type": "string", "description": "Target market name"},
            "executive_summary": {"type": "string", "description": "3-5 sentence executive summary"},
            "market_size_estimate": {"type": "string", "description": "TAM/SAM/SOM if available"},
            "top_competitors": {
                "type": "array",
                "items": {
                    "type": "object",
                    "properties": {
                        "name": {"type": "string"},
                        "positioning": {"type": "string"},
                        "estimated_share": {"type": "string"},
                        "weakness": {"type": "string"},
                    },
                    "required": ["name", "positioning", "estimated_share", "weakness"],
                },
                "description": "Top 5 competitors",
            },
            "regulatory_requirements": {
                "type": "array",
                "items": {"type": "string"},
                "description": "Key compliance frameworks and requirements",
            },
            "primary_buyer": {
                "type": "object",
                "properties": {
                    "title": {"type": "string"},
                    "budget_range": {"type": "string"},
                    "top_pain_points": {"type": "array", "items": {"type": "string"}},
                    "decision_criteria": {"type": "array", "items": {"type": "string"}},
                },
                "required": ["title", "budget_range", "top_pain_points", "decision_criteria"],
            },
            "recommended_gtm": {
                "type": "object",
                "properties": {
                    "pricing_model": {"type": "string"},
                    "primary_channel": {"type": "string"},
                    "launch_sequence": {"type": "string"},
                    "time_to_revenue": {"type": "string"},
                },
                "required": ["pricing_model", "primary_channel", "launch_sequence", "time_to_revenue"],
            },
            "top_risks": {
                "type": "array",
                "items": {
                    "type": "object",
                    "properties": {
                        "risk": {"type": "string"},
                        "severity": {"type": "string"},
                        "mitigation": {"type": "string"},
                    },
                    "required": ["risk", "severity", "mitigation"],
                },
            },
            "go_no_go_recommendation": {"type": "string", "description": "Go, No-Go, or Conditional Go with reasoning"},
        },
        "required": [
            "market", "executive_summary", "market_size_estimate",
            "top_competitors", "regulatory_requirements", "primary_buyer",
            "recommended_gtm", "top_risks", "go_no_go_recommendation",
        ],
    },
}}


def structure_brief(research: dict) -> dict:
    """Convert raw Mave research into a structured market entry brief."""
    combined = "\n\n".join(
        f"## {pillar.replace('_', ' ').title()}\n{data['content']}"
        for pillar, data in research["pillars"].items()
    )

    resp = mavera.responses.create(
        model="mavera-1",
        input=[{
            "role": "user",
            "content": (
                f"Synthesize this market research into a structured market entry brief "
                f"for the {TARGET_MARKET} market.\n\n"
                f"Include a Go / No-Go / Conditional Go recommendation with reasoning.\n\n"
                f"{combined}"
            ),
        }],
        extra_body={"response_format": BRIEF_SCHEMA},
    )

    return json.loads(resp.output[0].content[0].text)

Stage 3 — Drill-Down Follow-Up (Optional)

If any pillar needs deeper investigation, send follow-up questions in the same thread.
def drill_down(thread_id: str, question: str) -> dict:
    """Ask a follow-up question within the existing research thread."""
    resp = requests.post(
        f"{BASE}/mave/chat",
        headers=HEADERS,
        json={
            "thread_id": thread_id,
            "message": question,
        },
        timeout=120,
    ).json()

    if "error" in resp:
        raise Exception(resp["error"]["message"])
    return resp


DRILL_DOWN_QUESTIONS = [
    "What specific integrations do the top 3 competitors offer? Which ecosystem partnerships give them the strongest moat?",
    "For the mid-market segment specifically, what's the typical evaluation timeline and who else is involved in the buying committee?",
    "Are there any open-source or low-cost alternatives gaining traction that could disrupt the market from below?",
]

Running the Full Pipeline

def run_pipeline():
    print(f"Researching: {TARGET_MARKET}")
    print("=" * 60)

    # Stage 1: Research
    print("\n--- Stage 1: Mave Research Thread ---")
    research = run_research_thread()
    print(f"\nThread ID: {research['thread_id']}")
    print(f"Pillars researched: {len(research['pillars'])}")

    total_sources = sum(
        len(p["sources"]) for p in research["pillars"].values()
    )
    print(f"Total sources cited: {total_sources}")

    # Stage 2: Structure
    print("\n--- Stage 2: Structuring Brief ---")
    brief = structure_brief(research)
    print(f"Market: {brief['market']}")
    print(f"Competitors identified: {len(brief['top_competitors'])}")
    print(f"Risks identified: {len(brief['top_risks'])}")
    print(f"Recommendation: {brief['go_no_go_recommendation'][:100]}...")

    # Stage 3: Drill-down (optional)
    print("\n--- Stage 3: Drill-Down Questions ---")
    drill_downs = {}
    for q in DRILL_DOWN_QUESTIONS:
        result = drill_down(research["thread_id"], q)
        drill_downs[q[:50]] = result.get("content", "")
        print(f"✓ {q[:60]}...")
        time.sleep(2)

    # Save outputs
    with open("market_entry_brief.json", "w") as f:
        json.dump(brief, f, indent=2)

    raw_report = f"# Market Entry Brief: {TARGET_MARKET}\n\n"
    raw_report += f"## Executive Summary\n{brief['executive_summary']}\n\n"
    raw_report += f"## Market Size\n{brief['market_size_estimate']}\n\n"
    raw_report += "## Competitive Landscape\n"
    for comp in brief["top_competitors"]:
        raw_report += f"- **{comp['name']}**: {comp['positioning']} (share: {comp['estimated_share']}, weakness: {comp['weakness']})\n"
    raw_report += f"\n## Recommendation\n{brief['go_no_go_recommendation']}\n"

    with open("market_entry_report.md", "w") as f:
        f.write(raw_report)

    print("\n✓ Saved market_entry_brief.json")
    print("✓ Saved market_entry_report.md")
    return brief


if __name__ == "__main__":
    run_pipeline()

Example Output

The structured brief produces machine-readable JSON:
{
  "market": "B2B cybersecurity compliance for mid-market SaaS",
  "executive_summary": "The B2B cybersecurity compliance market for mid-market SaaS is a $4.2B segment growing at 18% CAGR. Dominated by Vanta, Drata, and Secureframe, the market has significant gaps in automated remediation and developer-native workflows. Regulatory tailwinds (SEC cyber disclosure rules, EU NIS2) are expanding the addressable market. A developer-first positioning with usage-based pricing could capture 2-3% share within 18 months.",
  "market_size_estimate": "TAM: $12B (full GRC market), SAM: $4.2B (mid-market SaaS compliance), SOM: $120M (developer-native segment)",
  "top_competitors": [
    {
      "name": "Vanta",
      "positioning": "Continuous compliance automation",
      "estimated_share": "28%",
      "weakness": "Complex onboarding, enterprise-focused pricing"
    },
    {
      "name": "Drata",
      "positioning": "Trust management platform",
      "estimated_share": "22%",
      "weakness": "Limited customization for non-standard frameworks"
    }
  ],
  "regulatory_requirements": [
    "SOC 2 Type II (baseline for SaaS)",
    "ISO 27001 (required for enterprise and EU customers)",
    "GDPR (EU data processing)",
    "SEC Cyber Disclosure (public companies, 2024+)"
  ],
  "primary_buyer": {
    "title": "VP Engineering or Head of Security",
    "budget_range": "$30K-$150K annually",
    "top_pain_points": [
      "Audit prep takes 200+ engineering hours per year",
      "Compliance tools don't integrate with CI/CD",
      "Evidence collection is manual and error-prone"
    ],
    "decision_criteria": [
      "Integration depth with existing stack",
      "Time to first audit",
      "Ongoing maintenance burden"
    ]
  },
  "recommended_gtm": {
    "pricing_model": "Usage-based (per integration + per framework)",
    "primary_channel": "Developer communities, DevSecOps conferences, content marketing",
    "launch_sequence": "Private beta (10 design partners) → Public beta → GA with SOC 2 only → Framework expansion",
    "time_to_revenue": "4-6 months to first paying customer, 12-18 months to $1M ARR"
  },
  "top_risks": [
    {
      "risk": "Incumbents have 18-24 month head start on integrations",
      "severity": "High",
      "mitigation": "Focus on 5 high-value integrations rather than breadth"
    },
    {
      "risk": "Enterprise consolidation could squeeze mid-market tools",
      "severity": "Medium",
      "mitigation": "Build strong mid-market brand before enterprise players move down"
    }
  ],
  "go_no_go_recommendation": "Conditional Go. The market has strong tailwinds and clear gaps in developer experience. However, success requires shipping a differentiated product within 6 months — the window is narrowing as incumbents expand."
}

Variations

Run the pipeline for 3-5 markets in parallel, then compare structured briefs side-by-side:
markets = [
    "B2B cybersecurity compliance for mid-market SaaS",
    "AI-powered contract review for legal teams",
    "Developer experience platforms for platform engineering",
]

briefs = {}
for market in markets:
    TARGET_MARKET = market
    briefs[market] = run_pipeline()

# Compare by go_no_go, time_to_revenue, risk count
for market, brief in briefs.items():
    print(f"{market}: {brief['go_no_go_recommendation'][:50]}")
Modify the prompts to focus on a specific geography:
RESEARCH_PROMPTS[0]["prompt"] = (
    f"We're considering expanding {TARGET_MARKET} into the Japanese market. "
    "Research the competitive landscape specific to Japan..."
)
Add a regulatory turn specific to local requirements (e.g., APPI for Japan, PIPL for China).
After generating buyer personas from Mave research, create those personas in Mavera and run a Focus Group to validate your positioning:
# After run_pipeline() produces buyer persona profiles
fg_payload = {
    "name": f"Market Entry Validation: {TARGET_MARKET}",
    "sample_size": 25,
    "persona_ids": [vp_eng_id, head_security_id, cto_id],
    "questions": [
        {"question": "Would you evaluate a new compliance tool in the next 12 months?", "type": "NPS", "order": 1},
        {"question": "What would make you switch from your current compliance solution?", "type": "OPEN_ENDED", "order": 2},
    ],
}
See the Positioning Workshop playbook for the full Focus Group flow.
Markets change. Run the same pipeline quarterly and diff the structured briefs to catch shifts:
import deepdiff

q1_brief = json.load(open("briefs/q1_brief.json"))
q2_brief = json.load(open("briefs/q2_brief.json"))

changes = deepdiff.DeepDiff(q1_brief, q2_brief, verbose_level=2)
print("New competitors:", changes.get("iterable_item_added", {}))
print("Changed risks:", changes.get("values_changed", {}))
Structure the brief for a 10-slide board deck:
SLIDE_SCHEMA = {"type": "json_schema", "json_schema": {
    "name": "slides", "strict": True,
    "schema": {
        "type": "object",
        "properties": {
            "slides": {
                "type": "array",
                "items": {
                    "type": "object",
                    "properties": {
                        "title": {"type": "string"},
                        "bullets": {"type": "array", "items": {"type": "string"}},
                        "speaker_notes": {"type": "string"},
                    },
                    "required": ["title", "bullets", "speaker_notes"],
                },
            },
        },
        "required": ["slides"],
    },
}}

Credits Estimate

StageTypical CostNotes
Mave research (5 turns)50–150 creditsDepends on research depth and sources
Structure brief (1 chat call)5–15 creditsSingle structured output
Drill-down questions (3 turns)30–90 creditsOptional depth
Total (full pipeline)~85–255 credits
Total (research + structure only)~55–165 creditsSkip drill-downs for a quick pass
Start with 1 market to calibrate credit cost. Multi-market runs multiply linearly — 3 markets ≈ 3× credits. Use drill-downs selectively on the highest-uncertainty pillars.

See Also

Mave Agent

Threads, sources, and research capabilities

Positioning Workshop

Validate positioning with personas after market research

News-Triggered Research

Automate re-research when market conditions change

Responses API

response_format and structured output

Credits & Budget

Track and manage credit usage

Annual Planning Kickoff

Chain market research into full annual planning