Skip to main content

Nomos Python SDK — capability layer for AI agents (scoped, time-bound, revocable, delegable permissions for MCP / LangGraph / CrewAI / AutoGen)

Project description

auto-nomos-sdk (Python)

Python SDK for Nomos — multi-agent orchestration security.

Mirrors the TS SDK so LangGraph / CrewAI / AutoGen orchestrators get the same chain-aware authorize / proxy story.

Install

pip install auto-nomos-sdk

You also need the nomos-ucan CLI on PATH for UCAN minting:

npm install -g @auto-nomos/ucan-cli

Use — root agent

from nomos import AuthGuard

guard = AuthGuard(api_key="nomos_<id>_<secret>", pdp_url="https://pdp.example.com")
decision = guard.authorize(
    ucan="<jwt>",
    command="github:repo:read",
    resource={"repo": "org/test-repo"},
)
if decision.allow:
    ...

Use — fork a child agent (LangGraph / CrewAI / AutoGen)

import subprocess, os, json
from nomos import fork_child, read_parent_chain_from_env

# Inside the parent agent (already authorized once and got a child UCAN
# minted via nomos-ucan or via the control-plane mint endpoint):
chain, env = fork_child(
    parent_chain=read_parent_chain_from_env().chain,
    child_ucan_jwt=child_jwt,
    parent_receipt_id=last_receipt_id,
    swarm_id=swarm_id,
)
subprocess.Popen(["python", "child_agent.py"], env={**os.environ, **env})

The child process's AuthGuard() automatically picks up NOMOS_PARENT_UCAN_CHAIN and includes the full root → leaf chain on every authorize / proxy call.

Env vars (orchestrator-agnostic wire format)

Var Purpose
NOMOS_PARENT_UCAN_CHAIN JSON UCAN array (root-first).
NOMOS_PARENT_UCAN_CHAIN_FILE Fallback file path when env exceeds OS limits.
NOMOS_PARENT_RECEIPT_ID Causation back-link to parent's last receipt.
NOMOS_SWARM_ID Explicit swarm id; PDP otherwise derives.
NOMOS_MAX_CHAIN_DEPTH Override depth cap; default 8.
NOMOS_UCAN_BIN Path to nomos-ucan binary; default nomos-ucan on PATH.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nomos_sdk-0.1.1.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nomos_sdk-0.1.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file nomos_sdk-0.1.1.tar.gz.

File metadata

  • Download URL: nomos_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nomos_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d66e16eabe42c4d25ca7fd6a8ff135e4ccd8b46d51b0c55f9ed43431ee4534a8
MD5 e873ba8e6749da58fea94264cc2ea1f4
BLAKE2b-256 bc1f1461e300374075ae0ae2f53ea4a1e2c3b04cb1c55380829d60b0708db336

See more details on using hashes here.

Provenance

The following attestation bundles were made for nomos_sdk-0.1.1.tar.gz:

Publisher: release-sdk.yml on auto-nomos/python-packages

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nomos_sdk-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: nomos_sdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nomos_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7649ee731e25d9df43b51b9b36c2aec6ee6242b86941db211aed1ed00f2e4fa2
MD5 caba2e89286d45b50fd3262cc70c9f4d
BLAKE2b-256 027c14ba8899892afcab453a3b017110410784140f3f62f9d51929e5ae569745

See more details on using hashes here.

Provenance

The following attestation bundles were made for nomos_sdk-0.1.1-py3-none-any.whl:

Publisher: release-sdk.yml on auto-nomos/python-packages

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page