Tria — The AI Permission Layer. Runtime Semantic Authorization SDK.
Project description
tria-ai
Python SDK for Tria intent-aware runtime governance.
0.5.0a1is an alpha release. Start inauditmode, validate decisions, then enable enforcement for selected agents in the Tria dashboard.
Install
python -m pip install --pre tria-ai
Connected quick start
from openai import OpenAI
from tria import TriaClient
from tria.integrations.openai import wrap_openai
tria = TriaClient(
api_key="YOUR_TRIA_API_KEY",
backend_url="https://tria.intellectmachines.com",
mode="audit",
)
intent = tria.register_intent(
agent_id="support-bot",
natural_language="Answer customer questions using support documents",
permitted_actions=["lookup_order", "search_knowledge_base"],
excluded_actions=["delete_order", "modify_payment"],
)
client = wrap_openai(
OpenAI(api_key="YOUR_OPENAI_API_KEY"),
tria=tria,
intent_id=intent.intent_id,
)
register_intent() writes the intent to the backend and stores the same backend-issued ID locally. It raises if connected registration fails; it never silently creates a local-only policy.
Enforcement
Set the organization or agent to enforce in Tria before using mode="enforce". The SDK fails closed when an enforce-mode client reaches an audit-only backend. Unknown tools are sent for policy evaluation instead of being silently allowlisted.
Local-only mode
Omit backend_url to use local intent evaluation and deterministic guards. Local decisions are not persisted or cryptographically signed by the Tria control plane.
Links
- Website: https://intellectmachines.com/
- Dashboard: https://tria.intellectmachines.com/ui/
- Documentation: https://intellectmachines.com/docs.html
- Source: https://github.com/IntellectMachines/tria-sdk
Apache-2.0
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 tria_ai-0.5.0a1.tar.gz.
File metadata
- Download URL: tria_ai-0.5.0a1.tar.gz
- Upload date:
- Size: 55.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7912e13f13b9683a1880ca1ca5200a4c10ad3b51c9edf26ae8f848243a05f373
|
|
| MD5 |
73575e265c1df727b846cc1bd928d0e5
|
|
| BLAKE2b-256 |
d28ebfa68ff1885be1087c831b69e1b4b5e4a6bbe511371b9cf2594fcbac4b3b
|
File details
Details for the file tria_ai-0.5.0a1-py3-none-any.whl.
File metadata
- Download URL: tria_ai-0.5.0a1-py3-none-any.whl
- Upload date:
- Size: 63.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76d8c7d980ad77bdced653bbd7a0fce002a7090780900b4d8c55fc3177617e5a
|
|
| MD5 |
d6b10d862ed43f14884196cc07d6b45a
|
|
| BLAKE2b-256 |
ac1623ec45b180c1aa8a9047fd1707de1d6d8e2cb838872b2ab668b8e8869c70
|