Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 3.73 KB

README.md

File metadata and controls

44 lines (28 loc) · 3.73 KB

Coding Agent for Slack

A sample Slack agent that showcases Slack Code built with Bolt for Python. Mention it in a channel with a task and a repo, and it decides whether to answer in place or create a dedicated code channel for the work. In a code channel it clones the repo into a temp workspace, makes changes with your approval, and keeps the channel's plan, context bar, and code tab current as it goes.

Warning

This agent runs commands generated by a language model on the machine running the app. Only run it against trusted, throwaway repositories, on a machine you're comfortable letting it operate. Refer to the framework README for how command approvals work.

Choose Your Framework

This repo contains the same app built with three different AI agent frameworks. Pick the one that fits your stack:

App Directory Get Started Framework
Claude Agent SDK claude-agent-sdk/ View README claude-agent-sdk
OpenAI Agents SDK openai-agents-sdk/ View README openai-agents
Pydantic AI pydantic-ai/ View README pydantic-ai

All implementations share the same Slack listener layer and the same user experience. The only difference is how the agent is defined and executed under the hood.

What It Can Do

The coding agent interacts with users through four entry points:

  • App Home — The Home tab explains how to start a task.
  • Direct Messages — Message the agent directly. Quick questions get an answer in place; work that takes more than one message gets a code channel linked back to your message.
  • Channel @mentions — Mention the agent in any channel with a task and a repo. It answers in place, or creates a code channel for the work along with the conversation it came from.
  • Code Channels — Keep chatting in the channel without an @mention. The agent writes its plan to a Plan tab you can comment on, publishes its changes to the code tab, and pins the repo, branch, and CI status to the context bar.

In a code channel, file edits, read-only commands, and local git changes run right away. Anything else, like running tests, posts Approve and Deny buttons and waits for your decision. The agent also registers slash commands like /run-tests for each channel and decides what each one does. When you say the work is done, it posts a summary back to your original message and archives the channel.

Using the App

Once the agent is running, there are several ways to interact:

  • App Home — Open the agent in Slack and click the Home tab to see how to start a task.
  • Direct Messages — Open the agent's Messages tab and ask a question or describe a task, or pick a suggested prompt. It answers there, or links a code channel for bigger work.
  • Channel @mentions — Invite the agent to a channel by typing /invite @agent-name, then @mention it with a task and a repo. It answers in the thread, or replies with a link to a new code channel for the work.
  • Code Channels — Follow the work in the new channel. Approve or deny commands as they come up, comment on the Plan tab, review the diff in the code tab, and send follow-ups without an @mention. Say you're done to wrap up and archive the channel.

For full setup instructions, pick a framework above and follow the README in that directory.

Local Development

This repo uses slack-bolt from PyPI.