Python SDK for Lelu — the confidence-aware authorization engine for autonomous AI agents
Project description
Lelu · Python SDK
Python client for Lelu — the confidence-aware authorization engine for autonomous AI agents.
Installation
pip install lelu-agent-auth-sdk
Quick start
import asyncio
from lelu import LeluClient, AgentAuthRequest, AgentContext
async def main():
async with LeluClient(base_url="http://localhost:8082") as client:
result = await client.agent_authorize(AgentAuthRequest(
actor="invoice_bot",
action="invoice:create",
context=AgentContext(
confidence=0.92,
acting_for="user_123",
),
))
print(result.allowed, result.reason)
asyncio.run(main())
API
| Method | Description |
|---|---|
agent_authorize(req) |
Confidence-aware agent authorization |
authorize(req) |
Human RBAC authorization |
mint_token(req) |
Mint a JIT-scoped JWT |
revoke_token(token_id) |
Revoke a token immediately |
is_healthy() |
Health-check the engine |
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lelu_agent_auth_sdk-0.1.0.tar.gz
(12.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lelu_agent_auth_sdk-0.1.0.tar.gz.
File metadata
- Download URL: lelu_agent_auth_sdk-0.1.0.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9015b235ae3e5a8de7de98551b3766c85b4308294e38b58dfb125c1a456b4866
|
|
| MD5 |
93857491b6dcea4637676f6d0839d195
|
|
| BLAKE2b-256 |
e78ad14f2edfb28f9d4f0da8142d24e3dd7bc0738db950c0b2e0585c0ba24ec1
|
File details
Details for the file lelu_agent_auth_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: lelu_agent_auth_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
085e8f4a7f0cad3e7f397edd9228abd6cbdb958cec8bce46f1384a62343dce24
|
|
| MD5 |
25df681abe2c06393d7a5d388f1b7933
|
|
| BLAKE2b-256 |
458d0b3c8cd0c1e72bb38be96048a5f3d9b482635bb533f09a27b0a8ed020c85
|