Use interactive_runner.py to control the robot from a terminal.
- Live hardware mode:
python interactive_runner.py --mode local --llm-provider openai- Dry-run mode (no hardware):
python interactive_runner.py --mode dry-run --llm-provider openai- Remote host mode (LLM on host, motion on robot device):
HEXAPOD_ROBOT_URL=http://<robot-ip>:8080 python interactive_runner.py --mode remote --llm-provider openaiBackwards-compatible shortcut for dry run still works:
python interactive_runner.py --dry-run --llm-provider openai-
OpenAI (
--llm-provider openai)- Required env var:
OPENAI_API_KEY - Optional model override:
--llm-model gpt-4o-mini
- Required env var:
-
Gemini (
--llm-provider gemini)- Required env var:
GEMINI_API_KEY - Optional model override:
--llm-model gemini-2.0-flash
- Required env var:
-
Ollama (
--llm-provider ollama)- Requires local Ollama server + model available
- Optional model override:
--llm-model llava
- Set
LANGSMITH_API_KEYto enable LangSmith traces for LLM calls. - Optional: set
LANGSMITH_PROJECTto group runs under a custom project name. - The runner enables LangSmith tracing automatically when an API key is present.
-
Input starting with
/is treated as a direct command:/help,/state,/stop,/relax,/balance/snapshot [output_path](captures the current camera frame to a file)/walk <y> [ttl] [speed] [gait_type]/rotate <angle> [ttl] [speed]/attitude <roll> <pitch> <yaw>/position <x> <y> <z>/quit
-
Any input without
/is treated as a natural-language goal and forwarded to the LLM controller.
- The prompt supports terminal history navigation with
↑/↓arrows. - History is persisted across runs in
~/.hexapod_history.
Move forward slowly until you are about 30 cm from obstacles, then stop.Rotate right about 45 degrees and hold position.Take a cautious step backward and stop if space behind is limited.Find a safer stance and relax once stable.
--max-iterations 20sets max LLM action iterations per goal.--chat-history-turns <n>controls how many previous chat turns are retained (default: full history,0: current turn only).--llm-model <name>overrides the default model for the selected provider.--mode local|dry-run|remotecontrols execution backend.--robot-url <url>sets robot service URL in remote mode.
HEXAPOD_ROBOT_URLsets default robot URL for remote mode (http://127.0.0.1:8080by default).LANGSMITH_API_KEYenables LangSmith tracing.LANGSMITH_PROJECTsets the LangSmith project name used by traces.
- Robot device (
server/robot_service.py):- Owns one
MotionExecutorinstance - Executes hardware motion via
Control+ drivers - Enforces runtime safety checks before/while executing actions
- Owns one
- Host machine (
interactive_runner.py --mode remote):- Runs LLM reasoning and orchestration (
LLMRobotController) - Sends motion actions to robot over HTTP
- Runs LLM reasoning and orchestration (
Implemented in server/core/api_contract.py.
ActionJSON payload:type: action type string (existingActionTypevalues, e.g.walk,stop,balance,complete)params: objectttl: numbermetadata: object
WorldStateJSON payload:roll,pitch,yaw,distance,is_balancing,timestamp,is_safe,safety_reasoncurrent_action: action type string ornull
POST /actions-> submitActionpayloadPOST /actions/stop-> force stop actionGET /state-> currentWorldStateGET /health-> basic service health
python server/robot_service.py --host 0.0.0.0 --port 8080HEXAPOD_ROBOT_URL=http://<robot-ip>:8080 python interactive_runner.py --mode remote --llm-provider openaiOptional explicit URL flag:
python interactive_runner.py --mode remote --robot-url http://<robot-ip>:8080 --llm-provider openaiOptional system prompt file:
python interactive_runner.py --mode remote --robot-url http://<robot-ip>:8080 --llm-provider openai --system-prompt-file ./system_prompt.txtHEXAPOD_ROBOT_URL: robot endpoint base URL for host remote mode (defaulthttp://127.0.0.1:8080)HEXAPOD_SYSTEM_PROMPT_FILE: optional path to a text file used as the LLM system promptHEXAPOD_SYSTEM_PROMPT: optional inline system prompt text (takes precedence over file)- LLM provider keys remain unchanged:
- OpenAI:
OPENAI_API_KEY - Gemini:
GEMINI_API_KEY - Ollama: local server/model availability
- OpenAI: