diff --git a/sdk/guides/agent-server/apptainer-sandbox.mdx b/sdk/guides/agent-server/apptainer-sandbox.mdx new file mode 100644 index 00000000..fd2e5bc2 --- /dev/null +++ b/sdk/guides/agent-server/apptainer-sandbox.mdx @@ -0,0 +1,20 @@ +--- +title: Apptainer Sandbox +description: Run agent server in an Apptainer sandbox for isolation on HPC systems. +--- + +This example shows how to run a sandboxed remote agent server using Apptainer. + + +This example is available on GitHub: [examples/02_remote_agent_server/07_convo_with_apptainer_sandboxed_server.py](https://github.com/OpenHands/software-agent-sdk/blob/main/examples/02_remote_agent_server/07_convo_with_apptainer_sandboxed_server.py) + + +```python icon="python" expandable examples/02_remote_agent_server/07_convo_with_apptainer_sandboxed_server.py +``` + +```bash Running the Example +export LLM_API_KEY="your-api-key" +cd agent-sdk +uv run python examples/02_remote_agent_server/07_convo_with_apptainer_sandboxed_server.py +``` + diff --git a/sdk/guides/agent-server/custom-tools.mdx b/sdk/guides/agent-server/custom-tools.mdx index 39cb72bc..48443334 100644 --- a/sdk/guides/agent-server/custom-tools.mdx +++ b/sdk/guides/agent-server/custom-tools.mdx @@ -15,6 +15,16 @@ For standalone custom tools (without remote agent server), see the [Custom Tools This example is available on GitHub: [examples/02_remote_agent_server/05_custom_tool/](https://github.com/OpenHands/software-agent-sdk/tree/main/examples/02_remote_agent_server/05_custom_tool) +### Tool Modules (Built Into the Server Image) + +```python icon="python" expandable examples/02_remote_agent_server/05_custom_tool/custom_tools/__init__.py +``` + +```python icon="python" expandable examples/02_remote_agent_server/05_custom_tool/custom_tools/log_data.py +``` + +### Client Script + ```python icon="python" expandable examples/02_remote_agent_server/05_custom_tool/custom_tool_example.py """Example: Using custom tools with remote agent server. diff --git a/sdk/guides/agent-server/llm-switching.mdx b/sdk/guides/agent-server/llm-switching.mdx new file mode 100644 index 00000000..a258b477 --- /dev/null +++ b/sdk/guides/agent-server/llm-switching.mdx @@ -0,0 +1,20 @@ +--- +title: Agent Server LLM Switching +description: Switch the active LLM for a remote conversation via the agent server API and restore with the new profile. +--- + +This guide demonstrates switching the active LLM profile for a remote conversation and then restoring the conversation with the new selection. + + +This example is available on GitHub: [examples/02_remote_agent_server/07_llm_switch_and_restore.py](https://github.com/OpenHands/software-agent-sdk/blob/main/examples/02_remote_agent_server/07_llm_switch_and_restore.py) + + +```python icon="python" expandable examples/02_remote_agent_server/07_llm_switch_and_restore.py +``` + +```bash Running the Example +export LLM_API_KEY="your-api-key" +cd agent-sdk +uv run python examples/02_remote_agent_server/07_llm_switch_and_restore.py +``` + diff --git a/sdk/guides/llm-profiles.mdx b/sdk/guides/llm-profiles.mdx new file mode 100644 index 00000000..643da9ca --- /dev/null +++ b/sdk/guides/llm-profiles.mdx @@ -0,0 +1,18 @@ +--- +title: LLM Profiles +description: Save and load named LLM configurations for reuse across runs. +--- + +LLM Profiles let you persist LLM configurations (model, base_url, secrets, etc.) under a stable `profile_id`, and then load them when constructing agents. + +This example is available on GitHub: [examples/01_standalone_sdk/31_llm_profiles.py](https://github.com/OpenHands/software-agent-sdk/blob/main/examples/01_standalone_sdk/31_llm_profiles.py) + + +```python icon="python" expandable examples/01_standalone_sdk/31_llm_profiles.py +``` + +```bash Running the Example +export LLM_API_KEY="your-api-key" +cd agent-sdk +uv run python examples/01_standalone_sdk/31_llm_profiles.py +``` diff --git a/sdk/guides/llm-runtime-switching.mdx b/sdk/guides/llm-runtime-switching.mdx new file mode 100644 index 00000000..a18daa81 --- /dev/null +++ b/sdk/guides/llm-runtime-switching.mdx @@ -0,0 +1,20 @@ +--- +title: Runtime LLM Switching +description: Switch the active LLM profile during a conversation and persist the choice. +--- + +You can swap the active LLM profile at runtime (between runs) and persist the new selection so it survives restarts. + + +This example is available on GitHub: [examples/01_standalone_sdk/26_runtime_llm_switch.py](https://github.com/OpenHands/software-agent-sdk/blob/main/examples/01_standalone_sdk/26_runtime_llm_switch.py) + + +```python icon="python" expandable examples/01_standalone_sdk/26_runtime_llm_switch.py +``` + +```bash Running the Example +export LLM_API_KEY="your-api-key" +cd agent-sdk +uv run python examples/01_standalone_sdk/26_runtime_llm_switch.py +``` +