Metadata-Version: 2.4
Name: ai-layer-client
Version: 0.2.0
Summary: Async Python client for the Nexus AI infrastructure API
License-Expression: MIT
Project-URL: Homepage, https://nexus.epistemeia.ai
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.27.0
Requires-Dist: pydantic>=2.8.0

# nexus-client

Async Python client for the [Nexus](https://nexus.epistemeia.ai) AI infrastructure API.

## Install

```bash
pip install nexus-client
```

## Quick start

```python
import asyncio
from nexus_client import AILayerClient

async def main():
    client = AILayerClient(
        base_url="https://your-nexus-host/api",
        api_key="your-api-key",
    )

    agent = await client.create_agent(
        name="assistant",
        model="openai/gpt-4o-mini",
        system_prompt="You are a helpful assistant.",
    )
    thread = await client.create_thread(agent_id=agent["id"])

    async for event in client.stream_chat(
        agent_id=agent["id"],
        thread_id=thread["id"],
        message={"role": "user", "content": [{"type": "text", "text": "Hello!"}]},
    ):
        if event.type == "delta" and event.text:
            print(event.text, end="", flush=True)

asyncio.run(main())
```

See the [full docs](https://nexus.epistemeia.ai/python-client) for all methods and stream event types.
