Spaces:
Running
Running
| # How to Run AIDA Agent for Testing | |
| ## 1. Start the Backend Server | |
| In the AIDA directory, run: | |
| ```bash | |
| python -m uvicorn main:app --reload | |
| ``` | |
| **Note:** Use `main:app` not `app.main:app` (main.py is in the root, not in the app folder) | |
| The server will start on `http://127.0.0.1:8000` | |
| You should see: | |
| ``` | |
| INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) | |
| INFO: Started reloader process [xxxx] using WatchFiles | |
| ``` | |
| ## 2. Open the Test UI | |
| Simply open `test_chat_ui.html` in your browser: | |
| - Double-click the file, OR | |
| - Right-click → Open with → Chrome/Edge/Firefox | |
| The UI will automatically connect to `http://localhost:8000` | |
| ## 3. Test the Agent | |
| 1. **Login** (in the sidebar): | |
| - Enter your test credentials | |
| - Or paste a JWT token in the "Manual Token Override" field | |
| 2. **Chat**: | |
| - Type messages in the input box at the bottom | |
| - Click Send or press Enter | |
| - View responses in the chat area | |
| 3. **Debug**: | |
| - Check the "Debug Output" section in the sidebar for raw JSON responses | |
| - Monitor the server terminal for backend logs | |
| ## Troubleshooting | |
| ### Server won't start | |
| - Check if port 8000 is already in use | |
| - Verify MongoDB, Redis, Qdrant connection strings in `.env` | |
| - Check the terminal for specific error messages | |
| ### UI shows "Offline" | |
| - Make sure the server is running on port 8000 | |
| - Check browser console (F12) for CORS or network errors | |
| ### Authentication fails | |
| - Verify your test user exists in the database | |
| - Check the credentials match | |
| - Use the manual token input as a fallback | |