Metadata-Version: 2.4
Name: exergynet
Version: 0.1.0
Summary: Official Python client SDK for ExergyNet persistent state, governed context, and Vanguard inference APIs.
Author-email: EDT INC <ai@exergynet.org>
Maintainer-email: EDT INC <ai@exergynet.org>
License-Expression: Apache-2.0
Project-URL: Homepage, https://exergynet.org
Project-URL: Repository, https://github.com/ezumba/exergynet-python
Project-URL: Documentation, https://portal.exergynet.org/docs
Project-URL: APIReference, https://portal.exergynet.org/openapi.yaml
Project-URL: Research, https://github.com/ezumba/exergynet-research
Project-URL: Security, https://exergynet.org/security.html
Keywords: exergynet,xlmp,vanguard,persistent-memory,governed-execution,ai-infrastructure
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: httpx<1.0,>=0.27.0
Requires-Dist: pydantic<3.0,>=2.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: ruff>=0.6; extra == "dev"
Requires-Dist: build>=1.0; extra == "dev"
Requires-Dist: twine>=5.0; extra == "dev"
Dynamic: license-file

# ExergyNet Python SDK (`exergynet`)

Official Python integration client for **ExergyNet** — external infrastructure for persistent state, bounded evidence retrieval, governed context delivery, and Vanguard OpenAI-compatible inference.

Licensed under Apache-2.0. Maintained by EDT INC (`ai@exergynet.org`).

## Installation

```bash
pip install exergynet
```

## Capabilities (Aligned to Portal OpenAPI v2.1.0)

- **Authentication & Account**: `auth_register`, `auth_login`, `auth_me`, `auth_rotate_key`, `developer_me`, `developer_stats`
- **xLMP Persistent State & Proofs**: `xlmp_ingest`, `xlmp_query`, `xlmp_zk_query`, `xlmp_governed_query`, `xlmp_prove`, `xlmp_proof_status`, `vault_list`, `vault_content`
- **Vanguard Inference**: `chat_completions` (OpenAI-compatible `vanguard-standard`, `vanguard-pro`, `vanguard-ultra`), `extract`
- **Omega Agent Control & Discovery**: `omega_overview`, `omega_models`, `omega_agents`, `omega_create_agent`, `omega_budget_intents`, `omega_create_budget_intent`
- **Public Read-Only Telemetry & Discovery**: `health`, `services_catalog`, `l0_stats`, `l0_transactions`, `explorer_state`, `nodes_map`
- **AERIS Witness**: `aeris_witness`

## Quickstart

```python
import os
from exergynet import ExergyNetClient

client = ExergyNetClient(
    api_key=os.environ["EXERGYNET_API_KEY"],
    base_url=os.environ.get("EXERGYNET_BASE_URL", "https://portal.exergynet.org"),
)

# 1. Check account & USDC balance
profile = client.developer_me()
print(profile.id, profile.usdc_balance_usd)

# 2. Ingest persistent memory and query with bounded context
ingested = client.xlmp_ingest(b"Project telemetry...", filename="notes.txt")
reply = client.xlmp_zk_query(
    xlmp_root=ingested.hollow_object.xlmp_root,
    query="Summarize key telemetry findings",
)
print(reply.journal.result, reply.seal.sha256_integrity)

# 3. Call Vanguard inference
completion = client.chat_completions(
    model="vanguard-standard",
    messages=[{"role": "user", "content": "Hello from ExergyNet"}],
)
print(completion.choices[0].message.content)
print(completion.usage)
```

Async usage is available via `AsyncExergyNetClient`.

## Security & Reliability

- Credentials are read from explicit arguments or `EXERGYNET_API_KEY` and are never logged or included in `repr()`.
- TLS verification is enabled by default.
- Explicit connect/read timeouts are enforced on every request.
- Safe, idempotent `GET` requests use bounded retries on transient `429`/`503`/transport errors; non-idempotent `POST` mutations (inference, ingest, proof triggers, billing/budget intents) are **never** automatically retried unless an explicit idempotency key is provided and supported by the endpoint.

## External Engagement

Maintained by **EDT INC** (`ai@exergynet.org`).
