Metadata-Version: 2.4
Name: tisement-agent
Version: 0.1.1
Summary: WhatsAI — deployable AI customer service agent by Tisement Media. Connect LLM + WhatsApp webhook and serve 24/7.
Author: Tisement Media
License: MIT
Keywords: whatsapp,ai-agent,customer-service,llm,fastapi
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Communications :: Chat
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi>=0.100.0
Requires-Dist: uvicorn[standard]>=0.23.0
Requires-Dist: httpx>=0.24.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: pydantic-settings>=2.0.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: openai>=1.0.0
Requires-Dist: anthropic>=0.18.0
Requires-Dist: rich>=13.0.0
Requires-Dist: aiofiles>=23.0.0
Requires-Dist: typer>=0.12.0
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-asyncio; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Dynamic: license-file

# WhatsAI by Tisement Media

**AIM:** A fully deployable AI customer service agent built for small businesses.

## Philosophy

Customers want their business on WhatsApp, not just for marketing, but for the actual customer service. Small businesses don't have the staff to answer 24/7.
WhatsAI lets small businesses engage leads, answer FAQs, book orders, and handle real conversations inside WhatsApp — all from a live webhook and an LLM backend that Tisement Media can configure per client.

## Installation

```bash
pip install tisement-agent
```

## Setup

```bash
whatsai setup
```

You'll be prompted for:
1. LLM provider + API key (`OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, or custom endpoint)
2. WhatsApp Business API credentials (`WHATSAPP_PHONE_NUMBER_ID`, `WHATSAPP_ACCESS_TOKEN`)
3. Optional: Facebook Messenger and Instagram
4. Client config path

## Run Webhook Server

```bash
whatsai run --config ./clients/savannah-grill
```

## Test Locally

```bash
whatsai chat --config ./clients/savannah-grill
```

## Project Structure

```
tisement-agent/
  tisement_agent/
    cli/              — Typer CLI entry points
    core/             — Webhook router, LLM client, conversation store
    platforms/        — WhatsApp, Messenger, Instagram adapters
  clients/            — Client configs + KBs (not shipped, user-local)
  tests/
```

## Deployment

The server is a single FastAPI app. Deploy to Fly.io, Railway, Railway, Render, Heroku, or any VPS.

Environment variables for production:
- `WHATSAPP_PHONE_NUMBER_ID`
- `WHATSAPP_ACCESS_TOKEN`
- `WHATSAPP_WEBHOOK_VERIFY_TOKEN`
- `LLM_API_KEY`
- `LLM_PROVIDER` (openai | anthropic | custom)
- `LLM_MODEL_NAME`
- `PORT` (auto-set on most platforms)

## License

MIT © Tisement Media
