Skip to content

dayoxy/basic_ai_agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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.

---

πŸ“Œ Next Steps

  • 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.


---

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages