Metadata-Version: 2.5
Name: humanless-agent-tools
Version: 0.1.0
Summary: Identity for AI agents: framework-agnostic Humanless tools (email inboxes with parsed OTP codes and magic links, TOTP, authenticator import and backup codes, for apps you own or are authorized to test). Shared core of langchain-humanless, llama-index-tools-humanless and crewai-humanless.
Project-URL: Homepage, https://usehumanless.com
Project-URL: Documentation, https://usehumanless.com/docs
Project-URL: Source, https://github.com/usehumanless/integrations/tree/main/python-agent-frameworks/packages/humanless-agent-tools
Author-email: Ninety Nine Oranges <hello@usehumanless.com>
License-Expression: MIT
License-File: LICENSE
Keywords: 2fa,ai-agents,email,humanless,identity,magic-link,otp,tools,totp
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Testing
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx<1,>=0.24
Requires-Dist: humanless<0.2,>=0.1.1
Requires-Dist: pydantic<3,>=2.7
Description-Content-Type: text/markdown

# humanless-agent-tools

**Identity for AI agents.** Framework-agnostic tool definitions for [Humanless](https://usehumanless.com): email inboxes with parsed OTP codes and magic links, TOTP, authenticator import (QR / otpauth) and backup codes. It wraps the [`humanless`](https://pypi.org/project/humanless/) Python SDK and is the shared core of:

- [`langchain-humanless`](https://pypi.org/project/langchain-humanless/) (LangChain / LangGraph)
- [`llama-index-tools-humanless`](https://pypi.org/project/llama-index-tools-humanless/) (LlamaIndex)
- [`crewai-humanless`](https://pypi.org/project/crewai-humanless/) (CrewAI)

Use it directly for any other framework, or for raw function calling: each `ToolDef` has a `name`, `description` and pydantic `args_schema` (`args_schema.model_json_schema()` is a ready JSON Schema).

```python
from humanless_agent_tools import HumanlessAgentClient, TOOLS

client = HumanlessAgentClient()  # reads HUMANLESS_API_KEY
r = TOOLS["create_verification_identity"].run(client, {"channels": ["email", "totp"]})
print(r.text)   # what the model reads
print(r.data)   # the API's JSON
```

`run()` validates arguments and never raises for API errors: it returns `ToolResult(is_error=True, text="Error 404 identity_not_found: ...")`.

## Tools

| Tool | What it does |
|---|---|
| `create_verification_identity` | New disposable email inbox and/or TOTP secret (`channels`: `email`, `totp`) |
| `wait_for_verification_code` | Block until the next email arrives; returns the parsed OTP code and/or magic link |
| `get_totp_code` | Current TOTP code (identity secret, or an imported authenticator by `authenticator_id` / `issuer`) |
| `enroll_authenticator` | Import a site's 2FA setup from an `otpauth://` URI, base32 setup key or QR image (base64) |
| `list_authenticators` | Imported authenticators (never secrets) |
| `get_authenticator_code` | Current (and near rollover, next) code of an imported authenticator |
| `store_backup_codes` / `use_backup_code` | Save a site's recovery codes; hand them out one at a time |
| `revoke_authenticator` | Destroy an imported authenticator and its backup codes |
| `delete_verification_identity` | Delete an identity when done |
| `list_identities` | Identities this key can use |

Names and descriptions match the Humanless remote MCP server (`https://api.usehumanless.com/mcp`). Pick a subset with `include=[...]` / `exclude=[...]`. Prefer a scoped per-agent key (`POST /v1/keys` with `scope="identities"`); every call shows up in the account audit log.

**Try it free:** `POST https://api.usehumanless.com/v1/sandbox/keys` mints a 1-hour sandbox key (email/TOTP only, at most 5 identities, only receives mail from the demo app at https://api.usehumanless.com/demo/acme). Each package has a `from_sandbox()` / `sandbox=True` helper.

## Use policy

Use Humanless only for apps and accounts you own or are authorized to use or test. Never create bulk or fake accounts, and never use it to bypass someone else's verification.
