Skip to main content
The GitHub connector prepares repositories, the GitHub CLI (gh), and credentials inside a managed sandbox, so an agent can inspect a repository or open a pull request against it. It requires managed-deepagents>=0.4.0.
Managed Deep Agents is in private beta, available on LangSmith Cloud in the US region only. Join the waitlist to request access.
This connector is separate from the GitHub channel, which receives App webhooks, and Connect-with-GitHub under identity.

Add the connector

Create connectors/github.py or connectors/github.ts. Export the connector as connector in Python or as the module default in TypeScript.
The connector clones each repository when the sandbox is created. When a thread reuses an existing sandbox, on_reuse / onReuse controls the checkout (see Configure options).

Configure options

Each entry in repositories accepts these fields: Set write to true only on checkouts the agent must push to, since it grants write credentials for the repository. Leave it unset for read-only work. For private repositories, configure GitHub credentials through identity. The runtime resolves the credential, injects it into the sandbox as GH_TOKEN, and configures Git credentials for the run. The token is never stored in thread state.

Test and deploy

Test the project locally with mda dev, then deploy it with mda deploy. Open deployment traces in LangSmith to inspect model calls, tool calls, errors, and latency. The connector runs only when the project declares a managed sandbox; without one, it does not run. After startup, confirm the checkout by asking the agent to list the files at the configured path, and confirm credentials by asking it to run gh auth status in the sandbox. For deploy symptoms and fixes, see Troubleshooting.

Next steps

Connectors

Compare connector types.

GitHub channel

Receive GitHub App webhooks.

Identity

Scope callers and resolve credentials.

Configure a sandbox

Configure sandbox scope and lifecycle.