Repository navigation
Installation
AICS - KSP Chat Bridge has two halves: the plugin that lives in your KSP GameData folder, and the bridge, the program that does the thinking. Since version 0.1.1 CKAN and the release zip install both: the bridge comes ready to run as GameData/KSPChatBridge/Bridge/AICSBridge.exe, so you don't need Python or the source code. Plan on about ten minutes, most of which is downloading an AI model if you go local.
[COMMS] Bill (Eng): Two halves, one mod. Like a rocket and its launch clamps. Except you keep both.
- Kerbal Space Program 1.12.x (it's developed on 1.12.5).
- kRPC 0.6.x. Required. The bridge talks to KSP only through kRPC.
-
MechJeb2 + kRPC.MechJeb. Optional but recommended. Rocket ascent, orbital maneuvers, targeted landings and docking use MechJeb. Planes, propeller craft, helicopters, the crew and the dashboard all work without it; the AICS menu just shows
no MJin grey. - Windows (the bundled bridge is a Windows exe; on other systems run the bridge from source, see below).
- An AI backend: LM Studio for a local model, or an API key for a cloud service. See below.
Search for AICS - KSP Chat Bridge (identifier KSPChatBridge). CKAN pulls in kRPC automatically and offers MechJeb2 and kRPC.MechJeb as recommendations. Say yes to those unless you have a reason not to.
CKAN listing is pending review at the time of writing. If you can't find it yet, use the manual install.
- Download
KSPChatBridge-<version>.zipfrom the Releases page. - Unzip it into your KSP folder so you end up with
GameData/KSPChatBridge/Plugins/KSPChatBridge.dllandGameData/KSPChatBridge/Bridge/AICSBridge.exe. - Install kRPC yourself (and, if you like, MechJeb2 and kRPC.MechJeb; kRPC.MechJeb's DLL goes in
GameData/kRPC).
The first time you start KSP with kRPC, open its server window and:
- turn on auto-start for the server, and
- turn on auto-accept new clients (otherwise KSP pops up a "new client" question every time the bridge connects).
Defaults are fine for everything else: address 127.0.0.1, RPC port 50000, stream port 50001. If you change them, set KRPC_ADDRESS, KRPC_RPC_PORT and KRPC_STREAM_PORT for the bridge to match (see Settings).
The plugin starts the bundled AICSBridge.exe in the background (no window) when KSP starts, if a bridge isn't already running, and stops it when KSP quits. If anything goes wrong, you'll see [bridge] ... lines in the chat window and details in GameData/KSPChatBridge/PluginData/logs/bridge.log.
The bridge keeps your data in GameData/KSPChatBridge/PluginData/: API keys (.env), settings, playstyle notes, crew personalities and logs. Updates (and CKAN) leave that folder alone. Some antivirus tools are suspicious of PyInstaller-built programs in general; if yours complains, see Build it yourself below or run from source.
-
Install Python 3.12 from python.org (tick "Add python.exe to PATH").
-
Get the code:
git clone https://github.com/zernon916/KSPChatBridge.git, or download the repository as a zip and unpack it somewhere permanent, for exampleC:\Games\KSPChatBridge. -
In that folder run:
python -m pip install --user -r requirements.txt -
Start KSP once so the plugin creates
GameData/KSPChatBridge/PluginData/bridge.cfg. Quit KSP and setbridge_dirto the folder from step 2:autostart = true stop_on_quit = true bridge_dir = C:\Games\KSPChatBridge python = pythonIf
pythonisn't on your PATH, put the full path topython.exeon thepython =line. Withbridge_dirset, the plugin runspython run_bridge.py servefrom your checkout instead of the bundled exe, and the bridge keeps its data (.env, logs, ...) in that folder. Leavebridge_dirempty to go back to the exe. You can also start it by hand withstart_bridge.cmdorpython run_bridge.py serve.
The source code is public on GitHub, and AICSBridge.exe is built from exactly that source (run_bridge.py and the kspchat folder) with PyInstaller, nothing added. To build it yourself, run this in a clone of the repository:
powershell -ExecutionPolicy Bypass -File tools\package_release.ps1
It sets up a private Python environment with the packages from requirements.txt plus PyInstaller, builds the plugin and the exe, and writes the release zip plus its SHA-256 checksums to dist\. The PyInstaller step on its own is:
python -m PyInstaller --noconfirm --clean --onefile --windowed --name AICSBridge --icon assets\AICSBridge.ico --add-data "playstyle_notes.example.md;." --collect-submodules kspchat run_bridge.py
Every GitHub release lists the SHA-256 checksums of the zip and of AICSBridge.exe, so you can check your download. A rebuild won't match those hashes byte for byte (PyInstaller builds aren't reproducible), so to verify the code itself, read the source or run from source.
Small, direct orders like "gear down", "heading 090" or "throttle 60" are understood by the bridge itself and never need the AI (see Captain's Orders). Anything conversational ("can we make it to the Mun with this?") goes to the AI you pick.
Step-by-step setup for LM Studio and Ollama, plus which model to pick for your graphics card: Local AI Setup.
- Install LM Studio and download a model with tool-calling support.
- Load it. The bridge uses whichever model is loaded in LM Studio. If nothing is loaded, it starts the LM Studio server on port 1234 and loads
qwen/qwen3.5-9bwith a 16k context through LM Studio'slmscommand-line tool.
Model notes from our own testing (KSP running at the same time, 10 GB graphics card):
| Model | How it did | Graphics memory |
|---|---|---|
qwen/qwen3.5-9b |
the fallback default; picked the right tool 8 out of 8 times | about 6 GB |
google/gemma-4-e4b |
also 8/8, a bit faster, the lightweight pick | about 4.7 GB |
qwen3-4b-instruct-2507 |
fast and loads in seconds; 6/8, sometimes answers without checking | about 5.4 GB |
Avoid models that can't do proper tool calls: they'll chat nicely and fly nothing. KSP plus a local model is a lot for one graphics card; if KSP stutters, try the smaller model or a cloud backend. You can switch models from the chat with /model (see Settings).
Sidry: Smaller model, smaller brain. Still smarter than Jeb. Don't tell Jeb.
Cloud (and other) backends: Groq, Gemini, OpenAI, OpenRouter, Hugging Face, Ollama, or anything OpenAI-compatible
The easy way is in game: open AICS -> Settings, pick the backend, paste your key into the API key field and press Save. The bridge stores it in a .env file (GameData/KSPChatBridge/PluginData/.env with the bundled exe, the repository folder when running from source) and starts using it immediately, no restart. The field shows only the last four characters afterwards.
Or write the .env file yourself, one line per key, in that same place (PluginData, or next to run_bridge.py from source). Only add the ones you use:
GROQ_API_KEY=your-groq-key-here
GEMINI_API_KEY=your-gemini-key-here
OPENAI_API_KEY=your-openai-key-here
OPENROUTER_API_KEY=your-openrouter-key-here
HF_TOKEN=your-hugging-face-token-here
Then restart the bridge (quit and restart KSP; from source you can also run powershell -File tools\restart_bridge.ps1).
| Backend | Key | Default model | Notes |
|---|---|---|---|
| Groq |
GROQ_API_KEY (free at console.groq.com) |
openai/gpt-oss-120b |
Fast. The free tier's tokens-per-minute cap is tight; the bridge waits and retries when it's hit. |
| Gemini |
GEMINI_API_KEY or GOOGLE_API_KEY (free at aistudio.google.com) |
gemini-flash-latest |
Generous free tier on the Flash models. |
| ChatGPT (API) | OPENAI_API_KEY |
gpt-4.1-mini |
Paid. |
| OpenRouter | OPENROUTER_API_KEY |
openrouter/free |
Free models, about 50 requests a day. |
| Hugging Face |
HF_TOKEN (needs "Inference Providers" permission) |
openai/gpt-oss-120b:fastest |
Little or no free credit. |
| Ollama | none (ollama serve on this PC) |
first installed model | Local alternative to LM Studio. OLLAMA_MODEL picks one. See Local AI Setup. |
| Custom |
CUSTOM_AI_URL, CUSTOM_AI_MODEL, optional CUSTOM_AI_KEY
|
whatever you set | Any OpenAI-compatible server: Mistral, DeepSeek, xAI, Anthropic's compatibility endpoint, a local vLLM or llama.cpp. |
Change a default model with the matching variable, for example GROQ_MODEL=... or GEMINI_MODEL=.... A backend without a key doesn't break anything; it just tells you which key to add. Free tiers change often and may use your prompts for training, so check the provider's terms.
Never share your .env file or paste keys into chat. It's ignored by git, so it won't end up in a commit.
In game: AICS -> Settings -> AI backend (dropdown), or type /ai groq, /ai gemini, /ai local and so on in the chat. /ai on its own lists them. The choice is remembered.
Start KSP, load a save, put something on the launch pad, press Alt+K and type:
report
Your pilot should answer with altitude, speed, heading and fuel. If you get nothing or a [bridge] error, head to Troubleshooting.
[INTERCOM] Bob (Sci): It talked back! Is it alive? Should I name it? I'm naming it.
Next: Quick Start.
- Home
- Installation
- Local AI Setup
- Quick Start
- Captain's Orders
- Autopilots
- Flight Plans
- Emergencies and the Systems Dashboard
- The Crew
- Settings and Slash Commands
- The AICS Menu and Windows
- Troubleshooting and FAQ
- Contributing and Known Issues
Repository · Releases · Issues
[INTERCOM] Bob (Sci): Lost? Me too. Click Home.