executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
srtKorean SRT (Super Rapid Train) search, reservation, and booking management
Independent GitHub snapshot · Automated classification · Original documentation governs
OpenClaw skill for managing Korean SRT (Super Rapid Train) reservations with search, booking, view, and cancellation capabilities.
Set your SRT credentials as environment variables:
export SRT_PHONE="010-1234-5678"
export SRT_PASSWORD="your_password"
Add these to your shell profile (~/.zshrc, ~/.bashrc, etc.) for persistence.
Security Note: Avoid committing credentials to version control.
Important: Phone number must include hyphens in the format 010-XXXX-XXXX
Use the /srt slash command in OpenClaw:
/srt search --departure "수서" --arrival "부산" --date "20260217" --time "140000"
/srt reserve --train-id "1"
/srt reserve --retry --timeout-minutes 60
/srt reserve --retry --train-id "1,3,5" --timeout-minutes 60
/srt log -n 30
/srt list
/srt cancel --reservation-id "RES123456"
The AI can invoke this skill based on user intent:
Examples:
# Search trains
uv run --with SRTrain python3 scripts/srt_cli.py search \
--departure "수서" \
--arrival "부산" \
--date "20260217" \
--time "140000" \
--passengers "adult=2"
# Make reservation (single attempt)
uv run --with SRTrain python3 scripts/srt_cli.py reserve --train-id "1"
# Make reservation with automatic retry - all trains (background mode recommended)
uv run --with SRTrain python3 scripts/srt_cli.py reserve --retry \
--timeout-minutes 60 \
--wait-seconds 10
# Make reservation with automatic retry - specific trains only
uv run --with SRTrain python3 scripts/srt_cli.py reserve --retry \
--train-id "1,3,5" \
--timeout-minutes 60 \
--wait-seconds 10
# Check reservation log
uv run --with SRTrain python3 scripts/srt_cli.py log -n 30
# View bookings
uv run --with SRTrain python3 scripts/srt_cli.py list --format json
# Cancel booking
uv run --with SRTrain python3 scripts/srt_cli.py cancel \
--reservation-id "RES123456" \
--confirm
Main SRT Stations:
Important: Station names MUST be in Korean (Hangul) for the SRT API to work correctly.
20260217 for February 17, 2026)140000 for 2:00 PM, 093000 for 9:30 AM)This skill provides 5 tools for managing SRT train reservations:
Search for available trains between stations.
Usage:
uv run --with SRTrain python3 scripts/srt_cli.py search \
--departure "수서" \
--arrival "부산" \
--date "20260217" \
--time "120000"
Returns: JSON array of available trains with seat availability
JSON Format:
{
"success": true,
"data": [
{
"train_id": "1",
"train_number": "301",
"train_name": "SRT301",
"departure_time": "120500",
"arrival_time": "143000",
"departure_station": "수서",
"arrival_station": "부산",
"seat_available": true,
"general_seat": "예약가능",
"special_seat": "예약가능"
}
]
}
Reserve trains with optional automatic retry support.
Usage (single attempt):
uv run --with SRTrain python3 scripts/srt_cli.py reserve --train-id "1"
Usage (with retry):
# Try all trains
uv run --with SRTrain python3 scripts/srt_cli.py reserve --retry \
--timeout-minutes 60 \
--wait-seconds 10
# Try specific trains only
uv run --with SRTrain python3 scripts/srt_cli.py reserve --retry \
--train-id "1,3,5" \
--timeout-minutes 60 \
--wait-seconds 10
Options:
--train-id: Specific train(s) to reserve (comma-separated, e.g., "1" or "1,3,5"; omit to try all trains)--retry: Enable automatic retry on failure--timeout-minutes: Maximum retry duration in minutes (default: 60)--wait-seconds: Wait time between retry attempts in seconds (default: 10)Behavior with --retry:
--wait-seconds between attempts (plus rate-limiting delays)~/.openclaw/tmp/srt/reserve.logReturns: Reservation details with payment deadline
JSON Format:
{
"success": true,
"data": {
"reservation_id": "RES123456",
"journey_date": "20260217",
"journey_time": "120500",
"departure": "수서",
"arrival": "부산",
"train_number": "301",
"seat_number": "3A",
"payment_required": true,
"attempts": 12
}
}
Note:
List all current reservations.
Usage:
uv run --with SRTrain python3 scripts/srt_cli.py list --format json
Returns: JSON array of active reservations
JSON Format:
{
"success": true,
"data": [
{
"reservation_id": "RES123456",
"journey_date": "20260217",
"journey_time": "120500",
"departure": "수서",
"arrival": "부산",
"train_number": "301",
"seat_number": "3A",
"payment_required": true
}
]
}
Cancel a reservation by ID.
Usage:
uv run --with SRTrain python3 scripts/srt_cli.py cancel \
--reservation-id "RES123456" \
--confirm
Returns: Cancellation confirmation
JSON Format:
{
"success": true,
"data": {
"success": true,
"reservation_id": "RES123456",
"message": "Reservation cancelled successfully"
}
}
Check the progress of reservation attempts (especially useful for retry mode).
Usage:
uv run --with SRTrain python3 scripts/srt_cli.py log -n 30
Returns: Last N lines of reservation log file (~/.openclaw/tmp/srt/reserve.log)
Options:
-n, --lines: Number of lines to show (default: 20)Log Format Example:
[2026-02-03 11:00:00] INFO: === SRT 예약 시작 (재시도 모드) ===
[2026-02-03 11:00:00] INFO: 타임아웃: 60분
[2026-02-03 11:00:00] INFO: 재시도 간격: 10초
[2026-02-03 11:00:00] INFO: 대상 열차: 1,3,5 (총 3개)
[2026-02-03 11:00:05] INFO: === 시도 #1 (열차 1/3) ===
[2026-02-03 11:00:05] INFO: 🎫 예약 시도 중... (열차 301, 120500)
[2026-02-03 11:00:06] WARN: ❌ 좌석 없음 (열차 301)
[2026-02-03 11:00:06] INFO: ⏳ 10초 대기 후 재시도...
[2026-02-03 11:00:26] INFO: === 시도 #2 (열차 2/3) ===
...
[2026-02-03 11:05:00] SUCCESS: ✅ 예약 성공!
The skill provides clear, actionable error messages:
Common Errors:
AuthenticationFailed
NoSeatsAvailable
StationNotFound
NoTrainsFound
RateLimitExceeded
NetworkError
Exit Codes:
0 - Success1 - Retryable error (e.g., no seats available)2 - Fatal error (e.g., authentication failed, invalid input)To protect your SRT account from being blocked by the server:
What this means for users:
For AI orchestration:
When users make requests in Korean, the AI should:
Extract parameters from natural language:
Call tools in correct sequence:
Handle errors gracefully:
Confirm actions in Korean:
User: "2월 17일에 수서에서 동대구 가는거 12시이후 제일 빠른걸로 2장 예약해줘"
AI Actions:
User: "매진이면 성공할때까지 반복해"
AI Actions:
exec reserve --retry --timeout-minutes 60 --wait-seconds 10 (in background)
cron add --job '{
"schedule": {"kind": "every", "everyMs": 120000},
"payload": {
"kind": "agentTurn",
"message": "Check SRT retry log and report progress",
"deliver": true,
"channel": "discord"
},
"sessionTarget": "isolated",
"enabled": true
}'
cron wake --mode "now"
MANDATORY: Use isolated session + agentTurn cron jobs for monitoring reserve --retry.
# 1. Start background retry
exec reserve --retry --timeout-minutes 60 (background)
# 2. Create monitoring cron (isolated + agentTurn)
cron add --job '{
"schedule": {"kind": "every", "everyMs": 120000},
"payload": {
"kind": "agentTurn",
"message": "Check `srt_cli.py log -n 30`, parse progress, report to user. Delete cron if done.",
"deliver": true,
"channel": "discord"
},
"sessionTarget": "isolated",
"enabled": true
}'
# 3. Wake immediately
cron wake --mode "now"
"isolated" (NOT "main")"agentTurn" (NOT "systemEvent")truecron wake --mode "now" after creating jobsystemEvent in main session doesn't trigger agent actionagentTurn in isolated session actually executes and reportsUser: "내 예약 확인해주고 제일 빠른거 취소해줘"
AI Actions:
User: "부산 예약 취소하고 동대구로 다시 예약해줘"
AI Actions:
IMPORTANT: This skill can search and reserve trains, but cannot process payments.
After making a reservation:
SRT_PHONE and SRT_PASSWORD environment variables are set~/.zshrc, ~/.bashrc) has export keywordexport SRT_PHONE="010-1234-5678"search command before reserve~/.openclaw/tmp/srt/last_search.pkl# Install dependencies
# Install uv if not already installed
# https://docs.astral.sh/uv/getting-started/installation/
# Configure credentials
export SRT_PHONE="010-1234-5678"
export SRT_PASSWORD="your_password"
# Test commands
uv run --with SRTrain python3 scripts/srt_cli.py search --departure "수서" --arrival "부산" --date "20260203" --time "140000"
uv run --with SRTrain python3 scripts/srt_cli.py list
# Authenticate
clawhub login
# Publish
clawhub publish . \
--slug srt \
--name "SRT Korean Train Service" \
--version 0.1.2 \
--tags latest
MIT
For issues or questions:
reserve command with --retry flag--timeout-minutes for time-based retry limits (default: 60)--train-id support for comma-separated multiple trains (e.g., "1,3,5")--wait-seconds default from 20 to 10 secondsavailable_only=False)--all flag for sold-out trains (deprecated)uv for dependency management
uv run --with SRTrain