FlagshipAi / AISolutions /README.md
Ali2206's picture
Deploy Flagship AI Space (Docker, clean)
07afba2

AI Opportunity Finder (FastAPI)

FastAPI service that takes an industry and 3 pain points, then returns a tailored AI solution roadmap with ROI estimates and concrete examples.

Quickstart (Windows PowerShell)

cd "C:\Users\yakdh\OneDrive\Bureau\Work\Flagship"
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000

Open the docs at: http://localhost:8000/docs

Example Request

POST http://localhost:8000/api/plan

{
  "industry": "E-commerce",
  "pain_points": [
    "High support volume",
    "Manual product data entry",
    "Low email conversion"
  ]
}

Example Response (excerpt)

{
  "industry": "E-commerce",
  "summary": "3 high-impact opportunities with strong near-term ROI.",
  "overall_roi_percent": 158.0,
  "items": [
    {
      "title": "Customer Support Copilot",
      "estimated_roi_percent": 210.0,
      "estimated_payback_months": 3,
      "effort_level": "medium"
    }
  ]
}

Notes

  • CORS is enabled for local development.
  • ROI is estimated with simple heuristics; refine as needed for your domain.

Engines

You can select the planning engine via request field engine or env var DEFAULT_ENGINE.

  • heuristic (default): built-in rules/heuristics (no external API)
  • openai: uses OpenAI Chat Completions to produce structured JSON
  • agent: minimal MCP-style agent that delegates to OpenAI or heuristic

Set environment variables before running (PowerShell):

$env:OPENAI_API_KEY = "sk-..."
$env:OPENAI_MODEL = "gpt-4o-mini"
$env:DEFAULT_ENGINE = "openai"   # or heuristic | agent

If you see PowerShell parsing errors with &&, use separate commands instead of chaining.