AgentAuth client SDK for Python — authenticate AI agents
Project description
xagentauth
AgentAuth client SDK for Python — authenticate AI agents against any AgentAuth-compatible server.
Installation
pip install xagentauth
With LangChain integration:
pip install xagentauth[langchain]
With CrewAI integration:
pip install xagentauth[crewai]
Quickstart
import asyncio
from xagentauth import AgentAuthClient
async def main():
client = AgentAuthClient(
base_url="https://api.example.com",
api_key="ak_...",
)
# One-call flow: init → get → solve
result = await client.authenticate(
difficulty="medium",
solver=my_solver,
)
print(f"Token: {result.token}")
print(f"Score: {result.score}")
asyncio.run(main())
Step-by-step API
init = await client.init_challenge(difficulty="hard")
challenge = await client.get_challenge(init.id, init.session_token)
# Solve the challenge with your agent
answer = await compute_answer(challenge.payload)
result = await client.solve(init.id, answer, init.session_token)
print(f"Token: {result.token}")
Features
- Async-first with
httpx - Full challenge flow: init → get → solve → verify
- Auto-HMAC computation on solve requests
- AgentAuth response header parsing
- Pydantic models for type safety
- LangChain and CrewAI tool integrations
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
xagentauth-0.1.0.tar.gz
(5.7 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 xagentauth-0.1.0.tar.gz.
File metadata
- Download URL: xagentauth-0.1.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c71c0d3bde11648d5526831b9566b0e464f623be3e192980df2203180c4fbd8
|
|
| MD5 |
217b17a8a68b674c52314a5574835e37
|
|
| BLAKE2b-256 |
4188ff844c305deeda69dad68181d6e456dd2c6622b26a6edfd228a66cc2c545
|
File details
Details for the file xagentauth-0.1.0-py3-none-any.whl.
File metadata
- Download URL: xagentauth-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.4 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 |
feffbc975a837591eadcb1b67f503da3efaa8328f491b4a53ab0a1fd3823c3ed
|
|
| MD5 |
9b4b801f802de718ebf0bacedf30e24c
|
|
| BLAKE2b-256 |
f76a5787ff62722f1ac28d5f937a892206b27cff32b8f78c4cee33973030e510
|