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
Metadata
Release files for xagentauth 0.1.0
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 |
|---|---|---|---|---|
| xagentauth-0.1.0.tar.gz | 5.7 kB | Without provenance | Details for xagentauth-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xagentauth-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for xagentauth-0.1.0-py3-none-any.whl |
Total release size: 13.2 kB
Release files / xagentauth-0.1.0.tar.gz
| Download URL | xagentauth-0.1.0.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c71c0d3bde11648d5526831b9566b0e464f623be3e192980df2203180c4fbd8
|
|
BLAKE2b-256 checksum How to use checksums |
4188ff844c305deeda69dad68181d6e456dd2c6622b26a6edfd228a66cc2c545
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / xagentauth-0.1.0-py3-none-any.whl
| Download URL | xagentauth-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
feffbc975a837591eadcb1b67f503da3efaa8328f491b4a53ab0a1fd3823c3ed
|
|
BLAKE2b-256 checksum How to use checksums |
f76a5787ff62722f1ac28d5f937a892206b27cff32b8f78c4cee33973030e510
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for xagentauth 0.1.0
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.