Introducing Sensei, a framework for quickly creating AI guides

I created Sensei to make it easier to quickly create and deploy new AI guides. Sharing it here in case it’s useful for other people, and especially if anyone wants to hack on it with me! I’m not planning for this to be a business or anything, I just needed it for myself.

Basic idea:

Each AI guide is a web application consisting of an Express server running a Node app, with a Postgres database, hosted on Heroku. OpenAI is called in the background, either the Assistants API or the Chat Completions API, depending on the “target” in your config. I’m mainly interested in the Assistants API.

Some key features:

  • User registration and login
  • Chat history in your own database, identified by user
  • Each AI has its own web endpoint, so you can call them from somewhere else
  • Basic web interface for prompting, login, and registration, which you can customize
  • Cheap default plans for Heroku, to keep prototyping cost-effective
  • Logtail free plan for server logs
  • Shell scripts to easily create new projects and branches (which get their own web endpoint)
  • Files in the “files” directory are available automatically to your AI for knowledge retrieval
  • Ditto for functions and function definitions in your “functions” directory
  • Pick your own model
  • GitHub workflow for CI/CD before Heroku deployment

Please reach out if you want to hack on this, if you find it useful, or if you have any feedback! I’ll keep iterating on it, but it has enough features at this point that I can begin to make use of it for my main project.


I wanted to share a few updates from the last ten days!

From the beginning, we wanted AI guides to be able to call on other, specialized AI guides for support. Our hypothesis is that a network of guides with specialized prompts and knowledge will outperform a single guide that is overwhelmed with too much information.

We’ve seen some early confirmation of that in our tests: Even for something simple, like explaining a book, we had better performance by having a “root” guide handle human input, and call on specialized guides that have access to individual chapters to get into the details.

Splitting functionality across multiple guides becomes even more important when guide responses need to be quite different from each other. For instance, one guide may need to generate technical output at a low temperature, while another guide may need to understand emotions expressed in the humans’ prompts. The root guide’s role is to play traffic controller, prompting its external guides based on the human prompt, and synthesizing responses.

Anyway, on to the new stuff:

  • Improvements to the branch and start scripts to make it easier to create and deploy AI guides
  • External guides can be named and described in the config file
  • A standard “callGuide” function can be used to call any external guides in the config
1 Like

Thanks for the update. I’ve added the project tag.

And we appreciate you putting updates in the same thread, as it makes it easier for us to keep up to date on everything for your project.

I don’t have time to check it out personally at the moment, but good luck!

Hope you stick around…


Will do!

Speaking of updates, I added just speech-to-text for prompting, and highlighted that as the primary mode of interaction. It was pretty quick. I’ll add text-to-speech next, to close the loop, so interactions with the AI guide are conversational and voice-driven, since that’s how we expect our end product to work. You still have access to the text in the thread, and you can always show the text-based chat form to enter your prompts with a keyboard if you want.