Lelu · Python SDK
Python client for Lelu — the confidence-aware authorization engine for autonomous AI agents.
Author: Abenezer Getachew
Installation
pip install lelu-agent-auth-sdk
Or run the public Lelu engine image:
docker pull abenezer0923/lelu-engine:latest
docker run --rm -p 8083:8080 abenezer0923/lelu-engine:latest
Quick start
Option 1: Use Hosted Engine (Recommended)
Connect to the hosted Lelu engine for instant setup:
import asyncio
from lelu import LeluClient, AgentAuthRequest, AgentContext
async def main():
async with LeluClient(base_url="https://lelu-engine.onrender.com") 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())
Option 2: Run Locally
For development, you can run the engine locally:
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())
Start the local engine with Docker:
docker compose up -d
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
Metadata
Release files for lelu-agent-auth-sdk 0.3.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lelu_agent_auth_sdk-0.3.6.tar.gz | 29.1 kB | Without provenance | Details for lelu_agent_auth_sdk-0.3.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lelu_agent_auth_sdk-0.3.6-py3-none-any.whl | Python 3 | none | any | Details for lelu_agent_auth_sdk-0.3.6-py3-none-any.whl |
Total release size: 57.7 kB
Release files / lelu_agent_auth_sdk-0.3.6.tar.gz
| Download URL | lelu_agent_auth_sdk-0.3.6.tar.gz |
|---|---|
| Size | 29.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
77ddf7fdeeb148d80cd193080c92302ba0901f13c7ef45a4c42ea36cf4e0ff59
|
|
BLAKE2b-256 checksum How to use checksums |
d0f77778797b596aecb6a445dd9e29b7eea7ae56d1875c933e5206d0aa482005
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / lelu_agent_auth_sdk-0.3.6-py3-none-any.whl
| Download URL | lelu_agent_auth_sdk-0.3.6-py3-none-any.whl |
|---|---|
| Size | 28.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cba72e05bdde6c1d7d7ab922e1dd6d6647fb8ac5746be9d85bd1c5701d1e1a4c
|
|
BLAKE2b-256 checksum How to use checksums |
6c7c39b91ff7d062a806521a5b2ad8488696138fe47175e27034b9eafcb715de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Security for lelu-agent-auth-sdk 0.3.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.