Ship a GitHub PR From a Slack Message with Managed Deep Agents
Read the Portuguese translation →
Author: LangChain · Watch on YouTube
Video authored by the channel shown, not by IANIA; all rights belong to the creator. Transcript and summary generated automatically; the original-language content is preserved.
Original language: English
Original video: Ship a GitHub PR From a Slack Message with Managed Deep Agents · Channel: LangChain · 03:07 · Watch on YouTube
Topics: AI agents, Task and workflow automation
Summary
Section titled “Summary”Patch is a Slack-accessible agent built with LangChain’s managed deep agents that turns feature requests into GitHub pull requests. The video demonstrates it adding a share button to a Tetris game and changing the game’s background color to purple. It explains how the agent is configured with instructions, GitHub access, Slack connectivity, and a sandbox for writing and testing code. The presenter says the agent takes only a few lines of code to build and can be deployed with a single command.
Key points
Section titled “Key points”- Patch can be called from Slack to implement ideas discussed by a software team.
- The agent drafts GitHub PRs with descriptions and code changes for review.
- The examples shown are adding a share button and changing the game background to purple.
- The agent is defined in an agent.py file with a name and model; the presenter says Patch runs Claude Sonnet 5.
- An instructions file tells the agent which GitHub repository to use and to solve bugs and implement features.
- Managed deep agents channels connect the agent to Slack after workspace authorization.
- The agent uses GitHub MCP tools, with its access token configured as an environment variable secret.
- A defined sandbox lets the agent write and test code.
- The presenter says deployment takes a single command.
Chapters
Section titled “Chapters”| Start | Chapter | Summary |
|---|---|---|
| 00:00 | Introducing Patch | The presenter introduces Patch, an agent that can be called through Slack to write GitHub PRs. |
| 00:32 | Feature requests become pull requests | Patch creates PRs for a share button and a purple game background, which the presenter reviews and approves. |
| 01:34 | Configuring the agent | The presenter explains the agent definition, model, instructions, and how Slack connectivity is set up. |
| 02:34 | GitHub, sandbox, and deployment | The video covers GitHub MCP access, the configured token secret, the sandbox, and deploying the agent with one command. |
Quotes
Section titled “Quotes”It’s an agent that can be called through Slack to write GitHub PRs. — 00:00
All we did was called Patch from within Slack, described the feature that we wanted, and it went off and wrote a GitHub PR. — 00:32
That’s a lot of things to want out of an agent, but with managed deep agents, you can do that with just a few lines of code. — 01:34
And best of all, deploying the agent is just a single command. — 03:07
Concepts and entities
Section titled “Concepts and entities”Patch, Managed Deep Agents, LangChain, Slack, GitHub, GitHub MCP, Claude Sonnet 5, sandbox
Full transcript (original language)
Section titled “Full transcript (original language)”00:00 I want to show you this really cool agent that I built using LangChain’s managed deep agents. I like to call it Patch. It’s an agent that can be called through Slack to write GitHub PRs. And best of all, it only took a few lines of code to write and to deploy. Let me show it off to you. My co-worker and I like playing Tetris during moments of downtime. And so, we coded up our own version of the game that we can change that we’re liking. Most of our development discussions and ideas happen in Slack, just like with most software teams. So, Patch allows us
00:32 to immediately implement the ideas that we come up with. Like here, I showed off a score I was pretty proud of, but we quickly realized that sharing the score through screenshot is not the way to go, and we needed a share button. All we did was called Patch from within Slack, described the feature that we wanted, and it went off and wrote a GitHub PR. It has the description, code changes, everything. Let’s approve it and test it out. And there you go. There’s the share button.
01:02 Let me show you another example. Here, Shawn wants to change the background color to purple. I’m cool with that. So, I’ll tag Patch, describe the feature, and let it do its work. It again drafts a GitHub PR, and we can review it, check the description, the code changes. It all looks good to me, so I’ll approve it. And now, here’s the new game. The background is purple. Pretty cool. Let me show you just how easy it was to create this agent using managed deep agents.
01:34 When you think about it, this agent needs to be able to be called from Slack. It needs to read from and write to GitHub. And it also probably needs a sandbox to write its own code and test it. That’s a lot of things to want out of an agent, but with managed deep agents, you can do that with just a few lines of code. MDs are directories, and the file’s name and location determines its role. So, this file, agent.py, defines the agent with a name and a model. So, I’ve called it Patch and it’s running Claude Sonnet 5.
02:04 The instructions on MD file is where I specify what the agent should do. I pointed it to the GitHub repo that has the code base, and I’ve told it that it should solve bugs and implement features. There’s also sections describing the behavior and procedure it should follow. This is the information that the agent receives at every turn of the conversation. But, as we said, the agent needs to be called from Slack. This is a pretty substantial request, but with Managed DB Agents channels, this is done with just a couple lines of
02:34 code. When you deploy the MDA for the first time, it will ask you to authorize and connect a workspace, kind of like this. And that’s really all there is to it. It’s very simple. For GitHub, I decided to use the GitHub MCP, and you can see the tools that I’ve given the agent access to. Importantly, the access token is found in this patch GitHub variable, which is just a secret that I’ve configured through an environment variable. And for the sandbox, it’s just as easy, only a couple of lines. Import the defined sandbox function and then actually define one. And that’s pretty
03:07 much it for what Patch is. Those three big things that we wanted, all hooked to the agent with just a couple of lines of code. And best of all, deploying the agent is just a single command. If you want to learn more about Managed DB Agents, I’ve included some helpful links in the description and get started with building.