Error in user YAML: (<unknown>): found character that cannot start any token while scanning for the next token at line 1 column 1
---
```markdown
# Basic AI Agent π€
A simple healthcare triage AI agent built with **FastAPI**.
It accepts text input (symptoms), classifies them into *mild*, *urgent*, or *emergency*, and stores conversation history.
## π Features
- Rule-based triage (`mild`, `urgent`, `emergency`)
- Returns advice messages
- Stores chat history in memory
- FastAPI auto-docs available
## π Project Structure
```
basic\_ai\_agent/
βββ main.py # FastAPI app
βββ requirements.txt # Dependencies
βββ README.md # Project guide
````
## π οΈ Installation & Setup
1. Clone this repo or unzip the project:
```bash
git clone <your-repo-url>
cd basic_ai_agent
````
2. Create and activate a virtual environment (recommended):
```bash
python -m venv venv
source venv/Scripts/activate # On Git Bash / Linux / Mac
# OR
venv\Scripts\activate # On Windows CMD/PowerShell
```
3. Install dependencies:
```bash
pip install -r requirements.txt
```
4. Run the server:
```bash
uvicorn main:app --reload
```
5. Open API docs in browser:
π [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs)
## π‘ API Endpoints
### `POST /api/message`
Send a message and get triage advice.
**Request:**
```json
{ "message": "I have a high fever" }
```
**Response:**
```json
{
"triage_level": "urgent",
"advice": "β οΈ Visit a clinic soon."
}
```
### `GET /api/history`
Retrieve chat history.
---
- Add NLP/ML model (Hugging Face) for smarter classification.
- Connect with a simple frontend (HTML/JS or React).
- Deploy on Render/Heroku/Vercel.
Made with β€οΈ using FastAPI.
---