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
Local testing (no uv)
python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install -e . pytest
python -m pytest -q
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, invoke, runtime, schedule
import os
app = App(
"Investor Meeting Booker",
project_name="investor-meeting-booking",
runtime_profile=runtime(
secrets=[
Secret.from_dotenv(),
Secret.from_dict({"OPENAI_API_KEY": os.environ["OPENAI_API_KEY"]}),
],
),
)
@app.tool(id="send_email", description="Send one email.")
def send_email(to: str, subject: str, body: str) -> dict:
return {"ok": True, "to": to, "subject": subject}
DAILY_FOLLOWUPS = schedule.cron(
id="daily-followups",
expr="0 13 * * 1-5",
timezone="UTC",
run=invoke.agent("booking-coordinator", input={"message": "Send pending follow-ups."}),
)
@app.agent(
id="booking-coordinator",
entrypoint=True,
task="Coordinate scheduling requests.",
skills=["send_email", "automation_create", "automation_list"],
schedules=[DAILY_FOLLOWUPS],
)
def booking_coordinator():
"""Coordinate scheduling requests."""
export ARA_API_KEY="your_long_lived_api_key"
export OPENAI_API_KEY="your_provider_key"
ara deploy app.py
ara setup-auth app.py
ara run app.py --agent booking-coordinator --message "Need 3 slots next week"
ara run-async app.py --agent booking-coordinator --message "Need 3 slots next week" --response-mode poll
ara logs app.py
ara events app.py --event-type channel.web.inbound --channel web --message "hello"
ara setup app.py
If you prefer embedded script commands (python app.py deploy), add:
from ara_sdk import run_cli
if __name__ == "__main__":
run_cli(app)
ara logs app.py streams live runtime events for the app across all active runs.
Each line includes timestamp + run id + event type. To persist output, use shell piping:
ara logs app.py | tee app.logs
Environment
ARA_API_KEY: long-lived user API key for control plane- In the Ara app, open
Settings -> System, then use API Key -> Copy API Key. - Paste that value into
ARA_API_KEYbefore running SDK commands. - Legacy
ARA_ACCESS_TOKENis still accepted as a compatibility fallback.
- In the Ara app, open
ARA_API_BASE_URL: optional API override (defaults to production API)ARA_RUNTIME_KEY: optional runtime key override forrun/eventsARA_APP_HEADER_KEY: optional app header key override (X-Ara-App-Key) forrun/events/run-async/run-status- Prefer running
ara setup-auth app.pyto mint keys and then export them. - Set
ARA_APP_HEADER_KEYonly when explicitly usingX-Ara-App-Keymode.
- Prefer running
Local bootstrap helper:
ara setup-auth app.py:- resolves
app_idby app slug - ensures a runtime key exists (optional)
- creates
/apps/{app_id}/x-keyskey when missing - returns both
runtime_keyandapp_header_keyin command output
- resolves
Runtime env and secrets
runtime(...) supports:
env: plain runtime environment values (runtime_profile.env)secrets: ordered secret references (runtime_profile.secret_refs)
Container bootstrap (remote, Modal-style)
For container-side setup, declare startup bootstrap commands in runtime(...) and run them inside the
provisioned app sandbox. This keeps build/bootstrap logic in the cloud container instead of depending on
local uv workflows.
from ara_sdk import App, entrypoint, local_file, runtime
app = App(
"Research Assistant",
project_name="research-assistant",
runtime_profile=runtime(
image="python:3.12-slim",
files=[
local_file("./scripts/bootstrap.sh", path="scripts/bootstrap.sh", executable=True),
],
startup=entrypoint("scripts/bootstrap.sh"),
),
)
python_packages / node_packages remain part of runtime profile metadata, but if you need deterministic
install behavior today, use startup bootstrap commands in the container.
For observability, run warmup and stream runtime logs:
ara deploy app.py --warm true
ara logs app.py
Warmup/run lifecycle logs are emitted as run.warmup.* and run.*; startup failures are surfaced into
those logs with command error previews.
Secret helper options:
Secret.from_name(name, required_keys=None)(reference only)Secret.from_dict(name_or_env_dict, env_dict=None, *, required_keys=None, name=None):Secret.from_dict("provider-local", {...})for explicit namingSecret.from_dict({...})(orSecret.from_dict({...}, name="provider-local")) for programmatic local secrets
Secret.from_dotenv(name=None, filename=".env")(auto-named when name omitted)Secret.from_local_environ(name, env_keys=[...])(synced at deploy)
Deploy behavior:
- Local secret sources sync to
/apps/{app_id}/secretsbefore warmup. - When
runtime(secrets=[...])is present, deploy reconciles the remote app secret set to match those refs (stale secrets are removed). - 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|inheritedkey: logical sandbox selector used by runtime placementspawn: 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, orsandbox.enable_additional_sandbox=true
Scheduling model
Use one schedule shape everywhere:
schedule.cron(...)/schedule.every(...)for static declarations on@app.agentinvoke.agent(...)/invoke.tool(...)for schedule targetsscheduler.create(spec)for dynamic runtime automation payloads
Examples
See examples/ for optional integrations and demo projects:
examples/calcom-booking/examples/async-ngrok-webhook/examples/programmatic-secrets-redeploy/(live probe for secret reconciliation + stable generated secret names)examples/agent-skills-loading/(three minimal Ara SDK skill execution apps)examples/framework-adapters/minimal_langgraph_subagent.py(legacy)examples/framework-adapters/minimal_agno_subagent.py(legacy)
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ara_sdk-0.1.19.tar.gz.
File metadata
- Download URL: ara_sdk-0.1.19.tar.gz
- Upload date:
- Size: 29.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2328d82014646a0aaf1f64dcddb0b239737fcd19aabb2765a7a0d7f2fad33da1
|
|
| MD5 |
8e578fbd7f13ff25fa15bfc5ed079286
|
|
| BLAKE2b-256 |
c6ec3d9bfdbcd4d8b45eedeeee5641ad575e5cf5ebdd43adfd8c7e2911c0015a
|
File details
Details for the file ara_sdk-0.1.19-py3-none-any.whl.
File metadata
- Download URL: ara_sdk-0.1.19-py3-none-any.whl
- Upload date:
- Size: 22.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c815bf4aebfb40c9dcdf3cf25a3a2bccc74dfbe9d34f6b01c497ce7f2521bbbb
|
|
| MD5 |
000e73768462b59da6d0bbfc9d728d62
|
|
| BLAKE2b-256 |
5a41d4df06f3b351c64f4878e3b03a133791d3c0244ed51e6541ada69a6033f5
|