Forgejo with agents cover image

Forgejo with agents

So for a couple of months I've been using Forgejo to keep my personal projects and it has been really really fantastic. It is super quick, super easy to set up, and I don't know, maybe this is not very tangible, but it feels great to host your own infra sometimes.

Giving a machine to an agent

Since I'm using Proxmox, and in Proxmox it is very easy to make virtual machines, I thought that it could be interesting also to create a container that is owned fully by an agent. So I made a Debian machine and I gave full root access to my agent, and I also gave an account to this agent to use Forgejo.

I set up a global hook, so every single time that I mention my agent, it can pick up the task or the question I'm making, everything via project issues. My agent has some small rules to know how to operate in the machine:

  • It has full access to the machine, and can install and uninstall things as it needs.
  • It knows where to put the projects.
  • It knows how to launch them, inside a tmux session. This is interesting, because if I need to know what the output of a certain project is, I can always SSH very quickly and see the output of the command.

The workflow

My workflow is very basic now:

  1. I create an issue where I make an inquiry to my bot, saying hey, could you research about this, or could you fix this, or could you implement this feature.
  2. The bot researches, implements or assesses, depending on the task, and then writes the response in the same issue.
  3. For the cases that are very clear it opens a PR that I can supervise and give my yes or no.
An issue, the pull request blipblip opened for it, and the result it produced

This workflow has been great because now I can be at any place and, via the Forgejo mobile UI, interact with my agent without having my personal laptop turned on.