Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions sdk/guides/agent-server/cloud-workspace.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

> A ready-to-run example is available [here](#ready-to-run-example)!

The `OpenHandsCloudWorkspace` demonstrates how to use the [OpenHands Cloud](https://app.all-hands.dev) to provision and manage sandboxed environments for agent execution. This provides a seamless experience with automatic sandbox provisioning, monitoring, and secure execution without managing your own infrastructure.

Check warning on line 8 in sdk/guides/agent-server/cloud-workspace.mdx

View check run for this annotation

Mintlify / Mintlify Validation (allhandsai) - vale-spellcheck

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

Did you really mean 'sandboxed'?

## Key Concepts

Expand Down Expand Up @@ -71,7 +71,7 @@

```python icon="python" focus={1-3}
result = workspace.execute_command(
"echo 'Hello from OpenHands Cloud sandbox!' && pwd"

Check warning on line 74 in sdk/guides/agent-server/cloud-workspace.mdx

View check run for this annotation

Mintlify / Mintlify Validation (allhandsai) - vale-spellcheck

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

Did you really mean 'pwd'?
)
logger.info(f"Command completed: {result.exit_code}, {result.stdout}")
```
Expand Down Expand Up @@ -383,6 +383,17 @@
uv run python examples/02_remote_agent_server/10_cloud_workspace_share_credentials.py
```


## Settings and Secrets API Examples

The remote agent-server examples also include end-to-end scripts for settings-backed secrets and authenticated LLM configuration:

- [examples/02_remote_agent_server/12_settings_and_secrets_api.py](https://github.com/OpenHands/software-agent-sdk/blob/main/examples/02_remote_agent_server/12_settings_and_secrets_api.py) demonstrates storing secrets through the Settings and Secrets API, referencing them with `LookupSecret`, and cleaning them up after use.
- [examples/02_remote_agent_server/13_workspace_get_llm.py](https://github.com/OpenHands/software-agent-sdk/blob/main/examples/02_remote_agent_server/13_workspace_get_llm.py) demonstrates configuring LLM settings on an authenticated agent-server and retrieving them through `RemoteWorkspace.get_llm()`.

<RunExampleCode path_to_script="examples/02_remote_agent_server/12_settings_and_secrets_api.py"/>
<RunExampleCode path_to_script="examples/02_remote_agent_server/13_workspace_get_llm.py"/>

## Next Steps

- **[API-based Sandbox](/sdk/guides/agent-server/api-sandbox)** - Connect to Runtime API service
Expand Down
11 changes: 11 additions & 0 deletions sdk/guides/llm-profile-store.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

## Benefits
- **Persistence:** Saves model parameters (API keys, temperature, max tokens, ...) to a stable disk format.
- **Reusability:** Import a defined profile into any script or session with a single identifier.

Check warning on line 15 in sdk/guides/llm-profile-store.mdx

View check run for this annotation

Mintlify / Mintlify Validation (allhandsai) - vale-spellcheck

sdk/guides/llm-profile-store.mdx#L15

Did you really mean 'Reusability'?
- **Portability:** Simplifies the synchronization of model configurations across different machines or deployment environments.

## How It Works
Expand Down Expand Up @@ -232,8 +232,19 @@

<RunExampleCode path_to_script="examples/01_standalone_sdk/44_model_switching_in_convo.py"/>


## Agent-Driven LLM Switching

Saved profiles can also be exposed to the agent through the `switch_llm` built-in tool. The tool call switches the conversation's active profile after the current model finishes the tool call, so future model calls use the selected profile.

<Note>
This example is available on GitHub: [examples/01_standalone_sdk/49_switch_llm_tool.py](https://github.com/OpenHands/software-agent-sdk/blob/main/examples/01_standalone_sdk/49_switch_llm_tool.py)
</Note>

<RunExampleCode path_to_script="examples/01_standalone_sdk/49_switch_llm_tool.py"/>

## Next Steps

- **[LLM Registry](/sdk/guides/llm-registry)** - Manage multiple LLMs in memory at runtime

Check warning on line 248 in sdk/guides/llm-profile-store.mdx

View check run for this annotation

Mintlify / Mintlify Validation (allhandsai) - vale-spellcheck

sdk/guides/llm-profile-store.mdx#L248

Did you really mean 'LLMs'?
- **[LLM Routing](/sdk/guides/llm-routing)** - Automatically route to different models
- **[Exception Handling](/sdk/guides/llm-error-handling)** - Handle LLM errors gracefully
Loading