We Built a Slack-to-GitHub PR Agent in a Few Lines of Code
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: We Built a Slack-to-GitHub PR Agent in a Few Lines of Code · Channel: LangChain · 01:05 · Watch on YouTube
Topics: AI agents, Task and workflow automation, Software engineering with AI
Summary
Section titled “Summary”Patch is a LangChain managed deep agent that can be called from Slack to write GitHub pull requests. The video demonstrates how it turned a request for a Tetris score-sharing button into a PR containing a description and code changes. The agent uses managed deep agents’ channels for Slack, the GitHub MCP for repository access, and a sandbox to write and test code. The creator says the agent took only a few lines of code to build and can be deployed with a single command.
Key points
Section titled “Key points”- Patch is an agent built with LangChain’s managed deep agents.
- The agent can be called from Slack to create GitHub PRs.
- The example project is a custom Tetris game developed by the creator and a coworker.
- A Slack request for a score-sharing button prompted Patch to write a PR.
- The PR includes a description and code changes.
- Managed deep agents’ channels provide the Slack connection.
- The agent uses the GitHub MCP and selected GitHub tools.
- A sandbox lets the agent write and test its code.
- The creator says deployment requires a single command.
Chapters
Section titled “Chapters”| Start | Chapter | Summary |
|---|---|---|
| 00:00 | Introducing Patch | The creator introduces Patch, an agent that can be called through Slack to write GitHub PRs. |
| 00:31 | From Slack idea to GitHub PR | Patch turns a request for a Tetris share button into a GitHub PR with a description and code changes. |
| 01:05 | Building and deploying the agent | The creator describes connecting Slack and GitHub, adding a code sandbox, and deploying Patch with a single command. |
Quotes
Section titled “Quotes”I like to call it Patch. — 00:00
All we did was called Patch from within Slack, describe the feature that we wanted, and it went off and wrote a GitHub PR. — 00:31
For GitHub, I decided to use the GitHub MCP — 01:05
deploying the agent is just a single command. — 01:05
Concepts and entities
Section titled “Concepts and entities”LangChain, Patch, Managed Deep Agents, Slack, GitHub, GitHub MCP, sandbox, Tetris
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 coworker 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:31 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, describe the feature that we wanted, and it went off and wrote a GitHub PR. It has the description, code changes, everything. Let me show you just how easy it was to create this agent using managed deep agents. 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,
01:05 and it also probably needs a sandbox to write its own code and test it. Having an agent called from Slack is a pretty substantial request, but with managed deep agents’ channels, this is done with just a couple lines of code. For GitHub, I decided to use the GitHub MCP, and you can see the tools that I’ve given the agent access to. And for the sandbox, it’s just as easy, only a couple of lines. Import the define sandbox function, and then actually define one. And that’s pretty much it for what Patch is. And best of all, deploying the agent is just a single command.