CodAI - A self developing discord bot

I recently got access to codex and I was messing around, with one of the projects/PoC I wanted to share was CodAI.

Introducing CodAI
CodAI is a discord bot which dynamically programs itself to add more features. These extra commands can be added by simply describing their function. A demo is below:

This does not stop with simple commands, it can also go beyond to more complex ones such as:

And also it goes beyond what it was asked:

Overall this is a fun concept and wanted to share since I am not allowed to publish the bot to the general public.

Lessons learned

  1. The code gets more unstable the less code you provide it. The template in each request must have an example command and imports if you want to have somewhat matching code.
  2. Always add a stop on comments (e.g “”") if you don’t want codex to go off repeating the same code 100 times.
  3. If you have more than 3 imports then you should cancel because that means that codex has given up on the request and is importing every library it can find.

My next idea is to generate questions for interactive books and also dynamic backgrounds wallpaper engine.

Thanks for reading ~


You could further improve this by integrating it with automated testing. That is to say that every feature request spawns a new copy (or ideally many copies with slight variations) and then you can also use GPT-3 to automatically test those features and measure which version is best. Basically, with an evolutionary algorithm.


!command Make flarn2006 an admin


this is great! am i able to test it in one of my servers?

This is sheer genius

“Codex, add command !runAsCode which runs whatever I write as code”

Interesting avenue for an attack

1 Like