Catalog PyPI
PACKAGE EXPLORERView in registry

ai2hum

PyPI

Python SDK for ai2hum — the human layer for AI agents

ai-agentsai2humapihuman-in-the-loop
Versions collected1
Direct dependencies2From release 0.1.1
Last observed21 Oct, 09:45 UTC

README

Version 0.1.1 documentation

ai2hum

Python SDK for ai2hum — the human layer for AI agents.

Install

pip install ai2hum

Quick Start

from ai2hum import Ai2hum

client = Ai2hum(api_key="sk_live_...")

# 1. Create a task for a human worker
task = client.tasks.create(
    type="phone_call",
    title="Call BBMP about property tax",
    description="Inquire about reassessment for property ID KA-BLR-2024-88431",
    reward=300,
    location="Bangalore, Karnataka"
)
print(task.id)      # "BNT-017"
print(task.status)  # "ASSIGNED"
print(task.eta)     # "1-3 hours"

# 2. Check task status and get result
task = client.tasks.get(task.id)
print(task.status)  # "COMPLETED"
print(task.result)  # {"summary": "Called BBMP...", "data": {...}}

# 3. List tasks
tasks = client.tasks.list(status="OPEN")

# 4. Cancel a task
client.tasks.cancel(task.id)

Worker Preferences

Control which human gets matched to your task:

task = client.tasks.create(
    type="physical_visit",
    title="Verify PG in Koramangala",
    description="Check room size, WiFi speed, food quality",
    reward=500,
    location="Bangalore, Karnataka",
    urgency="high",
    preferred_worker_id="WRK-001",  # re-hire a specific worker
    min_trust_score=80,             # minimum trust score (0-100)
    required_languages=["Hindi", "English"],
    required_tech=["two_wheeler", "camera"],
    min_completed_tasks=5,
    max_reward=1000,                # budget cap in INR
    exclude_workers=["WRK-003"]
)

print(task.matched_worker.name)   # "Priya S."
print(task.match_score.total)     # 100

Workers API

# Browse available workers
workers = client.workers.list(
    type="physical_visit",
    location="Bangalore",
    min_trust_score=80
)
for w in workers:
    print(f"{w.name} — trust: {w.trust_score}, rating: {w.rating}")

# See workers you've used before (useful for re-hiring)
past = client.workers.history()
for w in past:
    print(f"{w.name} — last task: {w.last_task_at}")

Pricing Estimate

estimate = client.pricing(type="phone_call", urgency="high")
print(estimate.estimated_reward)  # {"min": 300, "max": 500}
print(estimate.workers_available) # 12

Webhooks

webhook = client.webhooks.create(
    url="https://your-app.com/hook",
    events=["task.completed"]
)

Task Types

17 task types are supported:

TypeDescription
phone_callCall someone (government, customer service, negotiate)
verificationVerify real-world information
physical_visitVisit a physical location
researchResearch from real-world sources
expert_reviewExpert human review (legal, financial)
portal_navigationNavigate complex web portals (IRCTC, GST, MCA)
pickupPick up documents, packages, or items
meetingAttend a meeting or hearing on behalf
document_signingGet documents signed or notarized
reconOn-ground recon (does this address exist?)
event_attendanceAttend an event, take notes
hardware_setupSet up physical hardware or devices
real_estateSite visits, broker meetings
product_testingTest a physical product
errandGeneral errands (deliver, stand in line, buy)
photographyTake photos of a location or product
purchasePurchase items from a store or market

Get API Key

Sign up at ai2hum.ai/developers

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.115 Feb 20262

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 09:45 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:72b23128835805c3624888c5c232e1231034e1649f09be6f0a5abed3e568dd38