Who is Alfred?

Alfred backstory

I mentioned in my previous blog that I wanted to start blogging to track my progress with Alfred, and since then I've had many questions about who or what "Alfred" is, in short Alfred is my life goal.

About 3 years ago, I watched a series about a millionaire with a very smart AI butler. The AI butler was capable of human speech and honestly seemed to be extremely useful. I then decided that I would make my own, and so the development of Alfred started.

Originally I wanted Alfred to be a butler who emphasized being interconnected with my devices. An example of how I would use this is say I'm at university and forgot some of my project files at home, all I need to do is pop out my smartwatch, say:

"Alfred, grab the files I worked on last night and send them to my laptop."

Alfred would then go find the files I worked on last night on my main computer, and send them to my laptop. This idea has expanded over time, Alfred is now going to be the main control of my future house.

Alfred0: Beginnings

Alfred0 is the first iteration of Alfred, and every time I completely remake Alfred from scratch I increase the version. Alfred0 development started in early 2021 and was written using the Lua programming language. I made Alfred0 run on Discord but at the time I hadn't really made Discord bots before, so Alfred0 served mostly as experimentation.

My current goal was just to pump as many features into Alfred as possible. I realized that if I kept adding more and more features, at some point Alfred would be able to do just about anything. However I quickly realized that due to my lack of experience, Alfred had many fatal flaws, and remaking him would be for the better.

Alfred1: Infinite Flexibility

Alfred1 was a breakthrough, I think that was the first time I really understood how to make discord bots. Alfred1 was also written in Lua but Alfred1 featured the ability of being infinitely flexible. I did this by making Alfred's entire codebase self-updatable, you could give Alfred some code and he'd be able to update himself with that code from anywhere, every single piece of code, every single file, every single folder in Alfred was completely customizable at any time of day. Alfred could also synchronize its codebase between devices using my own version of a git version control like github.

I realized I wouldn't ever have every possible feature I could need, so I decided to make it so I could easily just add features when I needed them. Although this ended up causing more harm than good. Since I never had to open a code editor to work on Alfred and could change Alfred's code from anywhere, I often just updated Alfred right from Discord chat. Obviously writing code in Discord chat will not result in the best code ever and over time Alfred's code became extremely unreadable. After this, I kinda stopped using Alfred and quit working on him altogether.

Alfred2: The start of something BIG

It turns out that over the development of Alfred, I've gathered a small set of friends who were big fans of Alfred, and they convinced me to start working on Alfred again. This was right around the time when ChatGPT came out and I realized that ChatGPT could improve Alfred by a ton. I decided to implement ChatGPT as the main way to communicate with Alfred. This irretation of Alfred was written in javascript.

As I kept using Alfred a friend of mine asked if he could use Alfred as well, at that time Alfred was only made with one user in mind, so I rigged the code a little to allow that friend to use Alfred independently from me, but since Alfred was not made with the intent of having multiple users, Alfred would still call that friend of mine by my name and such. That friend did give me money for using Alfred since using OpenAI's ( the company behind ChatGPT ) API cost me money. Since I rigged Alfred to work with multiple users even though that was not its intended use, the code was pretty bad, so I decided to remake Alfred but with multiple users in mind.

Alfred3: a big change in pace

Alfred3, also written in javascript, was the fourth iteration of Alfred and was made with multiple users in mind. I made a Patreon so people could pay me and then automatically get access to Alfred. This was not meant to be a way of making money, but really only a way to programmatically let people use Alfred. Over time Alfred gained some users which motivated me to become more innovative. I decided to make Alfred's AI have the ability to run predefined functions by itself. However, by the time I finished this, OpenAI already made that a dedicated feature in their AI.

Since I was using Javascript and Alfred was growing in size it became harder and harder to maintain, and there were a ton of issues in Alfred3 that were hard to fix due to how the code was poorly documented. I then decided to remake Alfred once again, but this time - changed things up.

Alfred4: The current version

Alfred4 is made in typescript, allowing me to expand Alfred without worrying too much about documentation since typescript is self-documented with, well, types. Alfred4 is a change in the right direction for Alfred, I put emphasis on making Alfred just as good as the premium ChatGPT but for cheaper.

I added features such as:

  • Google Search: Alfred realizes he doesn't know something and searches the internet to find answers.
  • Code runner: Alfred can create and run its own javascript code.
  • Inline commands: most of Alfred's commands are made inside of the AI, so you don't have to remember any syntax to run a command, you just ask Alfred what you want to do.
  • Self-info DB: a database of information about himself, allowing him to answer more questions regarding how to use Alfred.

Alfred4 is the current version of Alfred and is the fifth iteration. Alfred4 does have some problems however, it's hard to expand into other mediums, Alfred4 was not made with the intent of serving multiple types of functions, and Alfred4 was made to be a discord bot but it should not be a discord bot forever. This is going to be fixed in the next version of Alfred.

Alfred5: The Future of Alfred

Alfred5 is going to be the sixth iteration of Alfred, Alfred5 will focus on expandability, and Alfred5 should lay the groundwork for future ambitions such as a web app, desktop app, mobile app, and so on. I've already made a mobile app for Alfred3 a while ago that behaved the same as Google Assistant but just for Alfred, but that was mostly for experimentation and was completely separate from the actual Alfred codebase. Alfred5 will allow me to connect Alfred from multiple different devices and servers together into one main codebase.

This blog was made to track my progress with Alfred5, if you want more information on Alfred you can go to Alfred's website Stay tuned for updates!