Metadata-Version: 2.4
Name: ica-instrumentation
Version: 0.1.0
Summary: ICA instrumentation — one line to capture, govern, and seal every OpenAI/Anthropic call. Content never leaves the process.
Project-URL: Homepage, https://aleeth.com
Keywords: ai-governance,openai,anthropic,observability,ica,aleeth
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# ica-instrumentation

One line to capture, govern, and seal every AI call your Python app makes. Content
never leaves the process — only a hash travels. Standard library only.

```python
from openai import OpenAI
import ica_instrumentation as ica

ica.init(org="org_acme", token=os.environ["ICA_INGEST_TOKEN"])
client = ica.instrument(OpenAI())

# used exactly as before — now captured + governed
r = client.chat.completions.create(model="gpt-4o", messages=messages)
```

- **Captured:** every request (model, prompt hash, tokens) and response, sealed into
  the ICA ledger with a court-grade receipt.
- **Governed:** when the operator has **armed** enforcement and policy denies a call,
  `create()` raises `ICABlockedError` **before** the model is reached. Shadow mode
  (the default) records without blocking.
- **Private:** prompts/outputs are hashed, never sent.

Config via `ica.init(...)` or env: `ICA_ORG`, `ICA_INGEST_TOKEN`, `ICA_INGEST_URL`,
`ICA_AGENT_HANDLE`, `ICA_SESSION_ID`. Instruments OpenAI (`chat.completions`,
`responses`) and Anthropic (`messages`).
