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.0.tar.gz (9.4 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.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nomos_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 9.4 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.0.tar.gz
Algorithm Hash digest
SHA256 0b506133ebc58c987a13b810ea35a8b52b933fcb99623b4e7a58d9e1f065d4ea
MD5 7f097308a75a560b9c4aab2baabd5a7a
BLAKE2b-256 7e8e655c7aab36a8b531ecda6b3e4b389ef1e70405d7c3327d4e81ad0d053130

See more details on using hashes here.

Provenance

The following attestation bundles were made for nomos_sdk-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: nomos_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e595045ba3bcdda5ffee1e3c6f3fd23126b32d80e02192629e7229220cbf404
MD5 1818d0bf14f62fa15b85ed26b206bb82
BLAKE2b-256 91ba46f5f67a082f222a856ae196fc9500826be4136322450169110a8f39c36e

See more details on using hashes here.

Provenance

The following attestation bundles were made for nomos_sdk-0.1.0-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