Berlin Transport AI Assistant
The Berlin Transport AI Assistant is a conversational workflow that provides real-time public transport information across Berlin using natural language queries. It connects to a live transport data server to deliver departure times, route planning, and service disruption updates instantly. Perfect for commuters, travelers, and smart city applications looking to integrate AI-powered transit assistance.
Tags
Introduction
The virtual_hackathon_VuHo workflow is designed to assist users with real-time public transportation information specifically for Berlin. It interacts with a transport information server to answer queries about routes, disruptions, and schedules through an iterative AI-driven process.
It does 7 things:
- Listens for incoming webhook triggers that start the process.
- Initializes a session with the public transport information server.
- Extracts session details and server capabilities from the initialization response.
- Fetches the list of available tools from the server using the session id.
- Enters an iterative loop where an AI agent decides which transport tool to call based on the user's query and previous results.
- Processes the AI decisions either to call a specific tool or finalize the answer.
- Aggregates results and outputs a comprehensive response to the user.
What you need
- Access to the Needle automation platform.
- An active webhook to receive incoming user requests.
- Network access to the Berlin public transport information server at http://89.167.56.59:3000/mcp.
- The workflow template named 'virtual_hackathon_VuHo' imported into your Needle account.
How the flow works
Webhook trigger: Waits for incoming queries from users to start the flow.
Initialize MCP session (HTTP request): Sends a JSON-RPC 'initialize' request to the Berlin transport server to begin a session.
Parse initialization response (Code step): Extracts the session id from response headers and parses server capabilities from the body.
Fetch tools list (HTTP request): Requests a list of available transport tools using the session id to understand what queries can be made.
Parse tools list (Code step): Extracts tool information and prepares a default user query for iterative processing.
Iterative AI loop (Loop with AI node): Uses an AI assistant to analyze the user query and past tool results to decide the next step. The AI can:
- Call a transport tool with specific arguments to gather data.
- Provide a final travel answer including route planning and disruption info.
Decision processing (Code steps): Interprets the AI output to inform whether to continue iterating or finish.
Final response formatting (Code step): Compiles the final AI-generated answer or combined tool results into a user-friendly message.
Output
At the end of the workflow, users receive a well-structured and emoji-enhanced response about Berlin public transportation. This can include recommended routes, real-time schedules, alerts about disruptions, and other helpful travel details.
Notes
- The iterative AI loop limits to five iterations to balance thoroughness and efficiency.
- The workflow includes safeguards to avoid repeated tool calls with identical parameters.
- Emoji usage helps highlight different types of transport and alert statuses for better readability.
- Make sure your network environment allows POST requests to the specified server for seamless operation.
- Custom user queries can be sent to the webhook to get personalized transport info dynamically.
Want to showcase your own workflows?
Become a Needle workflow partner and turn your expertise into recurring revenue.
