Give an AI agent a verifiable AIDR identity: enroll from code, sign requests, LangChain tools.
pip install aidr-agent==0.1.3 Copy PIP instructions
pip install "aidr-agent[requests]" # add ,langchain for the LangChain tools from aidr_agent import Agent agent = Agent.load_or_enroll("research-01", audiences=["https://shop.example"]) agent.session().get("https://shop.example/products") # signed; other sites get anonymous requests An organisation admin issues an enrollment token in the console (Organisations → Enrollment tokens). Put it in AIDR_ENROLLMENT_TOKEN where the agent runs. The first run generates the key on that machine, enrolls, proves the key and saves the identity; later runs load it. The token is then no longer needed. Requests to the agent's allowed sites carry an RFC 9421 signature and a short-lived credential. Anything else goes out unsigned, or is refused with on_unlisted="refuse". Plain http is never signed, except to localhost. Python 3.10+. Extras: requests (for agent.session() / agent.auth()), langchain (the tools, on langchain-core), langchain-community (the RequestsToolkit wrapper). It installs aidr-crypto and aidr-core, the same signing code the registry runs.
A container that starts with an empty disk would enroll a new agent on every start and spend a use of the token each time: use AIDR_AGENT_IDENTITY there.
from aidr_agent.langchain import aidr_http_tools tools = aidr_http_tools(agent) # http_get, http_post: signed, and limited to the agent's sites The tools reach only the origins they are given (by default the agent's allowed audiences). An LLM choosing URLs is how a prompt-injected agent would present its identity somewhere it should not, or reach internal addresses. For code still on langchain-community's RequestsToolkit, signed_requests_wrapper(agent) is a drop-in TextRequestsWrapper that signs, sync and async. langchain-community is being sunset, so new code should use the tools.
aidr-agent enroll --name research-01 --audience https://shop.example aidr-agent whoami --name research-01 (python -m aidr_agent … is the same command.)
The token is read only from AIDR_ENROLLMENT_TOKEN, never from the command line.
ai-agents aiaf aidr identity langchain rfc9421
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
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.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.




