Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

tria-ai

Python SDK for Tria intent-aware runtime governance.

0.5.0a1 is an alpha release. Start in audit mode, 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

Apache-2.0

Release files for tria-ai 0.5.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tria-ai 0.5.0a1
File Size Uploaded
tria_ai-0.5.0a1.tar.gz 55.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tria-ai 0.5.0a1
File Interpreter ABI Platform
tria_ai-0.5.0a1-py3-none-any.whl Python 3 none any Details

Total release size: 118.5 kB

Release files / tria_ai-0.5.0a1.tar.gz

Download URL tria_ai-0.5.0a1.tar.gz
Size 55.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7912e13f13b9683a1880ca1ca5200a4c10ad3b51c9edf26ae8f848243a05f373
BLAKE2b-256 checksum
How to use checksums
d28ebfa68ff1885be1087c831b69e1b4b5e4a6bbe511371b9cf2594fcbac4b3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / tria_ai-0.5.0a1-py3-none-any.whl

Download URL tria_ai-0.5.0a1-py3-none-any.whl
Size 63.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76d8c7d980ad77bdced653bbd7a0fce002a7090780900b4d8c55fc3177617e5a
BLAKE2b-256 checksum
How to use checksums
ac1623ec45b180c1aa8a9047fd1707de1d6d8e2cb838872b2ab668b8e8869c70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release history Release notifications | RSS feed

This release

0.5.0a1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page