ChiAgent is an AI-powered customer service agent for e-commerce platforms, providing automated support for refunds, order updates, and product discovery.
- Refund Processing: Stub endpoint for handling refund requests
- Order Management: Track and manage customer orders
- Multi-platform Support: Designed to work with Shopify and WooCommerce
- Python 3.8+
- SQLite (for development)
- pip (Python package manager)
-
Clone the repository:
git clone https://github.com/yourusername/chiagent.git cd chiagent
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Start the FastAPI development server:
uvicorn app.main:app --reload
-
The API will be available at
http://127.0.0.1:8000
-
Access the interactive API documentation at
http://127.0.0.1:8000/docs
POST /api/v1/orders/{order_id}/refund
- Request a refund for an order
Example request:
{
"order_id": "TEST123",
"platform": "shopify",
"amount": 100.00,
"reason": "Customer requested refund"
}
# Install test dependencies
pip install -r requirements-test.txt
# Run tests
pytest tests/
chiagent/
├── app/
│ ├── api/
│ │ └── v1/
│ │ └── endpoints/
│ │ └── refunds.py
│ ├── crud/
│ │ └── refund.py
│ ├── db/
│ │ └── session.py
│ ├── models/
│ │ ├── __init__.py
│ │ ├── base.py
│ │ └── refund_request.py
│ ├── schemas/
│ │ └── refund.py
│ └── main.py
├── tests/
│ └── test_refunds.py
├── requirements.txt
└── README.md
This project is licensed under the terms of the MIT license. See the LICENSE file for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request