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

  1. Click New Flow, and then select the travel agent flow.

  2. This opens a starter flow with the necessary components to run an agentic application with multiple Agent components.

Create the travel planning agent flow

starter flow travel agent

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

  1. Add your credentials to the Open AI component. The fastest and most secure way to add credentials is with Langflow’s Global Variables.

    1. Click settings Settings, and then click language Global Variables.

    2. Click Add New.

    3. Name your variable. Paste your API key in the Value field.

    4. In the Apply To Fields field, select the field you want to globally apply this variable to.

    5. Click Save Variable.

  2. Click play_arrow 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.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com