Connect OpenAI Agents SDK to Guard.ch
Let OpenAI Agents SDK open and interact with websites in an isolated cloud browser. Watch live or hand over a running session.
Connect OpenAI Agents SDK
You need Python with pip install openai-agents and an OpenAI API key for the agent's model.
1. Create access
Open the dashboard to create a key and get a ready-to-copy configuration.
Create a key in the dashboard2. Add the connection
Create the server in your code with your app key in place of YOUR_API_KEY. Open it with async with guardch: and pass mcp_servers=[guardch] to your Agent.
pip install openai-agents
Use this in your server code.
Create a key to copy this value
3. Try it in a new chat
Run the agent with Runner.run and the task below, then check that result.final_output describes the page.
Open example.com in a Guard.ch browser and tell me what the page says.
0 of 3 steps marked done
Need help?
If calls time out, raise client_session_timeout_seconds, since opening a browser can take a few seconds. A 401 error means the app key is wrong or missing.
Hand over a running session
Choose “Hand off to an agent” in the Guard.ch viewer and paste the prepared prompt into your assistant’s chat. The session ID in that prompt lets the assistant continue in the same browser. Sign your assistant in with the same Guard.ch account.