TripGo API Skill
This skill provides a complete interface to the TripGo API, enabling agents to perform multimodal routing, retrieve public transport information, manage trips, and perform geocoding.
Overview
The TripGo API is a platform for multimodal transport, allowing users to plan trips combining public transport, car, bike, taxi, rideshare, and more. This skill encapsulates the API endpoints into modular scripts and documentation references.
A key advantage is mode-aware trip comparison from the same origin/destination context, enabling assistants to return practical route choices with transport-type tradeoffs in one workflow. It also works exceptionally well with location-discovery skills (e.g., Google Places / goplaces): resolve a place first, then pass coordinates/IDs into TripGo routing to produce actionable journey options, including fare signals and cost estimates (e.g., taxi fares) when provided by upstream operators.
Configuration
To use this skill, you must set the following environment variables:
- -
TRIPGO_API_KEY: Your TripGo API key (header: X-TripGo-Key). Get it here: https://skedgo.com/tripgo-api/ - INLINECODE3 : (Optional) Base URL for the API. Defaults to
https://api.tripgo.com/v1. - INLINECODE5 : (Optional, recommended) Comma-separated allowlist of webhook domains (e.g.
example.com,webhooks.example.org). - INLINECODE7 : (Optional, default
false) Set to true to bypass webhook allowlist checks for trusted/manual debugging only.
Runtime Requirements
Install these binaries before running scripts:
- -
curl (required): API requests - INLINECODE11 (required): JSON validation, safe JSON construction, and URL encoding
- INLINECODE12 (optional): pretty-printing for a few scripts
Security Notes
- - Scripts that accept JSON parameters validate those values with
jq before sending requests. - Scripts that send query parameters URL-encode user-provided values.
- Webhook hook registration enforces
https:// and domain allowlisting by default (TRIPGO_WEBHOOK_ALLOWLIST) to reduce exfiltration risk. - API key usage is expected: requests send
X-TripGo-Key to the configured TripGo base URL.
Directory Structure
- -
SKILL.md: This file. - INLINECODE18 : Detailed documentation for each API section.
- INLINECODE19 : Executable Bash scripts for each API endpoint.
References (references/)
Documentation is organized by API section. Load these files to understand specific endpoints, parameters, and response structures.
- -
references/configuration.md: Regions, TSPs, and POIs. - INLINECODE22 : Journey planning and routing (A-to-B, multi-point).
- INLINECODE23 : Trip management (save, update, real-time hooks).
- INLINECODE24 : Travelling Tourist Problem (Deprecated).
- INLINECODE25 : Search and autocompletion.
- INLINECODE26 : Location services and POIs.
- INLINECODE27 : Public transport operators, routes, services, and real-time data.
Scripts (scripts/)
Each script corresponds to a specific API endpoint. They are designed to be executed directly or used as templates.
Naming Convention: INLINECODE29
Configuration
- - INLINECODE30
- INLINECODE31
- INLINECODE32
Routing
- - INLINECODE33
- INLINECODE34
- INLINECODE35
- INLINECODE36 (Deprecated)
Trips
- - INLINECODE37
- INLINECODE38
- INLINECODE39
- INLINECODE40
- INLINECODE41
- INLINECODE42
- INLINECODE43
TTP (Deprecated)
- - INLINECODE44
- INLINECODE45
- INLINECODE46
Geocode
Locations
- - INLINECODE48
- INLINECODE49
- INLINECODE50
Public Transport
- - INLINECODE51
- INLINECODE52
- INLINECODE53
- INLINECODE54
- INLINECODE55
- INLINECODE56
- INLINECODE57
- INLINECODE58
Usage Constraints
- - Do NOT invent parameters. All scripts use parameters explicitly documented in
references/. - Deprecated Endpoints: Some scripts are marked as deprecated (e.g., TTP section). Use with caution or avoid if possible.
- Verification: If a parameter or field is marked as "To be confirmed" in the references, verify with a live API call before relying on it in production.
- Environment: Ensure
TRIPGO_API_KEY is set in the environment before running any script.
Example
Searching for a location:
CODEBLOCK0
Planning a trip:
CODEBLOCK1
TripGo API 技能
本技能提供TripGo API的完整接口,使智能体能够执行多模式路线规划、获取公共交通信息、管理行程以及执行地理编码。
概述
TripGo API是一个多模式交通平台,允许用户规划结合公共交通、汽车、自行车、出租车、拼车等多种方式的行程。本技能将API端点封装为模块化脚本和文档参考。
一个关键优势是能够在同一出发地/目的地上下文中进行模式感知的行程比较,使助手能够在一个工作流程中返回包含交通类型权衡的实用路线选择。它还能与位置发现技能(如Google Places / goplaces)完美配合:先解析地点,然后将坐标/ID传入TripGo路线规划,生成可操作的出行方案,包括上游运营商提供的票价信号和费用估算(例如出租车费用)。
配置
要使用本技能,必须设置以下环境变量:
- - TRIPGOAPIKEY:您的TripGo API密钥(请求头:X-TripGo-Key)。在此获取:https://skedgo.com/tripgo-api/
- TRIPGOBASEURL:(可选)API的基础URL。默认为https://api.tripgo.com/v1。
- TRIPGOWEBHOOKALLOWLIST:(可选,推荐)Webhook域名的逗号分隔白名单(例如example.com,webhooks.example.org)。
- TRIPGOALLOWUNSAFE_WEBHOOK:(可选,默认为false)设置为true可绕过Webhook白名单检查,仅用于受信任的手动调试。
运行时要求
在运行脚本前安装以下二进制文件:
- - curl(必需):API请求
- jq(必需):JSON验证、安全JSON构建和URL编码
- python3(可选):部分脚本的漂亮打印
安全说明
- - 接受JSON参数的脚本会在发送请求前使用jq验证这些值。
- 发送查询参数的脚本会对用户提供的值进行URL编码。
- Webhook钩子注册默认强制使用https://和域名白名单(TRIPGOWEBHOOKALLOWLIST),以降低数据泄露风险。
- 预期使用API密钥:请求将X-TripGo-Key发送到配置的TripGo基础URL。
目录结构
- - SKILL.md:本文件。
- references/:每个API部分的详细文档。
- scripts/:每个API端点的可执行Bash脚本。
参考文档(references/)
文档按API部分组织。加载这些文件以了解特定端点、参数和响应结构。
- - references/configuration.md:区域、TSP和POI。
- references/routing.md:行程规划和路线规划(A到B、多点)。
- references/trips.md:行程管理(保存、更新、实时钩子)。
- references/ttp.md:旅行者问题(已弃用)。
- references/geocode.md:搜索和自动补全。
- references/locations.md:位置服务和POI。
- references/public-transport.md:公共交通运营商、路线、服务和实时数据。
脚本(scripts/)
每个脚本对应一个特定的API端点。它们设计为可直接执行或用作模板。
命名约定: scripts/<部分>-<功能名称>.sh
配置
- - scripts/configuration-available-regions.sh
- scripts/configuration-tsps-per-region.sh
- scripts/configuration-pois-for-a-transport-mode.sh
路线规划
- - scripts/routing-a-to-b-trips.sh
- scripts/routing-a-to-b-to-c-trip.sh
- scripts/routing-all-day-routing-between-events.sh
- scripts/routing-all-day-routing-between-events-deprecated.sh(已弃用)
行程
- - scripts/trips-retrieve-previously-computed-trip.sh
- scripts/trips-save-trip-for-later-use.sh
- scripts/trips-update-trip-with-real-time-data.sh
- scripts/trips-gets-hooked-urls.sh
- scripts/trips-hooks-a-trip-to-real-time-updates.sh
- scripts/trips-removes-a-hooks-from-a-trip.sh
- scripts/trips-mark-trip-as-planned-by-a-user.sh
TTP(已弃用)
- - scripts/ttp-create-travelling-tourist-problem-deprecated.sh
- scripts/ttp-delete-travelling-tourist-problem-deprecated.sh
- scripts/ttp-delete-travelling-tourist-problem-solution-deprecated.sh
地理编码
- - scripts/geocode-search-and-autocompletion.sh
位置
- - scripts/locations-pois-for-a-circular-region.sh
- scripts/locations-pois-for-map-region-using-cell-ids.sh
- scripts/locations-additional-details-for-a-coordinate.sh
公共交通
- - scripts/public-transport-operators-for-a-region-or-group-of-regions.sh
- scripts/public-transport-routes-for-a-region-or-operator.sh
- scripts/public-transport-details-of-a-route.sh
- scripts/public-transport-services-for-a-route.sh
- scripts/public-transport-departure-timetable-for-a-stop.sh
- scripts/public-transport-real-time-information-for-a-service.sh
- scripts/public-transport-get-details-of-a-service.sh
- scripts/public-transport-get-real-time-alerts.sh
使用限制
- - 不要发明参数。 所有脚本仅使用references/中明确记录的参数。
- 已弃用的端点: 某些脚本标记为已弃用(例如TTP部分)。请谨慎使用或尽可能避免。
- 验证: 如果参考文档中某个参数或字段标记为待确认,请先通过实时API调用验证,再在生产环境中使用。
- 环境: 在运行任何脚本前,确保环境中已设置TRIPGOAPIKEY。
示例
搜索位置:
bash
export TRIPGOAPIKEY=yourkeyhere
./scripts/geocode-search-and-autocompletion.sh --query Sydney Opera House --near (-33.8688,151.2093)
规划行程:
bash
./scripts/routing-a-to-b-trips.sh --from (lat,lng) --to (lat,lng) --region AUNSWSydney