Metadata-Version: 2.4
Name: agentauthlayer
Version: 0.1.0
Summary: Library-first authentication and authorization SDK for AI agents
Author: Vaibhav Ahluwalia
License: MIT
Project-URL: Homepage, https://github.com/VaibhavAhluwalia/Agent-Auth-
Project-URL: Repository, https://github.com/VaibhavAhluwalia/Agent-Auth-
Keywords: agents,auth,authorization,iam,security,sdk
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.31.0
Requires-Dist: python-jose>=3.3.0

# 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

```bash
pip install agent-auth-sdk
```

For local development:

```bash
pip install -e .
```

## Quickstart

```python
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:

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

Then:

```python
from agent_auth import AuthAPIClient

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

## Common capabilities

### Sync tools from code

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

### Evaluate access

```python
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:

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

## Repository

- Source: <https://github.com/VaibhavAhluwalia/Agent-Auth->
