Skip to content

Repository files navigation

🚀 CompeteScope Agent

License: MIT CI Release Issues

Python FastAPI Next.js LangGraph PostgreSQL Tavily PRs Welcome

输入一个产品名,5 个 Agent 协同工作 10 分钟,自动生成企业级竞品分析报告。

Input a product name, get an enterprise-grade competitive analysis report in 10 minutes.


🧠 Agent Workflow (DAG)

  [User Input: 产品名]
         │
         ▼
   ┌──────────┐
   │  Planner  │  分解搜索计划 → 生成关键词矩阵
   └────┬─────┘
        │
   ┌────┴────┐
   ▼         ▼
┌────────┐ ┌────────┐
│Research│ │Research│  Tavily 实时搜索 → 竞品信息采集
└───┬────┘ └───┬────┘
    │          │
    └────┬─────┘
         ▼
   ┌──────────┐
   │ Analysis  │  SWOT + 多维指标提取 + Citation 溯源
   └────┬─────┘
        │
        ▼
   ┌──────────┐
   │  Writer   │  结构化报告生成 (Markdown / JSON)
   └────┬─────┘
        │
        ▼
   ┌──────────┐
   │ Reviewer  │  QA 审核 → 幻觉检测 → 输出质量评分
   └────┬─────┘
        │
        ▼
  [SSE Live Replay + 可观测性面板]

✨ Key Features

模块 功能
Multi-Agent Orchestration LangGraph DAG, 5-agent pipeline, parallel research nodes
Real-time Search Tavily Search API, full citation traceability
Structured Output SWOT analysis, multi-dimension metric cards
SSE Live Replay Real-time progress streaming, token cost tracking
Observability Agent timeline, execution replay, cost breakdown
Tech Stack FastAPI (backend) + Next.js 15 (frontend) + PostgreSQL 16

📦 Project Structure

compete-scope-agent/
├── backend/                    # FastAPI backend
│   ├── app/
│   │   ├── api/               # REST + SSE endpoints
│   │   ├── agents/            # LangGraph DAG: Planner, Research, Analysis, Writer, Reviewer
│   │   ├── services/          # Tavily client, report generator
│   │   └── models/            # Pydantic schemas
│   ├── tests/
│   └── requirements.txt
├── frontend/                   # Next.js frontend
│   ├── src/
│   │   ├── app/              # App Router pages
│   │   ├── components/       # React components (SSE progress, SWOT viz)
│   │   └── lib/              # API client, hooks
│   └── package.json
├── docs/                      # Documentation
├── .github/                   # CI/CD, issue templates
└── README.md

🚀 Quickstart

⚠️ In active development. Quickstart guide coming with v0.1 release.

# Prerequisites: Python 3.12+, Node 22+, PostgreSQL 16+

# 1. Clone
git clone https://github.com/xizhilanre/compete-scope-agent.git
cd compete-scope-agent

# 2. Backend
cd backend
python -m venv .venv && source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env   # add your TAVILY_API_KEY
uvicorn app.main:app --reload

# 3. Frontend
cd ../frontend
npm install
cp .env.example .env.local
npm run dev

🗺️ Roadmap

  • v0.1.0 — Core 5-agent DAG, Tavily search, SWOT output, SSE streaming
  • v0.2.0 — Citation traceability, agent timeline visualization
  • v0.3.0 — Multi-language reports, PDF export
  • v0.4.0 — Custom search sources (MCP connectors), report comparison
  • v1.0.0 — Enterprise auth, team workspaces, PostgreSQL persistence

🤝 Contributing

Contributions welcome! See CONTRIBUTING.md for branch strategy and PR workflow.

  1. Fork the repo
  2. Branch from developfeature/your-feature
  3. Open a PR to develop
  4. CI must pass + 1 review approval

📄 License

MIT © CompeteScope Agent Contributors

About

Input product name, get enterprise-grade competitive analysis report in 10m. Powered by 5-Agent LangGraph DAG (Planner→Research→Analysis→Writer→Reviewer), Tavily search, SWOT output, citation traceability, SSE live replay & observability. FastAPI+Next.js+PostgreSQL / 输入产品名,5个Agent协同10分钟自动生成企业级竞品分析报告,支持全链路溯源与SSE可视化。

Topics

Resources

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages