Metadata-Version: 2.4
Name: krnla
Version: 0.1.0
Summary: First-party Python client for the KRNLA Gateway API v1
Author: KRNLA
License-Expression: Apache-2.0
Project-URL: Homepage, https://krnla.com
Project-URL: Documentation, https://krnla.com/docs/
Project-URL: Repository, https://github.com/ZenSched/krnla.git
Project-URL: Support, https://krnla.com/support/
Keywords: ai-agents,governance,security,gateway
Classifier: Development Status :: 4 - Beta
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
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# KRNLA Python SDK 0.1.0

An unprivileged, standard-library client for KRNLA Gateway API v1.
Install version 0.1.0 from the official registry after its release:

```sh
python -m pip install krnla==0.1.0
```

Configure `KRNLA_API_KEY` in the agent's secret manager and set
`KRNLA_GATEWAY_URL=https://gateway.krnla.com`. Keep credentials out of source code.

```python
import os

from krnla import KRNLA

krnla = KRNLA.connect()
print(krnla.identity.agent_id)

delivery = krnla.send_connection(
    connection=os.environ["KRNLA_CONNECTION_ID"],
    data={"reportId": "synthetic-123"},
)
print(delivery.outcome)

for message in krnla.poll_inbox():
    process_message(message.content)
    krnla.acknowledge(
        delivery_id=message.delivery_id,
        lease_id=message.lease_id,
    )
```

The one-call bootstrap validates configuration and verifies identity. It does not
capture existing arbitrary traffic or claim online presence. Use `send`, `emit`,
`declare`, and `llm.generate`/`llm.stream` for supported governed operations. No
decorators or action registration are required. The [developer guide](https://krnla.com/docs/)
explains outcomes, examples, security boundaries, and deferred capabilities. A configured
connection ID selects a server-managed route; the agent never receives the destination URL or
verification secret. New connections use durable inbox delivery by default: a send returns
`QUEUED`, retrieval leases a message, and `acknowledge` records successful destination
processing. Delivery is at-least-once.
If a send times out or loses its connection, read the typed error's `operation_id` and
call `get_send_status(operation_id=...)`. Replaying the identical send with that
operation ID returns the original result; changed input is rejected. Reconcile within
seven days.
