# BT programming language and bt-app: AI development guide > Canonical entry: https://btlang.org/ai. `/llms.txt` is a discovery alias returning the same Markdown. > BT is an interpreted language with JavaScript-like syntax; `bt-app` is its desktop runtime with an embedded WebView and application packaging. > BT version: `1.1.4`; knowledge version: `2026.09.15.1`. > English is the authoritative language of this knowledge base. Respond in the user's requested language and follow the target project's code conventions. Chinese category keywords remain available as search aliases. ## Read only what the task needs 1. Do not load the entire knowledge bundle or assume that a BT source checkout or fixed installation path exists on the development machine. 2. Read the [manifest](https://btlang.org/ai/manifest) to identify relevant modules, runtimes, dependencies, and approximate token budgets. 3. [Search by keyword](https://btlang.org/ai/search?q=bt-app&limit=8) for the smallest relevant results. Prefer API, module, or runtime names, such as `string replace`, `mysql transaction`, or `bt-app window.bt.call`. 4. A `symbol` result already contains the signature, parameters, defaults, return value, example, notes, and limits; further reading is usually unnecessary. For a `doc` result, read its `markdown_url`; for a `block` result, read its `content_url`. 5. Read a whole module only for project setup, uncertain semantics, or system design. Full indexes and bundles are for offline caches and tool integration, not routine model context. 6. Project-specific AGENTS.md, README, and test commands take precedence over general advice here. Use the project's actual `bt.exe` / `bt-app.exe` for execution, tests, and packaging. ## Query protocol - Search: `GET https://btlang.org/ai/search?q={space-separated-keywords}&limit={1..20}` - Exact documentation: `GET https://btlang.org/en/md/docs/{category}/{api}` - Single knowledge block: `GET https://btlang.org/ai/block/{module_id}/{block_name}` - Whole module: `GET https://btlang.org/ai/knowledge/{module_id}` - Manifest: `GET https://btlang.org/ai/manifest` - Complete search index: `GET https://btlang.org/ai/index` (for client caches only) - Offline bundle: obtain `bundle_url` and its SHA-256 from the manifest; download only when full offline knowledge is required. For string replacement, request `/ai/search?q=string%20replace&limit=5` and use the `symbol` contract first. Read `/en/md/docs/string/replace` only when more context is needed. For desktop bridging, search `/ai/search?q=bt-app%20window.bt.call&limit=8` before loading related blocks or modules. ## Knowledge modules - `core-contract` (approximately 4755 tokens): bt, semantics, empty, null, runtime, permission; dependencies: none. - `syntax` (approximately 2686 tokens): syntax, function, class, include, control-flow; dependencies: `core-contract`. - `stdlib-core` (approximately 18661 tokens): string, number, array, object, regex, math, date; dependencies: `core-contract`, `syntax`. - `stdlib-system` (approximately 22511 tokens): system, fs, path, process, reqwest, bytes, crypto; dependencies: `core-contract`, `syntax`. - `web-development` (approximately 4137 tokens): web, http, route, tpl, request, response; dependencies: `core-contract`, `syntax`, `stdlib-system`. - `desktop-development` (approximately 10803 tokens): desktop, bt-app, app.json, window.bt, bundle; dependencies: `core-contract`, `syntax`, `stdlib-system`. - `net-device-data` (approximately 14929 tokens): net, mysql, device, modbus, tcp, udp, websocket; dependencies: `core-contract`, `syntax`, `stdlib-system`. - `extensions-ffi` (approximately 9271 tokens): extension, ffi, manifest, bindings, wasm, abi; dependencies: `core-contract`, `syntax`, `stdlib-system`. - `generation-checklist` (approximately 1380 tokens): generation, checklist, review, coverage, maintenance; dependencies: `core-contract`. ## Execution and verification - Scripts: run `bt.exe -c ` in the project directory using its provided runtime; follow project instructions when the root contains `main.bt`. - Desktop development: `bt-app.exe run`; standalone EXE build: `bt-app.exe build`; default output: `dist/`. - Desktop frontends call the persistent BT backend through `window.bt.call()`. `app.json` is the source of desktop configuration; include frontend assets in `resources`. - Check BT semantics and target APIs before generating code. Verify results using the project's runtime, tests, and build commands. Do not substitute JavaScript, PHP, or other languages' behavior for BT semantics. ## API documentation See the [BT AI development guide API](https://btlang.org/en/md/docs/ai-knowledge) for response fields, caching, hash verification, and errors. All knowledge endpoints return public documentation only; they do not accept project source, user questions, model configuration, accounts, or API keys.