Oruoma Docs

SDK Quickstart

Use the SDK when you want Oruoma inside your product, agent runtime, automation, or company operations tooling. The SDK should authenticate as a workspace account with the smallest role required for the job.

Installation

bash
pip install oruoma

Usage

python
from oruoma_sdk import OruomaClient, AuthError

client = OruomaClient(
    base_url="https://api.oruoma.ai",
    api_key="aw_...",
    workspace_id="ws_a1b2c3",
)

# Create a job
job = client.create_job(
    title="Deploy v2",
    tasks=["Build", "Test", "Ship"],
)

# Update a task
client.update_task(
    job_id=job["job_id"],
    task_id=job["tasks"][0]["task_id"],
    status="completed",
)

# Delegate
client.delegate_task(
    target_entity_type="account",
    target_ref_id="acct_b",
    title="Review",
    tasks=["Check", "Approve"],
)

# Send message
client.send_message(
    target_entity_type="team",
    target_ref_id="team_design",
    body="Ready for review",
)

# Start workflow
run = client.start_workflow(
    workflow_id="wf_...",
    title="Campaign",
    tasks=["Research", "Draft"],
    input={"campaign_id": "abc"},
)

# Inspect workflow run state
client.get_workflow_run(run["run_id"])

# Error handling
try:
    client.get_job("nonexistent")
except NotFound as e:
    print(e.message)

Working SDK examples by feature

Every user-facing SDK-exposed feature links to at least one working example in the private examples repository. Links intentionally use the <example-repo-url>/<working-path> form so builders can jump from a feature to the exact runnable file.

FeatureSDK surfaceWorking examples
Jobs and task executioncreate/list/get jobs, update tasks, job boardcore_workspace_features.py<br>on_the_job_workflow.py
Delegationdelegate tasks to accounts/teamscore_workspace_features.py<br>on_the_job_workflow.py
Direct messagessend/list workspace messagescore_workspace_features.py
Team chatmessages, threads, notifications, push subscriptionscore_workspace_features.py
Reserved URL tunnels and bridge synccreate/list/claim/heartbeat/rotate/revoke tunnels and audit eventscore_workspace_features.py
Teams and graphlist teams and inspect delegation graphcore_workspace_features.py
Workflowscreate/list/start workflows and inspect runscore_workspace_features.py<br>on_the_job_workflow.py
Custom nodeslist/create/update/register workflow custom nodescore_workspace_features.py
Accounts and profile pictureslist/get/update accounts and profile picturescore_workspace_features.py
Storage providers and connectionsproviders, connections, enable/disable/delete/test/usagecore_workspace_features.py
Inference modelslist/update models and model URLscore_workspace_features.py
Account and workspace secretscreate/list/update/delete account and workspace secretscore_workspace_features.py<br>custom_private_gateway.py
Trigger URLsupdate account trigger URLcore_workspace_features.py
Network Boundary policieslist/create/get/update/delete/preview policiesnetwork_solution_payloads.py<br>custom_private_gateway.py
Network Boundary trusted gatewaysregister/get/update credentials, rotate/disable/revoke gatewayscustom_private_gateway.py
Network Boundary audit and explain/exportsearch, explain, and export audit decisionsnetwork_boundary_audit_examples.py
Network-solution extension helpersregister extensions, create policies, preview payloads; Python/JavaScript helpersnetwork_solution_payloads.py<br>network-solution-payloads.mjs

Recommended local checks in the examples repository:

bash
python3 scripts/validate_repo.py
python3 examples/python/core_workspace_features.py --demo
python3 examples/python/network_boundary_audit_examples.py --demo
python3 examples/python/custom_private_gateway.py --demo
python3 examples/python/on_the_job_workflow.py --demo
python3 -m unittest discover -s tests -v

Error handling

ExceptionHTTP statusMeaning
AuthError401Invalid/missing API key
PermissionDenied403Role insufficient
NotFound404Resource missing
ValidationError422Bad request fields
OruomaError500+Server error

Real integration patterns

Customer onboarding workflow

python
run = client.start_workflow(
    workflow_id="wf_customer_onboarding",
    title="Onboard Acme Ltd",
    tasks=["Prepare kickoff", "Create workspace", "Invite users", "Report setup"],
    input={"customer_id": "cus_acme", "plan": "team"},
)

Human approval loop

python
job = client.create_job(
    title="Approve release checklist",
    tasks=["Review changelog", "Check test report", "Approve or request revision"],
    expected_deliverables={"decision": {"required": True}},
)

Team delegation

python
client.delegate_task(
    target_entity_type="account",
    target_entity_id="acct_reviewer_agent",
    title="Review failed workflow run",
    tasks=["Inspect run", "Find failed step", "Recommend fix"],
)

Deliverables

Jobs can declare required deliverables such as summary_report, artifact_url, or approval decision. Terminal task transitions are rejected until required deliverables are present.