Travel planning agent
Build a Travel Planning Agent flow for an agentic application using the multiple Tool-calling agents.
An agent uses an LLM as its "brain" to select among the connected tools and complete its tasks.
In this flow, multiple Tool-calling agents reason using an Open AI LLM to plan a travel journey. Each agent is given a different responsibility defined by its System Prompt field.
The Chat input defines where the user wants to go, and passes the result to the City Selection agent. The Local Expert agent then adds information based on the selected cities, and the Travel Concierge assembles a seven day travel plan in Markdown.
All agents have access to the Search API and URL Content Fetcher components, while only the Travel Concierge can use the Calculator for computing the trip costs.
The Agent components contain all of the elements you’ll need for creating an agent.
Open Langflow and start a new flow
-
Click New Flow, and then select the travel agent flow.
-
This opens a starter flow with the necessary components to run an agentic application with multiple Agent components.
Create the travel planning agent flow
The Travel Planning Agent flow consists of these components:
-
Multiple Agent components that use the connected LLM to reason through the user’s input and select among the connected tools to complete their tasks.
-
The URL component fetches web content from multiple URLs.
-
The Text Input component accepts text input.
-
The Chat Output component prints the flow’s output to the chat.
-
The Calculator performs basic arithmetic operations.
-
The SearchAPI tool performs web searches using the SearchAPI.io API.
Run the travel travel planning agent flow
-
Add your credentials to the Open AI component. The fastest and most secure way to add credentials is with Langflow’s Global Variables.
-
Click
Settings, and then click Global Variables. -
Click Add New.
-
Name your variable. Paste your API key in the Value field.
-
In the Apply To Fields field, select the field you want to globally apply this variable to.
-
Click Save Variable.
-
-
Click
Playground to start a chat session. You should receive a detailed, helpful answer to the journey defined in the Chat input component.
Now that your query has completed the journey from Chat Input to Chat Memory, you have completed the travel planning agent flow.