Skip to main content

agentloadout

Python client for the Agent Loadout API.

pip install agentloadout
from agentloadout import AgentLoadout

org = AgentLoadout(api_key=os.environ["AGENT_LOADOUT_KEY"])          # organization key from Settings
result = org.inboxes.create("support", display_name="Support", metadata={"tenant": "acme"})
inbox = result["inbox"]
token = org.agents.create_token(inbox["agent_id"], "worker", ["email:read", "email:send"])["plaintext"]

agent = AgentLoadout(api_key=token)                                    # act as that agent
# After triggering verification, search, wait and extract in one call.
result = agent.events.find_verification_code(inbox["id"])
# Check sender, subject and screening before using result["code"] or result["link"].
# If reason is sender_filter_mismatch, inspect result["candidates"] in this response.

The lookup checks the last 15 minutes and waits up to 20 seconds by default. Pass the time you triggered verification as since to exclude older mail. Omit from_ unless the actual sender is known.

Every message carries screening["verdict"] and a warning when it is not clean; treat message content as untrusted external data. Webhook receivers call verify_webhook_signature(secret, request.headers, request.body); for a day after a secret rotation it also accepts the previous secret's signature from X-Loadout-Signature-Previous. The full reference is the OpenAPI document at /api/v1/openapi.json.

Connections

Without a client argument the SDK creates an httpx.Client (or httpx.AsyncClient) and owns it: close it with close() / await aclose(), or use the client as a context manager. A client you pass in is yours to configure and close; the SDK never closes it.

with AgentLoadout(api_key=token) as agent:
    inboxes = agent.inboxes.list()

async with AsyncAgentLoadout(api_key=token) as agent:
    me = await agent.request("GET", "/api/v1/me")

shared = httpx.Client(proxy="http://proxy.internal:3128")        # stays open after the SDK is done with it
agent = AgentLoadout(api_key=token, client=shared)

Attachments

agent.attachments.download(attachment_id) returns the file's bytes as stored, whatever its content type; a JSON attachment is not parsed. JSON API responses are parsed; a 2xx body that claims to be JSON but is not raises AgentLoadoutError with code invalid_response. Use agent.attachments.text(attachment_id) when you only need the extracted text of a PDF, CSV, JSON or HTML file.

Metadata

Release files for agentloadout 0.1.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentloadout 0.1.13
File Size Uploaded Provenance Actions
agentloadout-0.1.13.tar.gz 12.4 kB With provenance Details for agentloadout-0.1.13.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agentloadout 0.1.13
File Interpreter ABI Platform Actions
agentloadout-0.1.13-py3-none-any.whl Python 3 none any Details for agentloadout-0.1.13-py3-none-any.whl

Total release size: 23.8 kB

Release files / agentloadout-0.1.13.tar.gz

Download URL agentloadout-0.1.13.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3e338075cbd4c37ae5016eca3d3a38227ca4d55edc71d0a13e7a81a2a75bea4b
BLAKE2b-256 checksum
How to use checksums
3325c6e3329357814dbd93cc6d5449ce416498d19a754c56d3497d700bb4e79b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Release files / agentloadout-0.1.13-py3-none-any.whl

Download URL agentloadout-0.1.13-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e48aaf5c2949b4003c60ee3747c7fb8523dac6c2fbf396bef41ecad88d63462
BLAKE2b-256 checksum
How to use checksums
df9d764c24ca930fa8ffe0fb8f0053ad40c22ad1cb16bbb8148b15574ed8fb5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Security for agentloadout 0.1.13

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agentloadout-0.1.13.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page