Overview
The Swiss Transport Chatbot provides live public-transport connections across Switzerland — including trains, trams, buses, ships, and cableways.This recipe demonstrates one AI agent connected to one function call (
swiss_connection_search).
What you’ll build
- Agent name:
Swiss Transport Agent - Functions (1):
swiss_connection_search— public-transport connections across Switzerland
Prerequisites
- INNOCHAT workspace with Agent builder access.
Quick architecture
Steps to Build
Step 1: Create or Edit a Customer Support Agent
Agent Name:Swiss Transport Agent
Description: Provides live public-transport connections in Switzerland. Users can ask for upcoming trains, buses, trams, ships, and cableway journeys between two Swiss stations, optionally specifying via-stations, travel modes, date, time, and arrival/departure preference.



Step 2: Knowledge
Since it’s a basic agent creation with single LLM call, we can skip the Knowledge section and also uncheck the all sources parameter.
Step 3: Add the Function Call
Function Name: swiss_connection_search Description: This function queries the Transport.opendata.ch API to retrieve upcoming public‑transport connections between two Swiss stations.Given inputs like departure and arrival station (name or ID), optional via‑stations, travel modes, date/time, and arrival/departure preference, it returns connection results. Each result includes the following fields:
- departure_time: ISO timestamp of journey start
- arrival_time: ISO timestamp of journey end
- duration: e.g. “0:48” (hours:minutes)
- transfers: integer number of transfers
- from: departure station name
- to: arrival station name
- platform_from: departure platform (with prognosis if available)
- platform_to: arrival platform (with prognosis if available)
- transport_lines: names or numbers of lines used (e.g. “IC 13”, “S12”)
- capacity: optional capacities for 1st/2nd class



Example
Example Input
Next train from Zürich to Bern at 09:00
Example Output
Here are the next connections from Zürich to Bern: Dep Zürich HB 09:02 → Arr Bern 10:00 (0h58, 1 transfer)
- IC8 — Zürich HB (Plat 5) → Olten (Plat 4)
- IC6 — Olten (Plat 6) → Bern (Plat 7)
Real-time: on time.
If no match found:
“I’m sorry, I couldn’t find matching connections.”
Summary
| Feature | Description |
|---|---|
| Level | Basic |
| Agents | 1 |
| Function Calls | 1 (swiss_connection_search) |
| Goal | Display Swiss public-transport connections |
| Output | Friendly text summary with times, transfers, and platforms |