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

agentauthlayer 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 agentauthlayer

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 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.

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.1.tar.gz (30.3 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.1-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentauthlayer-0.1.1.tar.gz
  • Upload date:
  • Size: 30.3 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.1.tar.gz
Algorithm Hash digest
SHA256 25c2b0414888518cf175cfa3bf3df87e7efb0bf649d7f7f6675755e62b6e6e9d
MD5 81e714aad722e33a9ef14b378451f80f
BLAKE2b-256 fa2593e33a1e45098b65625ad24d9946eae23c81c9b3d678911467599aac3bd5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agentauthlayer-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 27.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4b9b871bd8b352d42994fafff044eb8c00ea71b0500ffc462b6f060b3ca23290
MD5 f6f8da5d9f2456249872aa2d947dac7a
BLAKE2b-256 8dccefbc046210220ba92f2afec4fac9d63d7ec7f5a3b562376214200b54b785

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