trust3-ai-collector-sdk
Python SDK for pushing AI-asset inventory snapshots directly to Trust3 governance.
Describe your agents, tools, models, identities, and the relationships between them using a typed generic model. The SDK maps the snapshot to the governance bulk ingest format and POSTs it to the governance API.
- Direct — pushes to the Trust3 governance bulk ingest API
- Typed — closed enums prevent invalid asset or relationship kinds at construction time
- Resilient — automatic retry on transport errors and 5xx responses
- Idempotent — push a full snapshot every time; governance upserts, so re-sending is safe
Installation
pip3 install trust3-ai-collector-sdk
Requires Python ≥ 3.9 and a Trust3 governance API key. See the AI Assets Collector documentation for platform setup and credentials.
Quick start
import os
from trust3_ai_collector_sdk import (
Asset, AssetKind, IdentityKind,
InventoryClient, InventoryClientConfig,
InventorySnapshot,
Relationship, RelationshipKind,
)
snap = InventorySnapshot(
source="my_platform",
account="prod.example.com",
vendor="Acme Corp",
product_name="My Platform",
environment="prod",
)
snap.assets += [
Asset(kind=AssetKind.AGENT, id="billing_agent", name="Billing Agent",
owners=["ops-team@example.com"], provider="openai", model_name="gpt-4o"),
Asset(kind=AssetKind.MODEL, id="openai:gpt-4o", name="GPT-4o", provider="openai"),
]
snap.relationships += [
Relationship(kind=RelationshipKind.USES_MODEL,
from_id="billing_agent", from_kind=AssetKind.AGENT,
to_id="openai:gpt-4o", to_kind=AssetKind.MODEL),
]
config = InventoryClientConfig(
api_server_host=os.environ["TRUST3_API_SERVER_HOST"],
api_key=os.environ["TRUST3_API_KEY"],
)
with InventoryClient(config) as client:
result = client.submit(snap)
print(f"pushed {result.assets_pushed} assets, governance HTTP {result.governance_status}")
Set TRUST3_API_SERVER_HOST to your Trust3 API hostname (for example https://api.na.trust3ai.com).
The SDK itself does not read environment variables — pass the value to InventoryClientConfig.
Omit api_server_host entirely to use the North America default; on any other region you must set it
and TRUST3_API_KEY to your governance API key.
Configuration
config = InventoryClientConfig(
api_server_host="https://api.na.trust3ai.com",
api_key="your-trust3-api-key",
)
| field | description |
|---|---|
api_server_host |
Trust3 API server base URL. Defaults to https://api.na.trust3ai.com (North America) — set it explicitly on any other region. |
api_key |
Your Trust3 governance API key |
Error handling
from trust3_ai_collector_sdk.errors import InventoryValidationError, InventoryTransportError
try:
result = client.submit(snap)
except InventoryValidationError as e:
print(f"rejected (HTTP {e.status_code}): {e.response_text}")
except InventoryTransportError as e:
print(f"failed after retries: {e}")
License
Proprietary software. Copyright Privacera, Inc. All rights reserved. Use is subject to your Trust3 AI agreement with Privacera.
Further reading
Metadata
Release files for trust3-ai-collector-sdk 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| trust3_ai_collector_sdk-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for trust3_ai_collector_sdk-0.1.1-py3-none-any.whl |
Release files / trust3_ai_collector_sdk-0.1.1-py3-none-any.whl
| Download URL | trust3_ai_collector_sdk-0.1.1-py3-none-any.whl |
|---|---|
| Size | 21.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3fad0aea45715b60332ee11b088ae04fcf4c48e5e2929a968d398709c0b67a60
|
|
BLAKE2b-256 checksum How to use checksums |
ac3bd956b87e8566223225d30091c95715ce4c92f2b35b885b53ef078fcd5268
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for trust3-ai-collector-sdk 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.