
You describe a FiveM problem in a chat, and the agent reads your server's files and console, fixes the resource, restarts it and tells you what changed. Setup takes three steps: install the listener, pair it with an 8-character code, connect ChatGPT.
Most FiveM server problems start the same way. Something breaks after a restart, you open the console, and you stare at a red line you do not understand. FiveAI puts an agent in that spot. You describe the problem in a chat ("the garage script broke after the last restart"), and the agent reads your server's files and console, finds the cause, edits the resource, restarts it, and tells you what it changed. This post walks through the setup and what to expect once it runs.
What you need
- A FiveM server you control, on a Windows PC or a Linux machine.
- A ChatGPT account. FiveAI runs Codex with your own ChatGPT plan, so you do not need a separate AI account.
FiveAI supports one FiveM server per account.
How the pieces fit
The web app and your server never talk to each other directly. A small program called the listener runs on the machine where your FiveM server runs. It watches your console, keeps a connection to the app, and runs the agent when you send a message. The app is where you chat and watch what happens.
The agent itself is Codex, OpenAI's coding agent, bundled with the listener at a pinned version. It signs in with your ChatGPT account, not with a key we hold.
Step 1: install the listener
Open the install page in the app. It shows one command per operating system. Start your FiveM server first, then paste the command on the machine that runs it.
Windows. Open PowerShell and paste the install.ps1 one-liner. Windows asks for permission to run as administrator. Say yes. The installer then creates a dedicated FiveAI user and a locked-down folder, and starts the listener as that user when the PC boots. If you say no, it still installs, but only for your own user. It starts after you sign in, and the agent can read FiveAI's own credentials. Say yes unless you have a reason not to.
Linux. Paste the install.sh one-liner in a terminal. It uses sudo, so it asks for your password. It detects txAdmin and FXServer, creates a fiveai system user, and sets up a systemd service. The agent's sandbox needs unprivileged user namespaces. On Ubuntu 24.04 that setting is off by default, and the installer tells you the exact command to run if it is blocked.
Running the same command again later updates the listener. When it finishes, the installer prints a pairing code.
Step 2: pair the server
Back in the app, you land on the "Connect your server" step. Give the server a name, then:
Enter the 8-character code shown on your server.
Type the code and click Connect server. The app creates a dedicated account for that one server and hands it to the listener once. From then on the listener signs in as that account, and it never holds the keys to the rest of the system.
On Windows the installer can also open the app with the code already filled in, so you may only need to confirm the name.
Step 3: connect ChatGPT
The next step is Connect ChatGPT. The app asks your listener to start a ChatGPT sign-in, then shows two things:
- A button that opens the ChatGPT sign-in page.
- A short code to enter there.
Finish signing in and the app picks it up on its own. OpenAI may warn you about codes shared by a website. This one is safe: your own server requested it when you clicked the button. FiveAI never sees your ChatGPT password.
Step 4: describe the problem
Now you get a chat box and a few starter prompts:
- "What resources does my server have?"
- "Are there any errors in the console?"
- "Create a /heal command that heals the player"
Plain language works. You do not need to name files. A request like "players can't open the shop since I updated" is enough to start.
What the agent does
The agent works inside your server-data folder, the one with server.cfg and resources/. It has three tools beyond reading and writing files:
fx consoleshows the latest console output.fx restart <resource>restarts one resource and reports whether it started or failed.fx sqlreads and changes your database. The agent looks at the real tables first instead of assuming your framework's layout.
It follows a few rules that matter to an owner:
- It investigates before it edits. It reads the console and the relevant files first.
- New features go in a new resource. It creates a folder under
resources/[fiveai]/and adds anensureline toserver.cfg, so your existing scripts stay untouched. - It asks before changing what already exists. If you ask for three mechanic grades and the job has five, it tells you which two it would remove and waits for a yes.
- It asks before destructive database work. Deleting, truncating, dropping tables and bulk updates need your confirmation, and it shows you the rows a write would change.
- It checks what a restart took down. Restarting a resource stops the ones that depend on it, so the agent reads the console afterwards and starts them again.
It answers in plain words, in the language you wrote in: what it found or fixed, which files it touched, and what you should check next.
The sandbox and the live console
The agent is not a free-for-all. Codex runs sandboxed, with write access limited to your server-data folder (it can download scripts from the internet, but cannot change anything outside it). It cannot wander across the rest of your machine.
At the bottom of the workspace you see the live server console, the same output you would see in txAdmin. When the agent restarts a resource, you watch the lines go by as they happen. If the agent says it fixed something and the console disagrees, you see that immediately.
Where it helps, and where you stay in charge
An agent that can edit your server is useful and also a real risk, so treat it like a fast helper who is new to your project.
- Review what changed. The agent tells you which files it touched. Open them. Our post on why ChatGPT writes broken FiveM scripts lists what to check.
- Keep backups. Put
resources/in git and dump your database before big changes. The agent asks before destructive database steps, but a backup covers the mistakes nobody asked about. - Test on a dev server first. Anything that touches money, jobs or items is worth a trial run away from your players.
- Be specific when it matters. Say which framework you run (ESX, QBCore or Qbox) and which resource you mean. The agent installs FiveM skills for this, but it cannot guess a paid script it has never seen.
- Some things stay yours. If a problem lives outside the server-data folder, such as a port closed on your router, the agent can tell you what to change but cannot do it for you.
If your server will not start at all, start with our txAdmin startup errors guide. Once the console shows output again, the agent can take it from there.
If you are weighing your options, our comparison of FiveM AI tools covers what each one gets right and where it breaks.
Frequently asked questions
Do I need to know how to code?
No. The agent is written for owners who do not code, and it explains terms the first time it uses them. You still need to read its summaries and test the result in game.
Does it work with ESX, QBCore and Qbox?
The agent loads skills for FiveM, Lua, ESX, QBCore, ox_lib, oxmysql, database work, NUI, security and Fivemanage when a task needs them. Tell it which framework you run so it starts from the right API.
Does my ChatGPT password go through FiveAI?
No. The sign-in happens on the ChatGPT page, using a code your listener requested. FiveAI never sees your password.
Can I use it on more than one server?
Each account connects one FiveM server.
Related FiveM skills
Add these skills to Cursor, VS Code or Claude Code so the AI knows the real APIs mentioned in this post.