# PATAS Demo Guide This guide walks you through running a complete PATAS demo, from setup to viewing results. --- ## Prerequisites - Python 3.9 or higher - Poetry installed ([installation guide](https://python-poetry.org/docs/#installation)) - LLM provider API key (optional, for LLM-powered pattern mining, e.g., OpenAI) --- ## Step 1: Installation ```bash # Clone the repository (or use your local copy) git clone cd PATAS # Install dependencies poetry install # Copy environment template cp .env.example .env ``` ### Optional: Configure LLM Provider API Key If you want to use LLM-powered pattern mining, add your LLM provider API key to `.env`: ```bash # For OpenAI (default) OPENAI_API_KEY=your-key-here # or PATAS_OPENAI_API_KEY=your-key-here ``` **Note**: PATAS works without LLM, but LLM enhances pattern discovery quality. --- ## Step 2: Start the API Server ```bash # Option 1: Using uvicorn directly poetry run uvicorn app.api.main:app --host 0.0.0.0 --port 8000 # Option 2: Using the CLI entry point poetry run patas-api # Option 3: Using the demo script (it will check if server is running) ``` The API will be available at `http://localhost:8000` **Verify it's running:** ```bash curl http://localhost:8000/api/v1/health ``` You should see: ```json {"status": "ok"} ``` --- ## Step 3: Run the Demo ### Option A: Using the Demo Script (Recommended) ```bash ./docs/run_demo.sh ``` The script will: 1. Check if the API is running 2. Send the demo dataset to `/api/v1/analyze` 3. Display results in the terminal 4. Save results to `docs/demo_results.json` ### Option B: Manual Request ```bash curl -X POST http://localhost:8000/api/v1/analyze \ -H "Content-Type: application/json" \ -d @- <