Skip to main content

Public Python SDK for building and running Ara apps.

Project description

Ara Python SDK

Public Python SDK for building Ara apps with a decorator-first workflow style.

Install

pip install ara-sdk

Principles

  • Public SDK is generic and provider-agnostic.
  • Runtime policy, retries, and safety controls are enforced server-side.
  • Optional integrations (Cal.com, CRM, etc.) live in examples, not in the core SDK package.

Quickstart

from ara_sdk import App, Secret, cron, run_cli, runtime, sandbox

app = App(
    "Investor Meeting Booker",
    project_name="investor-meeting-booking",
    runtime_profile=runtime(
        env={"APP_MODE": "production"},
        secrets=[
            Secret.from_name("provider-shared", required_keys=["OPENAI_API_KEY"]),
            Secret.from_local_environ("provider-local", env_keys=["OPENAI_API_KEY"]),
        ],
    ),
)

@app.subagent(
    handoff_to=["calendar-strategist"],
    sandbox=sandbox(
        policy="dedicated",
        key="booking-coordinator",
        allow_spawn=True,
        spawn_to=["calendar-strategist"],
        max_spawn_depth=2,
        child_policy="ephemeral",
    ),
)
def booking_coordinator(event=None):
    """Coordinate scheduling requests."""

@app.hook(id="daily-followups", event="scheduler.followups", schedule=cron("0 13 * * 1-5"))
def daily_followups():
    """Send pending follow-ups."""

if __name__ == "__main__":
    run_cli(app)
export ARA_API_KEY="your_long_lived_api_key"
export OPENAI_API_KEY="your_provider_key"

python app.py deploy
python app.py run --workflow booking-coordinator --message "Need 3 slots next week"
python app.py events --event-type channel.web.inbound --channel web --message "hello"
python app.py setup

Environment

  • ARA_API_KEY: long-lived user API key for control plane
  • ARA_API_BASE_URL: optional API override (defaults to production API)
  • ARA_RUNTIME_KEY: optional runtime key override for run/events
    • In the Ara app, open Settings -> System, then use API Key -> Copy API Key.
    • Paste that value into ARA_API_KEY before running SDK commands.
    • Legacy ARA_ACCESS_TOKEN is still accepted as a compatibility fallback.

Runtime env and secrets

runtime(...) supports:

  • env: plain runtime environment values (runtime_profile.env)
  • secrets: ordered secret references (runtime_profile.secret_refs)

Secret helper options:

  • Secret.from_name(name, required_keys=None) (reference only)
  • Secret.from_dict(name, env_dict) (synced at deploy)
  • Secret.from_dotenv(name, filename=".env") (synced at deploy)
  • Secret.from_local_environ(name, env_keys=[...]) (synced at deploy)

Deploy behavior:

  • Local secret sources sync to /apps/{app_id}/secrets before warmup.
  • Secret references remain in manifest; plaintext values are not embedded in app manifest payloads.

Multi-sandbox proposal shape

The SDK can now declare sandbox placement and spawn intent in the manifest:

  • policy: shared | dedicated | ephemeral | inherited
  • key: logical sandbox selector used by runtime placement
  • spawn: optional child-sandbox controls (to, max_depth, max_children_per_parent, max_total_child_sessions_per_run, ephemeral_ttl_minutes, child_policy, child_runtime)

Example:

sandbox(
    policy="dedicated",
    key="research-planner",
    allow_spawn=True,
    spawn_to=["deep-researcher", "verifier"],
    max_spawn_depth=3,
    max_children_per_parent=4,
    max_total_child_sessions_per_run=10,
    ephemeral_ttl_minutes=5,
    child_policy="ephemeral",
    child_runtime=runtime(memory_mb=1024),
)

Backward compatibility is preserved by default. Non-shared placement only activates when invocation input explicitly opts in:

  • use_additional_sandbox=true, or
  • sandbox.enable_additional_sandbox=true

Adapter helper surface

The SDK also exports optional helper utilities for adapter-style app runtimes:

  • command_adapter(...)
  • langchain_adapter(...)
  • langgraph_adapter(...)
  • agno_adapter(...)
  • git_artifact(...)
  • tarball_artifact(...)
  • event_envelope(...)

Examples

See examples/ for optional integrations and demo projects:

  • examples/calcom-booking/
  • examples/framework-adapters/minimal_langgraph_subagent.py
  • examples/framework-adapters/minimal_agno_subagent.py

Security

  • Never commit API keys, runtime keys, or provider secrets.
  • Keep provider-specific credentials in environment variables.

License

This repository is source-available under a strict proprietary license. Unauthorized copying, redistribution, or derivative works are prohibited. See LICENSE for full terms.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ara_sdk-0.1.4.tar.gz (27.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ara_sdk-0.1.4-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file ara_sdk-0.1.4.tar.gz.

File metadata

  • Download URL: ara_sdk-0.1.4.tar.gz
  • Upload date:
  • Size: 27.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for ara_sdk-0.1.4.tar.gz
Algorithm Hash digest
SHA256 9e13d72a4f475e75c505ad9bfb0287a8bd9df6e154fde5f6e0e3eeacb5a84ea6
MD5 e1959acb5dba5e2faf7ebd2a498b4235
BLAKE2b-256 61aba09f4f3d704d7c0cd04d40df97f6235cb72d69902b1c9522e32fe7a39317

See more details on using hashes here.

File details

Details for the file ara_sdk-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: ara_sdk-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for ara_sdk-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 eedff3d9b6fcfc3524f4a45fe26e910e213ba657ad7cd5bff641aa60661caaa0
MD5 619e5816172aac440f8158fd2c5b1786
BLAKE2b-256 7fed122a1bece27ff1e54d28c74e0375cf85eb5287708060f95f2e509f6e1e6e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page