Welcome to 🧪 bunsen, an experimental (and occasionally explosive) AI-powered squad for software development! Inspired by the brilliant, yet sometimes oblivious, Dr. Bunsen Honeydew and his long-suffering, accident-prone assistant, Beaker, from the Muppets. Bunsen and Beaker work together to accelerate your development cycles while keeping you safe from unexpected "meep meep!" moments.
Bunsen (the issue-agent) meticulously researches and clarifies requirements, ensuring the implementation details are sound. Meanwhile, Beaker (the swe-agent) bravely takes those plans and builds, tests, and deploys the code. Beaker can be a bit... unpredictable, so the entire workflow maintains a crucial human-in-the-loop safety mechanism to prevent those infamous lab 💥 "explosions".
🧪 bunsen isn't just about throwing AI at your codebase. It's about intelligent collaboration,
- Bunsen acts as your AI product manager / business analyst, expanding your Github experience with Interactive issue discussions and Contextual understanding.
- Interactive issue discussions Chat directly with Bunsen in GitHub issues to refine requirements, clarify design choices, and define precise success criteria. Bunsen will ask probing questions, and ensure every detail is meticulously documented before Beaker even touches a keyboard.
coming-soonContextual understanding Bunsen has read-access to your repository. This means it can review existing code, documentation, and project structure to provide informed suggestions and catch potential conflicts early. No more vague requirements leading to rework!
- Beaker acts as your AI software engineer, expanding your product development squad with an embedded engineer within Github Actions providing Autonomous implementation, Automated pr generation, and Test-driven execution.
- Autonomous implementation Once Bunsen has finalized the requirements, Beaker autonomously implements, tests, and commits code changes.
- Automated pr generation Beaker will open a new pull request, linking back to the original issue, and assign you as the reviewer.
- Test-driven execution Beaker is trained to run tests and ensure the code changes meet the defined success criteria, reducing the chances of broken builds.
- Human-in-the-loop
- Even the most brilliant experiments can go awry. That's why you, the human, are always in control.
- Review-before-you-merge Every change Beaker makes results in a pull request. You get to review the code, suggest changes, and ensure it aligns with your vision before it's merged into your main branch.
coming-soonIterative feedback If Beaker's PR isn't quite right, simply add comments on the pull request. Beaker can then iterate on the changes based on your feedback, just like a human collaborator.
🧪 bunsen provides the speed and scalability of AI development combined with the critical oversight of human intelligence, ensuring your project progresses rapidly and safely.
Behind the scenes, Bunsen's magic happens through a combination of configuration files, a publicly exposed webhook, and a GitHub Actions workflow.
Bunsen and Beaker's behavior is managed by two distinct configuration files:
settings.yamlContains non-sensitive settings that can be safely committed to your repository. It defines the GitHub repository details (e.g. the coding trigger label (ready-for-dev)), and the specific LLM models used by each agent (e.g.openai/gpt-5). See the LiteLLM documentation on available providers..envContains sensitive secrets, such as the Github App credentials and LLM API Key. Never commit this file to your repository.
The interaction between the user, Bunsen, and Beaker is a carefully orchestrated sequence of events,
- A user creates a GitHub issue or adds a comment to an existing issue.
- GitHub sends a webhook payload via a Github App to your deployed Bunsen
issue_agent(a FastAPI application). - The Bunsen
issue_agentprocesses the payload, responding on the Github issue when mentioned, e.g.@bunsen-issue-agent, or dispatching the Beakerswe-agentif it detects that the coding trigger label was added to the Github issue. - If the coding trigger label is detected the Bunsen
issue-agentmakes a GitHub API call to trigger the Beakerswe-agent, defined within a Github Action workflow (e.g.,.github/workflows/swe_agent.yaml). - Once dispatched, a GitHub runner starts a job, clones the repository, and executes the Python script for the Beaker
swe-agent. - Finally, the Beaker
swe-agentgets to work, generating code and creating a pull request for review.
Deploying 🧪 bunsen involves two main components,
- The Bunsen issue-agent (
bunsen/issue_agent/agent.py) The FastAPI application that must be hosted on a public server (like a cloud VM or container platform) so that it is reachable by a GitHub webhook. - The Beaker swe-agent (
bunsen/swe_agent/agent.py) The agent runs directly on GitHub's own infrastructure via GitHub Actions. It does not require separate hosting. A Github Actions workflow file (e.g..github/workflows/swe_agent.yaml) tells GitHub how to set up the environment and run the agent.
To integrate 🧪 bunsen into your workflow, you'll primarily interact with GitHub issues and pull requests.
- Python 3.11+: Ensure you have a compatible Python environment.
- GitHub Account: You'll need a GitHub account and admin access to the repositories you wish to integrate with.
- GitHub App: For authentication with the GitHub API. A Github App also provides your bunsen issue-agent with its persona (e.g. if you name the Github App
bunsen-issue-agent, you'll mention the agent in issues by including@bunsen-issue-agent.) - LLM API key: An API key for your chosen Large Language Model (e.g., OpenAI, Anthropic, etc.). See the LiteLLM documentation on available providers. Keep in mind that the underlying tools,
swe-agentandLiteLLMare in-development and some providers may not perform as well as others. Check the Github repositories of each of those projects for up-do-date information on the best supported providers/models.
-
Clone the repository
git clone https://github.com/thomaseleff/bunsen.git cd bunsen -
Create a virtual environment
python -m venv .venv source .venv/bin/activate # On Windows, .venv\Scripts\activate
-
Install the library
pip install . -
Configure environment variables Copy the example environment file,
.env.exampleand fill in your secrets.cp .env.example .env # Open .env and add your tokens and secrets. -
Create a Github App and set up GitHub webhooks Create a Github App and configure a webhook to your deployed Bunsen
issue-agentFastAPI application (e.g.,https://your-server.com/github-webhook).Enable
Actions(as 'Read and write'),Contents(as 'Read and write),Issues(as 'Read and write'), andPull requests(as Read and write) within the Repository permissions.Subscribe to the
Issues,Issue comment, andLabelevents. -
Set up GitHub Actions workflows Ensure the
swe-agent.yamlworkflows in.github/workflows/are correctly configured for your deployment.
- Create a new GitHub issue Describe the feature, bug, or task you want to address.
- Tag Bunsen In an issue comment, mention
@your-bot-username(replaceyour-bot-usernamewith the actual name of your GitHub App).- Example "Hey
@bunsen-issue-agent, I need to add a new user profile page. What information should it display, and what are the security considerations?"
- Example "Hey
- Iterate on requirements Bunsen will respond in the issue comments, asking clarifying questions, suggesting design elements, and refining success criteria. Continue the conversation until the requirements are finalized.
- Tag the issue for development Once you are satisfied with the requirements, add the coding trigger label (e.g.,
ready-for-dev) to the issue. This tells Bunsen that the task is now prepared for Beaker.
- Trigger implementation When the coding trigger label (e.g.,
ready-for-dev) is added to an issue, Bunsen will dispatch Beaker via a Github Action workflow. - Autonomous development Beaker will,
- Read the issue and comments
- Work in a sandboxed environment to implement code changes
- Run tests to ensure functionality
- Commit the changes to a new branch (e.g.,
feat/issue-123-new-profile-page).
- Pull request for review Beaker will automatically open a pull request assigned to you for review.
- Review and iterate
- Review Beaker's code changes.
coming-soonIf changes are needed, add comments directly on the pull request. Beaker can attempt to address these comments and push new commits to the PR.- Once satisfied, merge the pull request!
While Bunsen and Beaker are diligent, AI can sometimes have unexpected results (just like in the lab!). Follow these best practices to ensure a smooth, explosion-free workflow,
- Start small Begin with simpler issues and features to get comfortable with the agents' behavior.
- Clear & concise issues The clearer your initial issue description, the better Bunsen can guide the conversation and prepare Beaker.
- Thorough review: Always carefully review Beaker's generated pull requests. Think of it as a final safety check before the experiment goes live.
coming-soonProvide detailed feedback If Beaker makes a mistake, provide clear and specific feedback in the PR comments. The more precise you are, the better Beaker can learn and adapt.- Monitor workflows Keep an eye on your GitHub Actions workflows for any failures or unexpected behavior.