A next-generation marketing intake system built with LangGraph, LangChain, and adaptive intelligence for strategic lead qualification and market intelligence gathering.
This system will replace legacy agent-based architectures with:
- Adaptive Questioning: Dynamic intake forms that adapt based on user type, industry, and responses
- Market Intelligence Integration: Real-time market data from ADAPT/Switch 6 for intelligent ICP generation
- Strategic Orchestration: LangGraph-powered workflows for intelligent lead qualification
- Position Validation: Automated validation of positioning and messaging fit
- LangGraph: Advanced workflow orchestration and state management
- LangChain: Intelligent agent coordination and tool integration
- Adaptive Intake Engine: Dynamic form generation based on context
- Market Intelligence API: Real-time market data integration
- Strategic Validation: Automated positioning and ICP analysis
- Dynamic questionnaire adaptation
- Real-time market intelligence integration
- Intelligent lead scoring and qualification
- Automated positioning validation
- Strategic workflow orchestration
- Context-aware agent coordination
OpenAIEmbeddingServiceencodes the Ogilvy corpus withtext-embedding-3-largeand provides deterministic fallbacks when the OpenAI API is unavailable.BigIdeaKnowledgeBasereads fromdata/big_idea_corpus.jsonto supply historically proven headline inspiration.BigIdeaPipelineretrieves inspirations, prompts GPT-5 Nano heuristics, scores clarity, assembles mockups, and guards claims via the double-your-sales heuristic.graphs.big_idea_graphexposes LangGraph nodes (retrieve_examples,generate_big_ideas,clarity_check,design_mockup,claim_validation,output_dashboard) so the workflow can run with retries/timeouts.- Run
python -m pytest tests/test_big_idea_pipeline.pyto validate the pipeline and graph offline.
The Switch 6 engine now runs a complete research pipeline for six stages (segment ? wound ? reframe ? offer ? action ? cash):
- Segmentation enrichment with LinkedIn/Crunchbase prospect stubs, enrichment heuristics, email deliverability scoring, CSV export, and Chroma traceability.
- Pain-point quantification using review scraping fallbacks, LDA topic modelling, sentiment scoring, business-impact estimation, and Markdown-ready footnotes.
- Market reframing via Google Trends comparisons, competitor feature/price snapshots, and LLM-generated reframes ranked for clarity and creativity.
- Offer packaging that produces tiered bundles, differentiator summaries, and margin analytics.
- Action planning with CTA variants, CTR benchmarks, UTM suggestions, and analytics tags.
- Cash flow projections including payment link stubs, CAC-aware revenue projections, and Plotly dashboards (expected vs. actual funnel plus pain bar chart).
- Every stage emits a
research_confidencescore and inline citations; the full run aggregates them intoframework_completion_scoreand a citation appendix.
# Refresh research for one or many profiles
python scripts/switch6_refresh.py --config my_switch6_profiles.json --output-dir reports/switch6
# Preview the latest segment CSV and open dashboards
python scripts/switch6_review_dashboard.py --segment-csv data/switch6_segment.csv --openscripts/switch6_refresh.pyaccepts--refresh-every <minutes>(minutes between refreshes) to loop continuously—ideal for cron/Task Scheduler.scripts/generate_switch6_sample.pyproduces a sample JSON artifact underdata/examples/(requires pandas/numpy wheel support).
Run the Switch 6 integration test with mocked external services:
python -m pytest Intake/tests/test_switch6_engine.pyThe test module skips automatically if optional scientific dependencies (pandas/numpy) are missing or incompatible. Install the project requirements inside
.venvfor deterministic results.
This repository previously contained basic agent orchestration and web crawling functionality. That legacy system has been completely removed to make way for the strategic rebuild with modern LangGraph/LangChain architecture.
- Implement LangGraph orchestration framework
- Build adaptive intake engine
- Integrate market intelligence APIs
- Develop strategic validation algorithms
- Create intelligent agent coordination system
- Modular interfaces (
PageFetcher,HTMLParser,NLPAnalyzer,StorageAdapter) enable dependency injection and straightforward test doubles. - Configurable discovery/analysis sub-graphs split crawling from NLP indexing, each guarded with circuit breakers, bulkheads, and conditional skip edges for resilience.
- Structured telemetry (Prometheus metrics + JSON logs) and optional OpenTelemetry spans make runs observable end-to-end.
- CLI (
python scripts/mra_cli.py) scaffolds configs, validates YAML/JSON, runs ad-hoc analyses, and inspects positioning scores.
- Scoring modules are now pluggable (
Adapt,Switch6,Ogilvy,Godin,Hybrid) and weighted via config, with explainable feedback (severity + text) per evidence. - Dual-mode readiness: heuristics run locally; LLM feedback kicks in automatically when
OPENAI_API_KEYis present.