# Compatibility (/docs/compatibility) Almost every FiveM script is written for ESX, QBCore or Qbox, so running them is a main goal. AI Core ships no third-party scripts and favours no vendor: you install your own. ## Three layers [#three-layers] ### Framework bridge [#framework-bridge] AI Core provides `es_extended`, `qb-core` and `qbx_core` and answers their exports, core objects and events, so scripts written for ESX, QBCore or Qbox see AI Core as their framework and run unchanged. ### Integrations [#integrations] AI Core and the `ai-*` scripts need things other scripts provide: inventory, target, notify, phone, fuel, vehicle keys and more. Each category has one interface and each supported script is one adapter file. AI Core detects the installed script on start, and the admin panel can override the choice per category. ### Per-script notes [#per-script-notes] Every tested third-party script gets a note: tested version, status and known limits. See the [compatible scripts](/scripts) list for what AI Core integrates with today. ## Adding a script [#adding-a-script] Supporting a new script is one small, repeatable job: copy the category's adapter template, fill in its calls, add one line to the registry. You can ask your AI to do it. # Introduction (/docs) **AI Core** is a free, open-source FiveM framework built from the ground up with **TypeScript**, designed to make server development easier, smarter and more accessible to everyone. Inspired by ESX and QBCore, AI Core combines an AI-friendly architecture, cross-framework compatibility, automatic resource integration and in-game management tools. Whether you are an experienced developer or have never written a line of code, you can build your server your way. ## Why AI Core [#why-ai-core] Dedicated AI instructions, development guidelines and one consistent TypeScript architecture. Designed to run existing ESX and QBCore scripts, including paid third-party resources. Detects supported installed scripts and adapts related systems. Framework settings live in an in-game admin panel, not in config files. ## Next steps [#next-steps] # Installation (/docs/installation) ## Requirements [#requirements] | Dependency | Version | Why | | --- | --- | --- | | FXServer (artifact) | 38039 or newer recommended | Newer builds let the server see player deaths itself. Older builds still run. | | [Bun](https://bun.sh) | latest | Installs packages and builds the TypeScript resources. | | MariaDB | latest | The database. | ## Setup [#setup] ### Get the server data folder [#get-the-server-data-folder] Clone [ai-core](https://github.com/aifivem/ai-core) into the folder you will use as your server data folder. ### Configure secrets [#configure-secrets] Copy `env.example.cfg` to `env.cfg`, fill in your license key and the database connection, then create the database. ### Install and build [#install-and-build] ```bash bun install bun run build ``` ### Start the server [#start-the-server] Start FXServer (txAdmin) with this folder as the server data folder. ## Layout [#layout] | Path | What | | --- | --- | | `server.cfg`, `security.cfg`, `misc.cfg`, `permission.cfg` | Server config. Secrets go into `env.cfg`. | | `resources/[ai]/` | AI Core resources, each `ai-*` folder its own git repo. | | `resources/[standalone]/` | Third-party resources. | | `packages/` | The `@aicore-fivem/*` npm packages. | | `template/` | Template for new resources: `bun run new ""`. | # Working with AI (/docs/working-with-ai) AI Core is built so that someone who cannot code can ask an AI to change a script or write a new one, and get a result that fits. Open your server data folder in Claude Code (or another coding agent: it reads `AGENTS.md`) and ask in your own words. The AI finds: | File | What it holds | | --- | --- | | `CLAUDE.md` | Goals, structure, decisions, the build and check process. | | `.claude/rules/` | Topic rules that load when matching files are edited. | | `.claude/skills/aicore-fivem`, `aicore-ui`, `aicore-mysql` | FiveM engine, NUI and SQL knowledge. | | `resources/[ai]/