Skip to main content

Tenuo for NVIDIA NeMo Agent Toolkit

Provider-owned Agent Toolkit middleware that checks a Tenuo warrant before a function runs. Unauthorized calls stop before call_next, so protected function code never receives them.

This package is the in-process Agent Toolkit integration. The OpenShell supervisor middleware at the repository root is the independent enforcement point for MCP traffic that leaves the sandbox. Use both: the plugin catches calls early, with readable errors, and the middleware enforces at the network boundary.

Install

Install the published plugin into the same environment as Agent Toolkit. PyPI is the recommended installation path:

pip install nemo-agent-toolkit-tenuo
nat info components

The package metadata selects a compatible Agent Toolkit range. Current source is tested with Agent Toolkit 1.8 and 1.9. Use the checkout path below only when testing support that has not reached the latest PyPI release.

To install from a checkout instead, run this from the repository root:

uv sync --locked --project python/nemo-agent-toolkit-tenuo --extra test
uv run --locked --project python/nemo-agent-toolkit-tenuo nat info components

For an existing environment, an editable or regular local install also works:

python -m pip install ./python/nemo-agent-toolkit-tenuo

The package uses NVIDIA's third-party plugin convention:

Surface Value
Distribution nemo-agent-toolkit-tenuo
Import nat.plugins.tenuo
Entry point nat_tenuo
Middleware _type tenuo

For a runnable ReAct workflow with an approval step, see the Agent Toolkit example. That example protects MCP calls with the signing proxy. This plugin is the path for native Agent Toolkit functions; the integration guide explains how the two compose.

Bind task authority

Bind authority in application-controlled task scope. Do not accept a warrant or holder key from model-generated function arguments.

from nat.plugins.tenuo import authority

with authority(warrant.bind(holder)):
    result = await workflow.ainvoke(input)

holder is the task's signing key and must match the leaf holder named by the warrant. For a local-only smoke test, application code can mint both with the public Tenuo API:

from tenuo import SigningKey, Warrant

holder = SigningKey.generate()
warrant = Warrant.mint_builder().tool("read_logs").ttl(300).mint(holder)

In production, bind the short-lived warrant issued for the authenticated task or end user. Do not mint broad authority inside the agent process. See Production issuance.

The binding follows Python context propagation, including async tasks created inside the block. The middleware does not write MCP _meta.tenuo; use Tenuo's SecureMCPClient when the same authority must cross an MCP boundary.

That authority is not tied to Agent Toolkit. The same warrant can be verified again by the OpenShell middleware, an MCP server, an A2A worker, or another supported agent runtime, so delegation does not require translating authority into a new framework-specific policy.

Configure middleware

middleware:
  task_authorization:
    _type: tenuo
    trusted_roots:
      - "<64 hex characters of a 32-byte issuer public key>"

functions:
  read_logs:
    _type: read_logs
    middleware: [task_authorization]

trusted_roots selects accepted issuers and cannot be empty. A denied call raises AuthorizationDenied; a call needing a signed approval raises ApprovalRequired, which subclasses it. The middleware is not final, so later middleware continues after an allow.

With nat run and MCP tools

nat run and other front ends run no application code around the workflow, so nothing binds a task's warrant. In an OpenShell sandbox with the Tenuo agent, the middleware can read the warrant and holder key that tenuo-openshell provision installed:

middleware:
  task_authorization:
    _type: tenuo
    trusted_roots: ["${TENUO_TRUSTED_ROOT}"]
    warrant_file: ${HOME}/.tenuo/warrant
    holder_key_file: ${HOME}/.tenuo/holder.key
    strip_function_group: true
    approval_required: defer

function_groups:
  ops:
    _type: mcp_client
    server:
      transport: streamable-http
      url: http://127.0.0.1:7415/mcp
    middleware: [task_authorization]
Option Default Effect
warrant_file, holder_key_file unset Read on every call when no authority() binding is active. A binding takes precedence. Both or neither.
strip_function_group false Check a function group's function by its name in the group (read_logs), not NAT's qualified name (ops__read_logs), so a warrant that names MCP tools applies. Use it only on MCP function groups: it drops the first group__ prefix and trusts the rest, so on other functions other__read_logs would be checked as read_logs.
approval_required raise defer hands a call that needs an approval to the next stage instead of raising ApprovalRequired. Use it only when that stage enforces approvals itself, as tenuo-openshell-agent proxy and the OpenShell middleware do: the proxy records the request for an approver. Calls the warrant does not allow still stop here. A deferred call that reaches a server which does not check warrants runs without an approval.

A NeMo Agent Toolkit agent in an OpenShell sandbox runs this configuration.

Compatibility and verification

Tested with Python 3.11–3.13, nvidia-nat-core 1.8.x and 1.9.x, and Tenuo 0.3.x. The locked environment uses Agent Toolkit 1.9. Run its tests and distribution build with:

uv run --locked --project python/nemo-agent-toolkit-tenuo --extra test \
  pytest python/nemo-agent-toolkit-tenuo/tests -q
uv build --project python/nemo-agent-toolkit-tenuo

To run the same tests and nat info components discovery against Agent Toolkit 1.8 in a fresh environment:

ci/nat-compat.sh 1.8

See the repository security policy before reporting a vulnerability and release guide for the publication gate.

License

Apache-2.0.

Metadata

Release files for nemo-agent-toolkit-tenuo 0.1.6

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

Source distribution (sdist)

Source distribution for nemo-agent-toolkit-tenuo 0.1.6
File Size Uploaded
nemo_agent_toolkit_tenuo-0.1.6.tar.gz 153.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nemo-agent-toolkit-tenuo 0.1.6
File Interpreter ABI Platform
nemo_agent_toolkit_tenuo-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 166.1 kB

Release files / nemo_agent_toolkit_tenuo-0.1.6.tar.gz

Download URL nemo_agent_toolkit_tenuo-0.1.6.tar.gz
Size 153.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a84ba16f227ed9f5172572707692818effdf782c3a4551fda21a7fdb3af20aee
BLAKE2b-256 checksum
How to use checksums
f5c090f56ae04415b58051fabe512b56b1ae170645da88e292d4b8573d86ef8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / nemo_agent_toolkit_tenuo-0.1.6-py3-none-any.whl

Download URL nemo_agent_toolkit_tenuo-0.1.6-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
387e184bcb6f6c309a8be9964d5a6f6d67e4f64774987a47159a5be6aabcf094
BLAKE2b-256 checksum
How to use checksums
3c710178262992a9eea5d1cab7273da4909aea4acc1a3e93b0460790752a30c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

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