Metadata-Version: 2.4
Name: tryvira-sdk
Version: 0.1.9
Summary: Typed Python client for the Vira authority boundary
Author: Vira
License-Expression: MIT
Project-URL: Repository, https://github.com/hrpering/tryvira
Project-URL: Documentation, https://github.com/hrpering/tryvira#readme
Keywords: ai-governance,observability,agent-runtime
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# Vira Python SDK

MIT-licensed client library. The Vira service, application, and backend remain
proprietary and are governed separately.

Package name: `tryvira-sdk`.

## Install

```bash
python -m pip install tryvira-sdk
```

For a repository checkout use `python -m pip install ./sdks/python`. The client is a thin
HTTP client of Vira's authority boundary; it does not execute tools locally.

For maintainers, build with `python -m build sdks/python`. Public CI uses PyPI Trusted
Publishing; do not put a token in this repository or in an example.

The SDK is a thin client of the Vira authority boundary. It does not execute
tools or actions locally, invent stable semantic keys, or create a second
telemetry store. Runtime requests are fail-closed; observation telemetry can be
configured fail-open with `failure_mode="open"`.

```python
import os
from vira import ViraClient

with ViraClient(
    "http://127.0.0.1:4185",
    api_key=os.environ.get("VIRA_API_KEY"),
) as vira:
    connected = vira.connect_once(
        "my-agent", "custom-agent",
        {"organizationId": "org", "projectId": "project", "environmentId": "local"},
        "custom-python", "1",
        idempotency_key="connect-001",
    )
    system = connected.body["system"]
    connection = connected.body["connection"]
    vira.observe({
        "eventId": "evt-1", "eventType": "model.response",
        "aiSystemId": system["id"], "connectionId": connection["id"],
        "payload": {"message": "A model response was produced."},
    }, idempotency_key="evt-1")
    semantic = vira.resolve_semantic({"input": "answer a customer billing question"})
    print(semantic.body)
```

Runtime execution requires a released revision, a valid scope and an idempotency key;
semantic resolution is not authorization. See the public Vira documentation at
https://github.com/hrpering/tryvira for the shared JS/Python lifecycle.

The package metadata is intentionally dependency-free.

