mcp_call items. Sandbox command executions and results appear as sandbox_results. The GitHub connector supplies credentials to authenticated git and gh commands that the agent runs in Sandbox.
Why managed connectors
The runnable example uses managed connectors, not remote MCP servers.
See Connectors and MCP.
One-time setup
- An API Group administrator connects GitHub and Slack to the same API Group in the API Portal.
- Create an API key for that group.
- Install the SDK and set the key locally:
Enter the prompt and run
Imagine you received a Slack message that calls out a potential bug. Using managed connectors, you can have your agent securely investigate the claim, resolve the issue in Github, and post an update in Slack as a reply to the original message.
prompt. There is no channel-ID extraction, copied report text, or separate target configuration in the application.
This call authorizes the agent and instructs it to post exactly one reply to the linked Slack thread.
responses.create() call, while the agent performs the internal steps and tool calls during that run. The prompt supplies the issue and its context; the tools supply authenticated capabilities. With Sandbox enabled and no GitHub allowed_tools, the GitHub connector supplies credentials to git and gh commands in Sandbox. The Slack allowlist exposes only slack_read_thread and slack_send_message.
max_retries=0 prevents the SDK from automatically resubmitting the call. If the connection fails after Slack may have accepted the message, inspect the thread before running the prompt again.

Inspect what happened
The response records the Sandbox executions and Slack connector calls. This optional check reads the returnedresponse object locally and makes no additional API call:
reply_broadcast=false, and consistency between the thread read, send arguments, returned channel, and reply permalink.
The selected output excludes Slack message text but includes channel and thread identifiers plus a workspace permalink. Use approved test data and do not send this output to shared logs.
A connector call with no error and a returned posting result is evidence that Slack accepted the post. A read-only lookup such as gh release view can return a non-zero exit code when an artifact does not exist; inspect the command output and the agent’s recovery instead of treating every non-zero exploratory command as a failed workflow.
What managed connectors enabled
The developer provides context, not orchestration code. One Agent API call handles Slack retrieval, managed GitHub authentication, native repository analysis, and the final Slack update. The response preserves the executed Sandbox code and connector calls, so the workflow remains inspectable. The implementation has one prompt, oneresponses.create() call, three tool entries, and no custom orchestration functions.