Skip to main content

Public Python SDK for building and running Ara apps.

Project description

Ara Python SDK

Ara is a managed platform for building and running long-lived AI agents in the cloud.

The ara-sdk is the Python layer for defining those agents, tools, schedules, and endpoints as code. Ara runs the cloud runtime and operations, while the SDK gives you composable primitives to build novel 24/7 managed workflows.

Overview

Main SDK primitives:

  • App(...): define one deployable Ara app.
  • @app.agent(...): define agent behavior and entrypoints.
  • @app.tool(...): expose deterministic functions as callable tools.
  • @app.schedule(...): trigger agents/tools on cron or fixed times.
  • @fastapi_endpoint(...): expose HTTP endpoints backed by app agents.
  • runtime(...) + Secret: declare runtime env, startup, and secrets.

These primitives can be combined to run always-on assistants, scheduled automation jobs, and API-triggered workflows in one app.

Runtime flow:

Users / Clients
  (Web app, SMS, Slack, Email)
            |
            |  HTTP (bidirectional webhooks / responses)
            v
+----------------------------------------------+
|         Ara Cloud: 24/7 Agent Runtime        |
|  - Interprets prompt + workflow              |
|  - Activates sandbox when work is needed     |
+--------------------------+-------------------+
                           |
                           v
                 +------------------------+
                 |   Sandbox / Computer   |
                 | - File system access   |
                 | - Executes tasks/tools |
                 +-----------+------------+
                             |
            +----------------+----------------+
            v                                 v
 +---------------------------+   +---------------------------+
 | Custom tools / skill files|   | Subagents / other agents |
 +---------------------------+   +---------------------------+

Quickstart:

from ara_sdk import App, fastapi_endpoint

app = App("support-ops")

@app.tool()
def send_email(to: str, subject: str, body: str) -> dict:
    return {"ok": True, "to": to, "subject": subject}

@app.schedule(cron="0 * * * *")
@app.agent(entrypoint=True, skills=["send_email"])
def support_coordinator(input: dict) -> str:
    _ = input if isinstance(input, dict) else {}
    return "Handle support operations and send follow-ups."

@app.agent()
@fastapi_endpoint(method="POST", path="/webhooks/inbound", auth="none")
def inbound_webhook(input: dict) -> str:
    _ = input if isinstance(input, dict) else {}
    return "Process inbound webhook events."

Install

pip install ara-sdk

Documentation

Local testing (no uv)

python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install -e . pytest
python -m pytest -q

Run maintained examples

All maintained examples are in examples/ and ordered in examples/README.md.

cd examples
cp .env.example .env.local
# Fill ARA_API_KEY and provider keys in .env.local as needed.

Core flow per example:

ara deploy <example.py>
ara setup-auth <example.py> --ensure-runtime-key true
ara run <example.py> --agent <agent-id> --runtime-key "<runtime_key>" --message "hello"

Example-specific notes:

  • 01-c-agent-skills-loading.py uses a local custom @skill_handler decorator inside the tool function; it is not an ara-sdk primitive.
  • 02-canonical-email-chat-cron.py frontend requires VITE_ARA_APP_ID and VITE_ARA_RUNTIME_KEY in examples/.env.local.
  • 03-async-ngrok-webhook.py requires both a local callback receiver and ngrok.
  • 07-app-schedule-decorator.py is the static/declarative scheduling example (@app.schedule(...)).
  • 07b-app-schedule-decorator.py is the runtime-managed fire-and-forget scheduling example (create jobs via automation_create) using an apply-style helper local to the example.
  • 07c-runtime-automation-manager.py is the minimal runtime automation lifecycle manager (create/list/delete flows).

FAQ

What is the boundary between Ara and ara-sdk?

Ara is the managed control/runtime plane (execution, lifecycle, policy, observability), while ara-sdk is the authoring layer for app behavior (agents, tools, schedules, endpoints). You define Python app logic; Ara handles runtime operations you would otherwise run as custom infrastructure.

Does “24/7 runtime” mean I pay for permanently hot compute?

Not inherently. The runtime is always available as the service boundary, but sandbox/task compute can activate on demand from schedules, events, and API calls. Practical cost and footprint depend on your trigger frequency and runtime policy. Note: today usage is billed under your existing Pro or Ultra subscription.

How should I think about @app.agent, @app.tool, and @app.schedule (and when to use each)?

Use @app.agent for interpretation/planning, @app.tool for deterministic and reusable capability execution, and @app.schedule for time-based triggers. Combined, they let you build always-on workflows that handle operational automation, filesystem/computer-style tasks, and multi-agent delegation beyond chat-only use cases.

How do I handle secrets and environment safely at scale?

Use runtime secret primitives (Secret + runtime(...)) so credentials are injected at runtime instead of committed in code. This keeps apps portable across environments and reduces secret exposure in source control.

Do I need public endpoints to use Ara?

No. Public endpoints are optional ingress, not a requirement for running Ara apps. You can operate entirely through CLI-triggered runs, schedules, and internal automation flows, then expose HTTP/webhook entrypoints with @fastapi_endpoint(...) only when external systems (or users) need to call in directly.

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.36.tar.gz (45.1 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.36-py3-none-any.whl (34.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ara_sdk-0.1.36.tar.gz
  • Upload date:
  • Size: 45.1 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.36.tar.gz
Algorithm Hash digest
SHA256 80594a2db669a6ae1b18e12cda63975643c1e4ba79cc56b2706335ea1bf3ebaf
MD5 484d1f1debbb0bef82948d931c590480
BLAKE2b-256 163bbf2cf98059dc87325f254dbee0024fd449004365338bc8e454cd2eff1679

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ara_sdk-0.1.36-py3-none-any.whl
  • Upload date:
  • Size: 34.2 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.36-py3-none-any.whl
Algorithm Hash digest
SHA256 85b8fcde3f6a1886ab6b0819a93af7cc3d18fbc2af3cc212301777e7f6e72712
MD5 f03aef19baa39c8298e0d93264cc1a9d
BLAKE2b-256 4511065553f8b1b2e6a0c3676dcf0096c7b28f9dddf55ad33a6c945affc53319

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