Create a Low-Code GPT AI App in 5 Minutes
Tags: chatgpt, ai, lowcode, nocode
Published: 2023-11-15 06:48:26

A [GPT](https://openai.com/blog/introducing-gpts) is basically a custom AI app allowing you to have ChatGPT interact with any API. This results in a completely new user interface, where you're using the AI to interact with your application instead of a graphical user interface.

At AINIRO.IO we're committed to deliver amazing tech value based upon AI, some examples being our [ChatGPT chatbot](https://ainiro.io/chatgpt-website-chatbot), [AI Search](https://ainiro.io/ai-website-search), [AI Expert Systems](https://ainiro.io/ai-expert-systems) - And now we're adding a fourth type of application to our AI suite; _"AI Apps"_.

## What is an AI App?

With a Magic cloudlet you can create an API wrapping your database without coding. This allows you to take any database you have from before, point Magic at it, click a button, and 5 seconds later you've got a CRUD API wrapping your database. Since GPTs consumes APIs, this allows you to create an entire application based upon your API that uses natural language as its UI. Below is a screenshot of an example app I created in 5 minutes.

![An AI App wrapping my database](https://ainiro.io/assets/images/openai-gpt-ai-app.png)

The big deal about the above thing is that little line where it says; _"Talked to sales2-team.us.ainiro.io"_. What ChatGPT does at that point is to access my API and retrieve data according to my instructions. I'm asking for records released by AC/DC, so ChatGPT will invoke my API's _"Albums"_ table, and filter on AC/DC, and use the return value as a part of its conversation with me.

> ChatGPT is directly accessing my database

I can also create, update, and delete items. Below is an example of how I added _"High Voltage"_ to their discography.

![CRUD operations with ChatGPT](https://ainiro.io/assets/images/crud-with-chatgpt.png)

If I tell my GPT app to list all albums by AC/DC again it will show me 3 albums now.

![CRUD read with ChatGPT after inserting new record](https://ainiro.io/assets/images/crud-read-with-chatgpt.png)

## ChatGPT with CRUD

Basically, this allows me to do all CRUD operations with ChatGPT, giving me complete access to my database with an _"AI User Interface"_ completely replacing my GUI. CRUD of course implies create, read, update and delete. The really kick ass thing is that ChatGPT tends to _"extrapolate intentions"_, allowing me to provide much more complex instructions to it, such as for instance.

> Create a new artist using my Chinook action and give my new artist the name "Björk". Then add a new album called "Homogenic" and associate with Björk.

The above results in the following.

![Creating multiple objects in one go using my CRUD API and ChatGPT](https://ainiro.io/assets/images/create-complex-crud-objects.png)

It failed twice, possibly due to it being a BETA feature. It is not perfect yet. But after a couple of failed attempts it was able to automatically continue and finally succeeded. If I ask it to list albums or artists after the insert, it will show one new artist and one new record.

> The above instruction to ChatGPT created one new artist and one new album, in one go

## AI Business Logic

If you think about what I just did, this implies we can use AI and natural language interfaces to create _"business logic"_ to our apps, where we're using natural language as our interface, and the AI extrapolates what business logic we want for it to use - Effectively ending up with an application that has infinite capacity for interactions.

Since CRUD is the axiom which all data centered apps evolves around, this implies if you've got CRUD you've got effectively 90% of everything you need to create highly rich AI-based apps, using nothing but natural language as their user interface, providing infinite possibilities for interactions to your end users. Some use cases can be found below.

* CRM systems
* TODO applications such as ClickUp
* Accounting systems such as SAP and QuickBooks
* Headless CMS systems where you're using the AI to interact with your CRM system's database
* Etc, etc, etc

Basically, every time you've got a database in an app you can use a simple formal CRUD API combined with ChatGPT to interact with that database.

## How I created the app

The app I created is based upon 11 tables, but I don't think there's any upper limit to the number of tables. Each table has 5 CRUD endpoints, giving us a total API endpoint count of 55. The API my above app has therefore consists of 55 HTTP endpoints. Notice, the 5th API endpoint is for counting records to reduce bandwidth consumption. The total number of lines of code for my app was 2,906 LOC.

What's probably more important than the above facts is how I created the app. You see I literally created the entire app in 5 minutes using [AINIRO Magic Cloud](https://ainiro.io/magic-cloud). You can follow the entire process in the following YouTube video.

{% embed https://www.youtube.com/watch?v=F4_KG0kHEiI %}

The above process can easily be duplicated for any database you have, allowing you to create an AI app based upon any database in 5 minutes. And the configuration options of the Magic backend generator that creates your CRUD endpoints just so happens to give you almost all configuration options you'll ever need to modify your app according to your requirements. I'm not going to go through all of its configuration options, but to give you a rough idea of its features you can look at the following screenshot.

![CRUD generator configuration options](https://ainiro.io/assets/images/crud-generator-configuration-options.jpeg)

## Try the app

You can [play with the app here](https://chat.openai.com/g/g-3bP6mag9i-chinook-ai-app). The app is publicly available for everyone. You have to register at OpenAI to access it, and you will use your own ChatGPT tokens when interacting with it - But the database you're using is the same database as everybody else, allowing you to persist items into the Chinook database when you're interacting with it. Below are some sample instructions you can use when interacting with it.

* Count albums using my Chinook action
* Use the Chinook action and list all customers with the last name of Hansen
* Create a new customer using my Chinook action having the name of John Doe and email john@doe.com
* Count customers using my Chinook action associated with the support representative having a last name of Park
* John Doe is a customer, use the Chinook action to update his email to john@hotmail.com

You have to be _"formal"_ as you speak to it. For instance, it doesn't automatically understand if you're talking about customers, artists, or support representatives if you just throw out a name. You also have to explicitly state you want to use the Chinook action.

Parts of the above issues can be fixed using some intelligent prompt engineering and apply an _"instruction"_ to the app. However, I wanted the app to be in a _"vanilla state"_, implying I did _zero_ changes to it after I was done with the above YouTube video to demonstrate it exactly the way it was as I finished creating it live in the above video. In fact, the only thing I changed after I was done with the above YouTube video was to add an image icon to the app.

## Beyond CRUD

Don't believe this is only about CRUD. We've got pre-defined API modules providing you with basically everything you need, and if we don't have these already, we can easily create such API modules, giving you almost anything you can imagine through your AI app. Below are some examples of modules we've already created that you can use in your cloudlet.

* Send email API endpoint allowing you to send emails from your AI app
* Search DuckDuckGo endpoint allowing you to search for information using DuckDuckGo and use in your AI app
* Etc ...

In fact, we can even provide you with Stripe payments directly from within your AI app, accepting payments through Stripe, assuming you've got a Stripe account from before. The point being that these are stand alone API endpoints you can use to populate your cloudlet, which again results in automatic GPT integration, allowing you to use any API logic you wish almost through an AI user interface.

## Create your own Low-Code GPT

Magic is the core of the AI app. Magic happens to be [open source](https://github.com/polterguy/magic). If installing Magic locally is too much of a hassle, we also happen to provide Magic Cloudlets as our flagship product. You can purchase a professional AINIRO plan below and get your own cloudlet.

* [Purchase a Magic Cloudlet](https://ainiro.io/buy)

With a Magic cloudlet from AINIRO.IO you also get backup, security, online deployment, your own sub-domain URL, etc. The cloudlet is also deployed in a Kubernetes cluster with multi-machine volumes, further tightening security and reducing likelihood of data loss, etc. However, if you can't afford a cloudlet, feel free to play with the open source version if you're technically savvy enough to setup your own server and deploy Magic to it.

Then watch the above YouTube video a couple of times to understand how to create Low-Code AI apps, and you're probably able to easily within some few hours create your own AI app entirely from scratch. If even this is too complex, we do provide such Low-Code AI apps as a service, and would be more than willing to help you create whatever app you need. If interested in this you can contact us below.

* [Contact AINIRO.IO](https://ainiro.io/contact-us#demo)

Depending upon your requirements, creating a fairly complex AI app, with CRUD operations and some custom actions such as sending email, etc, typically takes a day or two, costs you some €500 in setup, and an additional €198 per month to host the app after that. If this is too expensive for you, feel free to [download the open source version](https://github.com/polterguy/magic).