simulatecraft.server.app¶
simulatecraft.server.app
¶
FastAPI app: REST control + live websocket broadcast + inbound human input.
ControlBody
¶
Bases: BaseModel
Optional extras for control commands (step count, rates, etc.).
SimulationServer
¶
SimulationServer(runner: Runner, host: str = '127.0.0.1', port: int = 8000)
Owns the uvicorn server + a background simulation task.
Usage::
runner = Runner(environment=env, agents=[...])
async with SimulationServer(runner) as server:
await server.serve()