Skip to main content

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:

Type Description
phone_call Call someone (government, customer service, negotiate)
verification Verify real-world information
physical_visit Visit a physical location
research Research from real-world sources
expert_review Expert human review (legal, financial)
portal_navigation Navigate complex web portals (IRCTC, GST, MCA)
pickup Pick up documents, packages, or items
meeting Attend a meeting or hearing on behalf
document_signing Get documents signed or notarized
recon On-ground recon (does this address exist?)
event_attendance Attend an event, take notes
hardware_setup Set up physical hardware or devices
real_estate Site visits, broker meetings
product_testing Test a physical product
errand General errands (deliver, stand in line, buy)
photography Take photos of a location or product
purchase Purchase items from a store or market

Get API Key

Sign up at ai2hum.ai/developers

Metadata

Release files for ai2hum 0.1.1

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

Source distribution (sdist)

Source distribution for ai2hum 0.1.1
File Size Uploaded Provenance
ai2hum-0.1.1.tar.gz 6.2 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 13.7 kB

Release files / ai2hum-0.1.1.tar.gz

Download URL ai2hum-0.1.1.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7a4d3adbb403fd380635caa33dd6df26b39833e267af6cf8be707eafb3e95e9b
BLAKE2b-256 checksum
How to use checksums
d490c613078badd2581f5e4293a4d79c4615a4eafdf2e584e66338ce7b757af4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / ai2hum-0.1.1-py3-none-any.whl

Download URL ai2hum-0.1.1-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a44009b7e82c0e5138d6794d1bfc86116d931b0949e366687f54df93b2b35c12
BLAKE2b-256 checksum
How to use checksums
b9f08e5dc0c5281a67c8292f200f61e63b3a12577033f8ef0f2e740d8219256f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for ai2hum 0.1.1

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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