Metadata-Version: 2.3
Name: cyvia
Version: 0.1.0
Summary: Cyvia Client SDK
Author: Gokul Soumya
Author-email: Gokul Soumya <gokul@cyvia.ai>
Requires-Dist: httpx>=0.28.1
Requires-Python: >=3.14
Description-Content-Type: text/markdown

# Cyvia Client SDK

Lean Python client for sending **agent traces** to the Cyvia platform.

## Environment

- **`CYVIA_API_KEY`** (required): Bearer token for the tenant API key.
- **`CYVIA_BASE_URL`** (optional): API base URL.

## Usage (Claude Agent SDK)

```python
import cyvia

with cyvia.CyviaClient(api_key, base_url=base_url) as http:
    trace = cyvia.Trace(
        http,
        adapter=cyvia.CLAUDE_AGENT_SDK,
        runtime=cyvia.CLAUDE_AGENT_SDK,
        agent_display_name="Weather agent",
        agent_description="Looks up weather via tools and summarizes the answer.",
    )
    cyvia.observe(claude_client, trace)
    await claude_client.query("...")
    async for msg in claude_client.receive_response():
        ...
```

## Usage (LangChain)

```python
import cyvia

with cyvia.CyviaClient(api_key, base_url=base_url) as http:
    trace = cyvia.Trace(
        http,
        adapter=cyvia.LANGCHAIN,
        runtime=cyvia.LANGCHAIN,
        agent_display_name="My agent",
    )
    handler = cyvia.LangChainCallbackHandler(trace)
    try:
        model.invoke("Hello", config={"callbacks": [handler]})
    finally:
        trace.close()
```
