pytrat-agents
Experimental. The AI-agent profile of Transaction Tokens for PyTraT,
implementing draft-araut-oauth-transaction-tokens-for-agents-03, an individual Internet-Draft not
adopted by the OAuth working group. The API may change with every draft revision.
agentic_ctxcomputation with monotonic attenuation: the originator never changes,hop_countonly rises, the chain's minimum assurance only falls.- The trusted Agent Attribute Store (
YamlAgentStore,SqliteAgentStore,InMemoryAgentStore). - Resource-side agent-chain requirements.
ToolRuntime, a trusted tool runtime that keeps tokens and exchange capabilities away from the model, validates tool arguments strictly and blocks token-shaped tool results.
pip install pytrat-agents
from pytrat.agents import AgentRecord, InMemoryAgentStore, ToolRuntime
agent = AgentRecord(id="report-agent", name="Report agent", owner="finance", assurance_level="high",
version="2.4.1", provenance="sha256:...")
runtime = ToolRuntime(agent=agent, token_provider=provider, store=InMemoryAgentStore([agent]),
audit=sink)
@runtime.protected_tool(scope="reports.read", resource="reports-api")
def get_report(report_id: str) -> dict[str, str]:
"""Fetch one report.""" # never receives the token
...
An in-process decorator is not an isolation boundary. If the model can execute code in the same process, it can reach the token provider. Run the runtime in a separate process or sidecar.
Documentation
PyTraT documentation: Agents (experimental) and the pytrat.agents API reference (sources in
docs/ of the repository).
Apache-2.0.
Metadata
Release files for pytrat-agents 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytrat_agents-0.1.0.tar.gz | 38.8 kB | Without provenance | Details for pytrat_agents-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytrat_agents-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pytrat_agents-0.1.0-py3-none-any.whl |
Total release size: 66.9 kB
Release files / pytrat_agents-0.1.0.tar.gz
| Download URL | pytrat_agents-0.1.0.tar.gz |
|---|---|
| Size | 38.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1a7d1933b3817b7c8fffe2c560e690f6b8d3bea4ac516c1ab54966af1a17d5e
|
|
BLAKE2b-256 checksum How to use checksums |
a2fb324ea58000403306163f67bd243a58adb9b9f28a46619f45391f2faa7ab9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / pytrat_agents-0.1.0-py3-none-any.whl
| Download URL | pytrat_agents-0.1.0-py3-none-any.whl |
|---|---|
| Size | 28.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
251fdf314a6079430091da2501fa5b2b4270c9a88e214dc9d3df2dc973cbbfa2
|
|
BLAKE2b-256 checksum How to use checksums |
1ad823e60619c8a7e6976ba8ec324b95df224b9ae03cdc90b11b7e2b8da9d733
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for pytrat-agents 0.1.0
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.