Metadata-Version: 2.4
Name: hejaz-ai-sdk
Version: 1.0.1
Summary: Python SDK for the AI Gateway assistant API — chat, streaming, knowledge base, image generation, artifacts, and session management.
Project-URL: Homepage, https://github.com/hejaz/ai-gateway
Project-URL: Documentation, https://github.com/hejaz/ai-gateway/tree/main/sdk/python
Author: Hejaz AI Gateway Team
License-Expression: MIT
Keywords: ai,assistant,gateway,sdk,sse,streaming
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: httpx>=0.27
Provides-Extra: dev
Requires-Dist: mypy>=1.11; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: respx>=0.22; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Description-Content-Type: text/markdown

# Hejaz AI Assistant SDK

Python SDK for the Hejaz AI Gateway — chat, streaming, knowledge base, image generation, and more.

## Install

```bash
pip install hejaz-ai-sdk
```

## Quick Start

```python
from ai_assistant import AssistantClient

async with AssistantClient(api_key="your-key", base_url="https://api.hejaz.com") as client:
    # Simple chat
    response = await client.chat.send("What is Zakat?")
    print(response.content)

    # Streaming
    async for event in client.chat.stream("Explain fasting in Islam"):
        if event.event_type == "text_delta":
            print(event.data, end="", flush=True)

    # Knowledge base search + chat
    response = await client.knowledge.ask(
        "Compare the four madhabs on marriage rules",
        dataset_ids=["islamic-knowledge"]
    )

    # Image generation
    result = await client.images.generate("a beautiful mosque at sunset")
```

## Features

- **Streaming SSE** — `async for event in client.chat.stream()` with 73 typed event types
- **Knowledge Base** — RAG-powered Q&A over your datasets
- **Sub-Agents** — Parallel explore/task/plan agents
- **Image Generation** — Gemini + DashScope with auto-routing
- **Artifacts** — File upload/download with S3 storage
- **Sessions** — Multi-turn conversation management
- **Tools** — 15+ built-in tools + MCP integration

## Requirements

- Python 3.11+
- `httpx` (auto-installed)
