djungelorm
New Member
- Messages
- 4
- Reaction score
- 9

kRPC allows you to control the game from scripts written in Python, C#, C++, C, Java, Lua and more.
This a continuation of the mod of the same name for KSP, and shares the same client libraries with it. It provides a server that runs in KSA, and works with all the same client libraries that the original kRPC mod uses.
This python script launches a rocket from Cape Canaveral, flies it straight up, and cuts the engines at 10 km:
Python
import krpc
conn = krpc.connect(name="Launch")
ksa = conn.ksa
vehicle = ksa.launch_vehicle("Rocket", "CCSFS LC-39A")
flight = vehicle.flight
vehicle.auto_pilot.target_pitch_and_heading(90, 90)
vehicle.auto_pilot.engage()
vehicle.control.throttle = 1
vehicle.control.activate_next_sequence()
vehicle.control.engine_on = True
event = conn.add_event(lambda: flight.mean_altitude > 10000)
with event.condition:
event.wait()
vehicle.control.engine_on = False
print(f"{vehicle.name} reached 10 km")
- Telemetry: altitudes, speeds, attitude, pressure, g-force, thrust and specific impulse, and the delta-v of each sequence.
- Orbits, including the orbits of bodies, the orbit after a planned burn, and the predicted trajectory through sphere of influence changes.
- Parts, resources and part modules: engines, RCS, decouplers, parachutes and docking ports.
- Landing: terrain height anywhere on a body, altitude above the terrain, and the time to impact.
- Reference frames, with positions, velocities and rotations in body, vehicle, surface and orbital frames.
- Control: throttle, engines, staging, and the flight computer as an auto-pilot, including executing planned burns.
- Launching vehicles onto a launch pad, and time warp.
- Server side functions: events, streams and functions that run inside the game, once per frame.
- gRPC server: the mod includes a server that can talk to gRPC clients. Allows any language that gRPC supports to communicate.
SpaceDock
Documentation
krpc.github.io/krpc/experimental/ksa, with a getting started guide, tutorials, and the API reference for each client language.
Find us on Discord: https://discord.gg/c8c36UM
Requirements
- Kitten Space Agency v2026.10.25.5707
- StarMap 0.4.8 by KlaasWhite (MIT)
- A kRPC 0.7.0 client library, for example the Python client:
pip install krpc==0.7.0See the documentation website (link above) for more details. - Tested on Windows and Linux.
kRPC is listed on Borea
Manually:
- Install StarMap
- Copy the
kRPCfolder from the archive into<Documents>/My Games/Kitten Space Agency/mods. - Enable the mod in
<Documents>/My Games/Kitten Space Agency/manifest.toml:
Code[[mods]] id = "kRPC" enabled = true - Launch the game through StarMap.
- The server starts once the game has loaded its mods, and listens on 127.0.0.1, ports 50000 and 50001.
Source and Bug Reports
Source: github.com/krpc/krpc
Bug reports and feature requests: GitHub issues
License
kRPC is licensed under the LGPL v3. It bundles Google.Protobuf (BSD 3-Clause), System.IO.Ports (MIT), ASP.NET Core (MIT) and gRPC for .NET (Apache 2.0), whose licenses are in the archive.
Last edited: