Skip to main content

Official Python SDK for ZeroTrust Agents Control Plane API

Project description

ZeroTrust Agents Python SDK

The official Python SDK for interacting with the ZeroTrust Agents Control Plane.

Installation

pip install zerotrust-agents-sdk

Usage

from zerotrust_agents import ZeroTrustAgents

client = ZeroTrustAgents(api_key="your-master-key")

# Check if an agent is allowed to execute a tool
action = client.policies.check(
    agent_id="my-agent-123",
    tool_name="execute_sql",
    arguments={"query": "SELECT * FROM users"}
)
print(action) # 'allow', 'deny', or 'require_approval'

# Wait for a human to approve an action
if action == "require_approval":
    approval_id = client.approvals.create(
        agent_id="my-agent-123",
        tool_name="execute_sql",
        arguments='{"query": "SELECT * FROM users"}'
    )
    is_allowed = client.approvals.wait(approval_id)
    print("Was approved?", is_allowed)

# Log a tool execution
client.logs.create(
    agent_id="my-agent-123",
    tool_name="execute_sql",
    arguments='{"query": "SELECT * FROM users"}',
    allowed=True
)

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

zerotrust_agents_sdk-0.1.0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

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

zerotrust_agents_sdk-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for zerotrust_agents_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d0d82348c3b020e117e6a2b3af12879bf0bebee69e476b5dfb8961d57ba69be4
MD5 06b60d4ddf5fe95da9143e6cc26a86f4
BLAKE2b-256 0f496644d5137170bfc2e1a53ed46c52aa75d3fe83f18618c337bb7198aa432d

See more details on using hashes here.

Provenance

The following attestation bundles were made for zerotrust_agents_sdk-0.1.0.tar.gz:

Publisher: publish-sdk.yml on lokeshsk/zerotrust-agents

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

File details

Details for the file zerotrust_agents_sdk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for zerotrust_agents_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6564a65e6323d989eb989b2b0520585902f3921c20372f43f39dbc3e892d6fa
MD5 3c3748a9bca314b4682cea1a4bbe4ca4
BLAKE2b-256 e5a8f6b42cb6a980d46cf21567530be8361776e280d1554ea2854f3103fcc485

See more details on using hashes here.

Provenance

The following attestation bundles were made for zerotrust_agents_sdk-0.1.0-py3-none-any.whl:

Publisher: publish-sdk.yml on lokeshsk/zerotrust-agents

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