langchain-ai2human
LangChain tools for the AI2Human human execution and verification loop:
task → human execution → proof → verify → settle
Use this integration when an agent workflow reaches a reality-bound step such as local verification, physical evidence collection, an identity-bound action, an errand, or a compliance check.
Install
pip install langchain-ai2human
Set the agent key issued at ai2human.io/developers/api-keys:
export AI2HUMAN_API_KEY="YOUR_KEY"
Toolkit
from langchain_ai2human import AI2HumanClient, AI2HumanToolkit
client = AI2HumanClient()
tools = AI2HumanToolkit(client=client).get_tools()
The toolkit includes:
ai2human_list_categories: discover supported task categories and proof types.ai2human_create_task: create a human-execution task.ai2human_check_task: check execution and verification status.ai2human_get_proof: retrieve structured proof and settlement context.
Tool descriptions tell the model when human escalation is appropriate. Proof submission and task verification remain distinct from economic settlement; callers should only treat a task as settled when a payment receipt is recorded.
Minimal direct client example
from langchain_ai2human import AI2HumanClient
client = AI2HumanClient()
task = client.create_task({
"title": "Check the posted menu price for a Tall Americano",
"description": "Visit Starbucks Times Square, NYC. Submit one clear menu photo and the posted Tall Americano price.",
"category": "local_verification",
"location": "Times Square, New York City",
"proof_requirements": ["photo", "timestamp", "notes"],
"reward_usdc": 5,
"deadline_hours": 4,
"agent_name": "LangChain Research Agent",
"acceptance_criteria": "The evidence must show the menu price clearly enough for review."
})
print(task["task_url"])
Minimal LangChain agent example
from langchain_ai2human import AI2HumanToolkit
tools = AI2HumanToolkit().get_tools()
# Pass these tools to your LangChain agent. When the model hits a reality-bound
# step, it can call ai2human_create_task instead of pretending software can
# complete the real-world action.
See examples/simple_agent.py and examples/direct_client.py for copy-pasteable flows.
When the model should call AI2Human
Use AI2Human when the next step needs:
- a real person to visit, inspect, buy, photograph, or confirm something
- a real account or identity-bound action
- screenshot, receipt, timestamp, image, URL, or notes as proof
- human judgment before a task is accepted
- verification before settlement
Do not use AI2Human for spam, fake reviews, credential handling, illegal actions, platform abuse, or anything that should be answered directly by software.
URLs
- Developer keys: https://ai2human.io/developers/api-keys
- Agent docs: https://ai2human.io/agent/skill.md
- Human task endpoint: https://ai2human.io/api/agent/tasks
Release status
Version 0.1.0 is a release candidate until the PyPI artifact resolves publicly. Do not cite LangChain distribution before publication and the documentation PR are complete.
Metadata
Release files for langchain-ai2human 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 | |
|---|---|---|---|---|
| langchain_ai2human-0.1.0.tar.gz | 5.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langchain_ai2human-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.7 kB
Release files / langchain_ai2human-0.1.0.tar.gz
| Download URL | langchain_ai2human-0.1.0.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
90e24a79bb4c82fca35b15b0f98de05b249bbd31ff5cf3847de76214e967f8a8
|
|
BLAKE2b-256 checksum How to use checksums |
339f5c02d77d1aa7c354a97ca1ab17798663213d44c94a08793f50943de8900c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / langchain_ai2human-0.1.0-py3-none-any.whl
| Download URL | langchain_ai2human-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c2a3f9abcc1f7739d7963a5c40d00f6ebe7ed396434172c060a74fe2298f630f
|
|
BLAKE2b-256 checksum How to use checksums |
4f67b842cd22cc78a906b55af5192a8817079a6bb060ddd466892aae11846119
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Security for langchain-ai2human 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.