Metadata-Version: 2.4
Name: iil-chat-agent
Version: 0.1.0
Summary: Domain-agnostic chat agent with Tool-Use loop
Author: Achim Dehnert
License: MIT
Requires-Python: >=3.11
Requires-Dist: pydantic>=2.0
Provides-Extra: creative
Requires-Dist: creative-services>=0.1.0; extra == 'creative'
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.1; extra == 'dev'
Provides-Extra: redis
Requires-Dist: redis>=5.0; extra == 'redis'
Description-Content-Type: text/markdown

# chat-agent

Domain-agnostic Chat Agent with Tool-Use loop — platform package per ADR-034 §3.

## Core Components

- **ChatAgent**: Core Tool-Use loop (LLM → tool calls → execute → LLM)
- **DomainToolkit**: ABC for app-specific tool collections
- **SessionBackend**: Protocol for pluggable session storage (InMemory, Redis)
- **ToolkitRegistry**: Global registry for toolkit discovery

## Installation

```bash
pip install -e ".[dev]"
```

## Usage

```python
from chat_agent import ChatAgent, InMemorySessionBackend

agent = ChatAgent(
    toolkit=MyToolkit(),
    completion=my_llm_client,
    session_backend=InMemorySessionBackend(),
    system_prompt="You are a helpful assistant.",
)

response = await agent.chat(
    session_id="user-123",
    user_message="How many rooms are on floor 2?",
    tenant_id="tenant-abc",
)
```
