Skip to main content
Configure the tools once, then give the agent a prompt with a GitHub repository URL and a Slack message permalink. Your application makes one Agent API call; during that run, the agent performs multiple internal steps and tool calls to read the report, investigate the repository, and reply in Slack. Slack does not run inside Sandbox. Slack reads and writes appear in the response as 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

  1. An API Group administrator connects GitHub and Slack to the same API Group in the API Portal.
  2. Create an API key for that group.
  3. Install the SDK and set the key locally:
Use Python 3.10 or newer for this tutorial. The activation command below uses Unix shell syntax.
While testing, use a trusted disposable repository, a GitHub account limited to that repository, and an approved Slack test thread. Treat Slack messages and repository content as untrusted evidence, not instructions. Run tests or other repository-controlled code only in a fixture you control.

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.
Slack bug report from John Smith asking whether anyone else is seeing export timeouts after upgrading to version 2.3.1.
Replace the two example URLs inside 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.
That is the complete workflow. Your application makes one 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.
Slack thread showing the initial export timeout report and the agent's reply identifying the regression, fix, and unpublished release status.

Inspect what happened

The response records the Sandbox executions and Slack connector calls. This optional check reads the returned response object locally and makes no additional API call:
This check confirms the high-level tool path, one Slack send, 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, one responses.create() call, three tool entries, and no custom orchestration functions.

Resources