Skip to content

Acea-K/DeepJeb

Repository files navigation

DeepJeb Logo

DeepJeb

AI Assistant for Kerbal Space Program
An in-game AI/LLM chat window that reads, writes, and helps you build.
KSP 1.12.5 · Unity 2019.2 · C# 7.3 · Zero Dependencies

MIT License KSP 1.12.5 v0.5.6

English | 简体中文 | Deutsch | Français | Italiano | 日本語 | Português | Русский | Español


What is DeepJeb?

DeepJeb embeds an AI chat window directly inside KSP. Ask it anything — write Module Manager patches, configure mods, explain orbital mechanics, debug a kOS script, or design a rocket that won't flip on ascent.

DeepJeb ships with a comprehensive KSP world knowledge base: game mechanics, orbital physics (Kepler's laws, delta-V, gravity assists), all stock celestial bodies, spacecraft design principles, DLC content, modding conventions, and community resources. But its real power is the skill system — you can drop any SKILL.md document into the Skills/ folder and the AI will load it as domain knowledge. Teach it about your favorite mod, your custom planet pack, or your personal build conventions. The skill format is open and documented — your expertise, your rules.

You need your own API key. DeepJeb does not include or provide any AI service — you connect it to your own OpenAI, Anthropic, Google Gemini, DeepSeek, or other compatible API account. All API traffic goes directly from your machine to the provider you configure. You can also point it at a locally deployed LLM (via Ollama, vLLM, or any OpenAI-compatible endpoint) to keep everything fully under your own control.

How your API key is stored. In memory, your key is held in plaintext (required for API authentication). On disk, keys are encrypted using XOR obfuscation with Base64 encoding — they are never written to the config file in plaintext. For OpenAI and Anthropic, API keys are sent as HTTP Bearer token headers which KSP's debug console does not log. The Google Gemini API is the exception — see Known Issues below.


What Can It Do?

DeepJeb comes with 7 built-in knowledge bases (Agent Skills) and 9 tools the AI can use.

Knowledge Bases (Skills)

Skill Description
KSP World Knowledge Stock game mechanics, orbital physics, celestial bodies, spacecraft design, DLC content, modding tips, community resources
KSP Craft Files .craft file format, PART fields, quaternion rotation, attachment nodes, mirror symmetry, radial sizes, stock part reference, parser tools, troubleshooting
Module Manager MM patch syntax, operators, ordering directives, NEEDS/DEPENDS checking, variables, common patterns
kOS Programming KerboScript language reference, flight control, maneuver nodes, boot files, triggers
kRPC Programming Architecture, Python/C#/Lua client APIs, SpaceCenter, AutoPilot, vessel control, streaming data
MechJeb All guidance modules, career integration, real-time value modification via kRPC/kOS
Realism Overhaul Comprehensive RO/RP-1/RSS mod suite — 68 repos, installation, parts, engines, life support, historical spacecraft, troubleshooting

Skills are matched automatically by keyword overlap with your question — the top 2 hits are injected as context.

AI Agent Tools

Tool What the AI can do
read_file Read any file inside GameData
write_file Create or overwrite a file (auto-creates directories, backs up previous version)
delete_file Delete a file (creates timestamped .bak backup first)
list_directory List directory contents with file sizes and modification times
file_exists Check if a file or directory exists
backup_file Create a timestamped .bak snapshot without modifying the original
get_game_state Report current KSP game state (vessel, orbit, biome, resources)
web_search Search the web for current information and documentation
fetch_url Fetch and read the text content of a web page

The AI can read Squad/SquadExpansion files but cannot modify or delete them.

Slash Commands

Type / in the chat input to run commands locally — no AI round-trip:

Command What it does
/retry Resend your last message to the AI
/undo Remove the last exchange pair from the session
/help List all available commands
/session Show current session info (provider, model, message count)
/game Display current KSP game state (scene, vessel, orbit, biome, resources)

Supported Providers

12 built-in presets + custom provider support across 3 protocol families:

Protocol Built-in Presets
OpenAI-compatible OpenAI, DeepSeek, OpenRouter, Grok (xAI), Mistral, Together AI, Perplexity, Groq, Ollama, vLLM, Custom
Anthropic Anthropic (Claude)
Google Gemini Google (Gemini)

Custom endpoints, API keys, model lists, and provider names are all configurable in-game through the Settings window. Model lists are fetched live from each API.


What is an Agent Skill?

DeepJeb's knowledge bases are Agent Skills — a standard format for packaging domain expertise with an AI assistant. Each skill is a SKILL.md file with YAML frontmatter (name, description, triggers) and a Markdown body containing the knowledge. Skills are placed in the Skills/ directory and loaded at startup.

How Skills Work

To add your own skill to DeepJeb, create a SKILL.md file in GameData/DeepJeb/Skills/{category}/{name}/ with:

---
name: your-skill-name
description: >
  What this skill covers.
---
# Your knowledge content here

Reference files (scripts, tables, examples) can be placed in a references/ subdirectory — they'll be injected alongside the skill when matched.

Conditional Skill Activation

You can use the when_to_use frontmatter field to make a skill only activate when a specific mod is present. The AI agent can check GameData/ for installed mods before loading the skill:

---
name: my-mod-guide
description: >
  Knowledge base for MyMod. Only activate when the mod is installed.
when_to_use: |
  Trigger when the user's GameData folder contains "MyMod".
condition: file_exists("MyMod/") -> true
---
# MyMod configuration guide

Use file_exists or list_directory tool calls as conditions to gate skill loading — this way DeepJeb won't load irrelevant knowledge for mods you don't have installed.


Installation

  1. Copy the DeepJeb/ folder into your KSP GameData/ directory
  2. Launch KSP — the DeepJeb toolbar icon appears in all scenes
  3. Click the icon to open the chat window
  4. Open Settings to configure an API provider and model
  5. Start chatting

Tip: Press Enter to send, Ctrl+Enter or Shift+Enter to insert a newline.

Requirements: KSP 1.12.0+ (tested on 1.12.5). No additional mods or dependencies required.


Known Issues

  • Model availability: Model lists are fetched live from each API provider. If the API is unreachable, the model dropdown shows the last cached list or "Loading..." indefinitely. Check your API key and network connection.
  • Context truncation: Very long conversations may lose earlier messages when approaching the model's context window limit. Use /clear periodically for long sessions.
  • UI scaling: The chat window uses fixed pixel dimensions (600×500 default). On very small or very large screens, the layout may not scale ideally.
  • KSP scene transitions: The chat window persists across scene changes, but in-progress AI generation is stopped on scene load.
  • Google Gemini API key: The Gemini API requires the API key to be passed as a URL query parameter (this is Google's design, not a DeepJeb choice). As a result, if you use the Google Gemini provider, your API key may appear in plaintext in KSP's debug console logs when using Alt+F12 debugging. Keys for OpenAI and Anthropic are sent as HTTP headers and are not logged.
  • Streaming performance: Very long AI responses may cause minor UI frame-rate fluctuations during token-by-token rendering.
  • ClickThroughBlocker: If you have ClickThroughBlocker installed, you may need to click the DeepJeb toolbar icon twice to open or close the window. This is expected — DeepJeb uses its own click-through detection.

License

MIT License

Copyright © 2026 Acea - vibe coded using Claude Code / DeepSeek V4 Pro

MiniJSON based on the public-domain implementation by Calvin Rien.

The three Python files in the ksp-craft-files skill (ksparser.py, import_craft.py, part_dict.py) are derived from io_kspblender by Spencer Arrasmith, licensed under GPL-2.0. They are included for reference and demonstration only.


Built for the Kerbal Space Program modding community. Fly safe.

About

An AI assistant & agent plugin for KSP.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages