ICA instrumentation — one line to capture, govern, and seal every OpenAI/Anthropic call. Content never leaves the process.
Project description
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.
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()raisesICABlockedErrorbefore 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).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ica_instrumentation-0.1.0.tar.gz.
File metadata
- Download URL: ica_instrumentation-0.1.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d52d72b346836d027d7b945f5570d8854e21c77f493c14a8821281ad307d83c
|
|
| MD5 |
3399f56f45fcabafc9eb68394501ddc4
|
|
| BLAKE2b-256 |
aa35e02cc3a7b8a350124777eab544e74f4d4cce5ba384a0ae6642cf23a3b4c0
|
File details
Details for the file ica_instrumentation-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ica_instrumentation-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d44d3150cc56350a6c065d8614194b3ab4a69868f1ee02d1cd34091147784f9d
|
|
| MD5 |
870e503b6e2cc0c28f357877533a4c13
|
|
| BLAKE2b-256 |
cb0e24f282e3c096edcf1c29c3eb6a95568ee03c0eeb28b720ab9600432ce3aa
|