Repository navigation
Installation
AICS - KSP Chat Bridge has two halves: the plugin that lives in your KSP GameData folder, and the bridge, a Python program that does the thinking. CKAN and the release zip only install the plugin; the bridge always comes from the GitHub repository. Plan on about fifteen 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. - Python 3.12 on Windows (that's what it's built and tested on).
- 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.dll. - 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).
-
Install Python 3.12 from python.org. Tick "Add python.exe to PATH" in the installer, it saves a headache later.
-
Get the code:
git clone https://github.com/zernon916/KSPChatBridge.git, or download the repository as a zip from GitHub and unpack it somewhere permanent, for exampleC:\Games\KSPChatBridge. -
Open a command prompt in that folder and install the three Python packages it needs (krpc 0.6.0, protobuf, mcp):
python -m pip install --user -r requirements.txt -
Start KSP once and load a save. The plugin creates
GameData/KSPChatBridge/PluginData/bridge.cfg. Quit KSP, open that file 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.
From now on the plugin starts the bridge in a hidden window when KSP starts (if it isn't already running) and stops it when KSP quits. If anything goes wrong, you'll see [bridge] ... lines in the chat window. You can also start it by hand with start_bridge.cmd or python run_bridge.py serve.
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.
- 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 in the bridge folder 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 the bridge folder (next to run_bridge.py). 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, or 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. |
| 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.