Skip to main content

Python SDK for Lelu — framework-agnostic authorization engine for AI agents with confidence-aware controls, Docker deployment, and human-in-the-loop workflows

Project description

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

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


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.3.5.tar.gz (28.8 kB view details)

Uploaded Source

Built Distribution

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

lelu_agent_auth_sdk-0.3.5-py3-none-any.whl (28.5 kB view details)

Uploaded Python 3

File details

Details for the file lelu_agent_auth_sdk-0.3.5.tar.gz.

File metadata

  • Download URL: lelu_agent_auth_sdk-0.3.5.tar.gz
  • Upload date:
  • Size: 28.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for lelu_agent_auth_sdk-0.3.5.tar.gz
Algorithm Hash digest
SHA256 9a71db818143567bf01dd96514e09627b0597ccacf70ae0ec2b68782ad1e838d
MD5 e3714a2c251234d037bfa529c8ce7f4a
BLAKE2b-256 6099da7343e5cc3519f627646c194c88c4ac75bb330366de8d9856e50391047f

See more details on using hashes here.

File details

Details for the file lelu_agent_auth_sdk-0.3.5-py3-none-any.whl.

File metadata

File hashes

Hashes for lelu_agent_auth_sdk-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f3d83695bd44a21a18025d846657eb62d7a4a207d210944763ea2d80af98343a
MD5 7efee4526cb4a58661c7814d56bdb339
BLAKE2b-256 691a2ab9750deec8f5aab6a46ed3d99f2294e3d447a778b94663e4b3b663e902

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