Skip to main content

Library-first authentication and authorization SDK for AI agents

Project description

Agent Auth SDK

A library-first authentication and authorization SDK for AI agents.

What this package is

agent-auth-sdk is the reusable Python SDK layer of the Agent Auth platform. It is designed for developers who want to:

  • register agents
  • issue and verify access with the Agent Auth control plane
  • sync tool definitions
  • evaluate permissions
  • embed policy enforcement into agent runtimes

This package is the developer-facing library, not the full FastAPI server or React admin UI.

Install

pip install agent-auth-sdk

For local development:

pip install -e .

Quickstart

from agent_auth import AuthAPIClient

client = AuthAPIClient(
    base_url="http://127.0.0.1:8002",
    token="YOUR_ADMIN_OR_SERVICE_TOKEN",
)

agent = client.create_agent(
    agent_id="research-bot-01",
    name="Research Bot 01",
    owner="vaibhav@company.com",
    role="research_agent",
    scopes=[],
    project_id="ai-platform",
)

print(agent)

Environment variables

If you prefer, the SDK reads these automatically:

export AGENT_AUTH_URL=http://127.0.0.1:8002
export AGENT_AUTH_TOKEN=YOUR_ADMIN_OR_SERVICE_TOKEN

Then:

from agent_auth import AuthAPIClient

client = AuthAPIClient()
print(client.health())

Common capabilities

Sync tools from code

client.sync_tools([
    {"action": "tool.search_web", "description": "Search the web"},
    {"action": "docs.read", "description": "Read protected docs"},
])

Evaluate access

decision = client.evaluate(
    principal_id="research-bot-01",
    action="tool.search_web",
    resource="web/*",
    role="research_agent",
)

print(decision)

Package scope

This package currently exposes the reusable SDK and policy primitives under agent_auth/. The full control plane server, admin UI, and demos remain in the same repository but are not part of the SDK package build.

Dev-ready validation checklist

Before publishing, verify:

pip install -e .
python -c "import agent_auth; print(agent_auth.__all__)"
python -m build
pip install dist/*.whl

Repository

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

agentauthlayer-0.1.0.tar.gz (30.5 kB view details)

Uploaded Source

Built Distribution

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

agentauthlayer-0.1.0-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentauthlayer-0.1.0.tar.gz
  • Upload date:
  • Size: 30.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for agentauthlayer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bd3246121898f68f30c8f18b915934cd365207d64829b1e19952ecd89ad08f2c
MD5 27a5b7ddd5686438de0edcaaf6b43741
BLAKE2b-256 b46e52f111d5aabd9d88eac55023f0212b44ba54502bb9a1c1721b4fb1e267ec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agentauthlayer-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 27.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for agentauthlayer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dcb5351bbab4db20dd635327ec426ae1d0852b5ec5ee9062a9435d7f94e0210b
MD5 de8c7fe9266155cf32d8b9c5da5076bb
BLAKE2b-256 6aeed8c1403ee063fb3aaf5a65e1340f94bcbb63206af63d9adae69fc8f71cba

See more details on using hashes here.

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