Tasks API - Managed Labor

Coming online soon - Send complete workflows to our computer-use agents. We’re accepting any work and we’ll get it done to you eventually.

The Tasks API is where you can outsource work entirely to our computer-use agents rather than building your own automation.

How It Works

  1. Define Workflow - Specify the work to be done
  2. Set SLA Controls - Maximum price and deadline
  3. Submit Task - Our computer-use agents execute
  4. Get Results - Guaranteed accuracy with audit trail

Quick Start

Python

from prava import Prava

client = Prava(api_key="prava_sk_...")

# Send work with SLA controls
task = client.tasks.create({
    "workflow": "ehr_processing",
    "data": {
        "portal_url": "https://epic.northwellhealth.org",
        "patient_mrns": ["12345678", "87654321"],
        "extract_fields": ["demographics", "vitals", "medications"]
    },
    "max_price": 1200,    # Don't pay more than $12
    "deadline": "2025-09-15T16:00:00Z"  # Due 4pm today
})

# Get results with SLA guarantee
result = client.tasks.get(task["id"])
print(f"Completed in {result['sla']['completed_in_minutes']} min")
print(f"Accuracy: {result['sla']['accuracy_guarantee'] * 100}%")

TypeScript

import { Prava } from 'prava';

const client = new Prava({ apiKey: 'prava_sk_...' });

// Send work with SLA controls
const task = await client.tasks.create({
  workflow: "ehr_processing",
  data: {
    portal_url: "https://epic.northwellhealth.org",
    patient_mrns: ["12345678", "87654321"],
    extract_fields: ["demographics", "vitals", "medications"]
  },
  max_price: 1200,    // Don't pay more than $12
  deadline: "2025-09-15T16:00:00Z"  // Due 4pm today
});

// Get results with SLA guarantee
const result = await client.tasks.get(task.id);
console.log(`Completed in ${result.sla.completed_in_minutes} min`);
console.log(`Accuracy: ${result.sla.accuracy_guarantee * 100}%`);

Task Creation

Required Fields

  • workflow - The type of work to perform
  • data - Input data specific to the workflow

Optional Fields

  • max_price - Maximum cost in cents (default: no limit)
  • deadline - ISO 8601 timestamp for completion
  • priority - Task priority (low, normal, high, urgent)
task = client.tasks.create({
    "workflow": "data_entry",
    "data": {
        "source_files": ["invoice1.pdf", "invoice2.pdf"],
        "target_system": "quickbooks",
        "validation_rules": "strict"
    },
    "max_price": 2500,  # $25 maximum
    "deadline": "2025-09-16T09:00:00Z",
    "priority": "high"
})

Task Monitoring

Get Task Status

task_status = client.tasks.get("task_12345")

print(f"Status: {task_status['status']}")
print(f"Progress: {task_status['progress']}%")
print(f"ETA: {task_status['eta']}")
print(f"Cost so far: ${task_status['price'] / 100}")

List All Tasks

tasks = client.tasks.list()

for task in tasks["data"]:
    print(f"{task['id']}: {task['status']} - {task['workflow']}")

Poll for Completion

import time

while task["status"] in ["queued", "running"]:
    time.sleep(30)  # Check every 30 seconds
    task = client.tasks.get(task["id"])

if task["status"] == "completed":
    print("Task completed successfully!")
    print(task["result"])
else:
    print(f"Task failed: {task['error']}")

Task Status

Status Description
queued Waiting for available computer-use agent
running Currently being executed
completed Successfully finished
failed Execution failed
cancelled Cancelled by user

Available Workflows

EHR Processing

Extract data from Electronic Health Records.

ehr_task = client.tasks.create({
    "workflow": "ehr_processing",
    "data": {
        "portal_url": "https://epic.example.org",
        "patient_mrns": ["12345", "67890"],
        "extract_fields": ["demographics", "vitals", "medications"],
        "credentials_vault": "aws-secrets-manager://ehr-creds/example"
    },
    "max_price": 1500,  # $15 max
    "deadline": "2025-09-15T17:00:00Z"
})

QuickBooks Sync

Sync invoices and expenses to QuickBooks.

qb_task = client.tasks.create({
    "workflow": "quickbooks_sync",
    "data": {
        "invoices_folder": "s3://company-invoices/q1-2025/",
        "vendor_mapping": "existing_vendors.csv",
        "chart_of_accounts": "coa_manufacturing.json"
    },
    "max_price": 5000,  # $50 max
    "deadline": "2025-09-16T09:00:00Z"
})

Salesforce Lead Generation

Find and qualify leads, add to Salesforce.

leads_task = client.tasks.create({
    "workflow": "salesforce_leads",
    "data": {
        "target_companies": ["Series A SaaS", "50-200 employees"],
        "geography": "US West Coast",
        "contact_titles": ["VP Engineering", "CTO"],
        "salesforce_instance": "company.lightning.force.com"
    },
    "max_price": 3000,  # $30 max
    "deadline": "2025-09-17T12:00:00Z"
})

Inventory Reconciliation

Reconcile inventory across systems.

inventory_task = client.tasks.create({
    "workflow": "inventory_reconcile",
    "data": {
        "erp_system": "sap",
        "warehouse_locations": ["DC-01", "DC-02"],
        "cycle_count_file": "s3://inventory/counts.csv",
        "tolerance_threshold": 0.02
    },
    "max_price": 4000,  # $40 max
    "deadline": "2025-09-18T08:00:00Z"
})

Compliance Audit

Review documents for compliance violations.

audit_task = client.tasks.create({
    "workflow": "compliance_audit",
    "data": {
        "document_folder": "s3://legal-docs/contracts/",
        "compliance_framework": "SOX",
        "risk_threshold": "medium"
    },
    "max_price": 8000,  # $80 max
    "deadline": "2025-09-20T17:00:00Z"
})

SLA Guarantees

All completed tasks include SLA metrics:

result = client.tasks.get(task_id)

sla = result["sla"]
print(f"Completed in: {sla['completed_in_minutes']} minutes")
print(f"Accuracy guarantee: {sla['accuracy_guarantee'] * 100}%")
print(f"Cost efficiency: {sla['cost_vs_budget'] * 100}%")
print(f"Human review: {sla['human_verified']}")

SLA Metrics

  • Completion Time - How long the task took
  • Accuracy Guarantee - Confidence level (0.95-0.999)
  • Cost Efficiency - Actual cost vs. budget
  • Human Verification - Whether a human reviewed the work

Error Handling

try:
    task = client.tasks.create({
        "workflow": "ehr_processing",
        "data": {
            "portal_url": "https://epic.example.org",
            "patient_mrns": ["12345"]
        }
    })
except Exception as e:
    print(f"Task creation failed: {e}")

# Check for task failures
task_status = client.tasks.get(task_id)
if task_status["status"] == "failed":
    print(f"Task failed: {task_status['error']}")
    print(f"Failure reason: {task_status['failure_reason']}")

Pricing

Tasks are priced based on:

  • Complexity - How difficult the workflow is
  • Data Volume - Amount of data to process
  • Urgency - Deadline requirements
  • Accuracy - Required confidence level

Price Controls

# Set maximum budget
task = client.tasks.create({
    "workflow": "data_entry",
    "data": {...},
    "max_price": 2500  # Won't exceed $25
})

# Get cost estimate before creating
estimate = client.tasks.estimate({
    "workflow": "ehr_processing",
    "data": {...}
})
print(f"Estimated cost: ${estimate['price_cents'] / 100}")

Security & Compliance

  • HIPAA Compliant - For healthcare workflows
  • SOC 2 Type II - Audited security controls
  • Encrypted Transit - All data encrypted in motion
  • Audit Logs - Complete execution audit trail
  • Data Residency - US-based processing

Credentials Management

# Use AWS Secrets Manager
task = client.tasks.create({
    "workflow": "ehr_processing",
    "data": {
        "credentials_vault": "aws-secrets-manager://ehr-creds/epic"
    }
})

# Use environment variables
task = client.tasks.create({
    "workflow": "salesforce_leads",
    "data": {
        "credentials_env": "SALESFORCE_OAUTH_TOKEN"
    }
})

Custom Workflows

Need a custom workflow? Contact our team:

Custom workflow SLA: 2-5 business days for implementation.