Skip to content

Commit cbed48d

Browse files
docs: rename saas_runtime_mode to local_agent_server_mode
Update all references to match the rename in software-agent-sdk PR #2490: - Rename parameter: saas_runtime_mode -> local_agent_server_mode - Rename section heading: SaaS Runtime Mode -> Local Agent Server Mode - Rename SVG files to match new naming - Move automation_callback_url and automation_run_id to env vars table - Update code examples to remove constructor args that are now env vars Co-authored-by: openhands <openhands@all-hands.dev>
1 parent 47de2d0 commit cbed48d

4 files changed

Lines changed: 20 additions & 22 deletions

File tree

sdk/guides/agent-server/cloud-workspace.mdx

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -383,14 +383,14 @@ cd agent-sdk
383383
uv run python examples/02_remote_agent_server/10_cloud_workspace_share_credentials.py
384384
```
385385

386-
## SaaS Runtime Mode
386+
## Local Agent Server Mode
387387

388-
Use `saas_runtime_mode=True` when your SDK script is **already running inside** an OpenHands Cloud sandbox — for example, as part of an automation workflow deployed to the cloud.
388+
Use `local_agent_server_mode=True` when your SDK script is **already running inside** an OpenHands Cloud sandbox — for example, as part of an automation workflow deployed to the cloud.
389389

390390
### When to Use This Mode
391391

392-
| Scenario | Normal Mode | SaaS Runtime Mode |
393-
|----------|-------------|-------------------|
392+
| Scenario | Normal Mode | Local Agent Server Mode |
393+
|----------|-------------|-------------------------|
394394
| Script runs on your local machine |||
395395
| Script runs in CI (GitHub Actions runner) |||
396396
| Script deployed to run inside Cloud sandbox |||
@@ -404,25 +404,23 @@ In **normal mode**, `OpenHandsCloudWorkspace` provisions a new sandbox via the C
404404
<img src="/sdk/guides/agent-server/images/normal-mode.svg" alt="Normal mode: Your machine communicates with OpenHands Cloud via API" />
405405
</Frame>
406406

407-
In **SaaS runtime mode**, your script is already inside the sandbox and connects to the local agent-server:
407+
In **local agent server mode**, your script is already inside the sandbox and connects to the local agent-server:
408408

409409
<Frame>
410-
<img src="/sdk/guides/agent-server/images/saas-runtime-mode-simple.svg" alt="SaaS runtime mode: Script runs inside Cloud sandbox" />
410+
<img src="/sdk/guides/agent-server/images/local-agent-server-mode-simple.svg" alt="Local agent server mode: Script runs inside Cloud sandbox" />
411411
</Frame>
412412

413413
Key differences:
414414
- **No sandbox provisioning** — skips create/wait/delete lifecycle
415415
- **Connects to localhost** — talks to the agent-server already running in the sandbox
416-
- **SaaS credentials still work**`get_llm()` and `get_secrets()` call the Cloud API
416+
- **Cloud credentials still work**`get_llm()` and `get_secrets()` call the Cloud API
417417

418418
### Configuration
419419

420420
| Parameter | Type | Default | Description |
421421
|-----------|------|---------|-------------|
422-
| `saas_runtime_mode` | `bool` | `False` | Skip sandbox provisioning, connect to localhost |
422+
| `local_agent_server_mode` | `bool` | `False` | Skip sandbox provisioning, connect to localhost |
423423
| `agent_server_port` | `int` | `60000` | Port of the local agent-server |
424-
| `automation_callback_url` | `str \| None` | `None` | URL to POST completion status on exit |
425-
| `automation_run_id` | `str \| None` | `None` | ID included in callback payload |
426424

427425
### Environment Variables
428426

@@ -433,6 +431,8 @@ When running inside a Cloud sandbox, these environment variables are set automat
433431
| `SANDBOX_ID` | Sandbox identifier for `get_llm()` / `get_secrets()` |
434432
| `SESSION_API_KEY` | Session auth key (fallback: `OH_SESSION_API_KEYS_0`) |
435433
| `AGENT_SERVER_PORT` | Port override (optional) |
434+
| `AUTOMATION_CALLBACK_URL` | URL to POST completion status on exit (optional) |
435+
| `AUTOMATION_RUN_ID` | ID included in callback payload (optional) |
436436

437437
### Example: Automation Script Inside a Cloud Sandbox
438438

@@ -446,15 +446,13 @@ from openhands.sdk import Conversation
446446
from openhands.tools.preset.default import get_default_agent
447447

448448
with OpenHandsCloudWorkspace(
449-
saas_runtime_mode=True,
449+
local_agent_server_mode=True,
450450
cloud_api_url="https://app.all-hands.dev",
451451
cloud_api_key=os.environ["OPENHANDS_API_KEY"],
452-
automation_callback_url=os.environ.get("CALLBACK_URL"),
453-
automation_run_id=os.environ.get("RUN_ID"),
454452
) as workspace:
455453
# No sandbox created — connects to local agent-server at localhost:60000
456454

457-
# SaaS credentials still work
455+
# Cloud credentials still work
458456
llm = workspace.get_llm()
459457
secrets = workspace.get_secrets()
460458

@@ -468,12 +466,12 @@ with OpenHandsCloudWorkspace(
468466
conversation.run()
469467
conversation.close()
470468

471-
# On exit: completion callback sent automatically (if callback URL configured)
469+
# On exit: completion callback sent automatically (if AUTOMATION_CALLBACK_URL is set)
472470
```
473471

474472
### Orchestration Pattern
475473

476-
To deploy an automation script that uses SaaS runtime mode:
474+
To deploy an automation script that uses local agent server mode:
477475

478476
1. **Create a sandbox** using normal mode (from your local machine or CI):
479477
```python
@@ -490,14 +488,14 @@ To deploy an automation script that uses SaaS runtime mode:
490488
workspace.execute_command("python /workspace/my_automation.py")
491489
```
492490

493-
3. The script uses `saas_runtime_mode=True` to connect to the local agent-server
491+
3. The script uses `local_agent_server_mode=True` to connect to the local agent-server
494492

495493
4. **Receive callback** when the script completes (optional)
496494

497495
This pattern enables fire-and-forget automation where your orchestrator doesn't need to maintain a connection for the entire agent session.
498496

499497
<Note>
500-
SaaS runtime mode is primarily used by the OpenHands automation service. For most SDK users, normal mode with `get_llm()` and `get_secrets()` provides a simpler experience.
498+
Local agent server mode is primarily used by the OpenHands automation service. For most SDK users, normal mode with `get_llm()` and `get_secrets()` provides a simpler experience.
501499
</Note>
502500

503501
## Next Steps

sdk/guides/agent-server/images/saas-runtime-mode-simple.svg renamed to sdk/guides/agent-server/images/local-agent-server-mode-simple.svg

Lines changed: 1 addition & 1 deletion
Loading

sdk/guides/agent-server/images/saas-runtime-mode.svg renamed to sdk/guides/agent-server/images/local-agent-server-mode.svg

Lines changed: 1 addition & 1 deletion
Loading

sdk/guides/agent-server/workspace-types.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ For advanced orchestration, you may want to run SDK scripts *inside* a Cloud san
112112
- You need **nested agent execution** — an outer agent spawns inner agents
113113
- You're building an **automation service** that deploys user-provided scripts
114114

115-
This uses `saas_runtime_mode=True`. See [SaaS Runtime Mode](/sdk/guides/agent-server/cloud-workspace#saas-runtime-mode) for the full pattern.
115+
This uses `local_agent_server_mode=True`. See [Local Agent Server Mode](/sdk/guides/agent-server/cloud-workspace#local-agent-server-mode) for the full pattern.
116116

117117
<Frame>
118-
<img src="/sdk/guides/agent-server/images/saas-runtime-mode.svg" alt="SaaS Runtime Mode orchestration pattern" />
118+
<img src="/sdk/guides/agent-server/images/local-agent-server-mode.svg" alt="Local Agent Server Mode orchestration pattern" />
119119
</Frame>
120120

121121
### Enterprise: Self-Managed Infrastructure

0 commit comments

Comments
 (0)