Metadata-Version: 2.5
Name: llama-index-tools-humanless
Version: 0.1.0
Summary: Identity for AI agents: Humanless tool spec for LlamaIndex (email inboxes with parsed OTP codes and magic links, TOTP, authenticator import and backup codes, for apps you own or are authorized to test).
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/llama-index-tools-humanless
Author-email: Ninety Nine Oranges <hello@usehumanless.com>
Maintainer: humanless
License-Expression: MIT
License-File: LICENSE
Keywords: 2fa,ai-agents,humanless,identity,llama-index,otp,tools,totp
Requires-Python: <4.0,>=3.11
Requires-Dist: humanless-agent-tools<0.2,>=0.1.0
Requires-Dist: humanless<0.2,>=0.1.1
Requires-Dist: llama-index-core<0.15,>=0.13.0
Description-Content-Type: text/markdown

# LlamaIndex Tools Integration: Humanless

**Identity for AI agents.** [Humanless](https://usehumanless.com) gives agents email inboxes with parsed OTP codes and magic links, TOTP, authenticator import (QR / otpauth / setup key) and backup codes, so an agent can finish sign-up, login and 2FA on apps you own or are authorized to test.

```bash
pip install llama-index-tools-humanless
export HUMANLESS_API_KEY=hl_live_...   # prefer a scoped per-agent key
```

## Usage

```python
from llama_index.tools.humanless import HumanlessToolSpec
from llama_index.core.agent.workflow import FunctionAgent

spec = HumanlessToolSpec()             # or HumanlessToolSpec(api_key="hl_live_...")
agent = FunctionAgent(tools=spec.to_tool_list(), llm=llm)   # llm: any function-calling LLM
response = await agent.run("Create an inbox, sign up at https://staging.example.com and verify the email.")
```

Each tool returns the text the model reads; API errors come back as `Error <status> <code>: ...` so the agent can recover.

## 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. `HumanlessToolSpec.from_sandbox()`.

## 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.
