Simple agent

Build an agentic application using the Agent component.

An agent uses an LLM as its "brain" to select among the connected tools and complete its tasks.

The Agent component contains all of the elements you’ll need for creating an agent, including an LLM model selector, an Agent Instructions field, and a Current Date tool. Instead of managing additional components for LLM providers and prompts, you pick your model, enter instructions for the agent, and connect tools to the agent’s Tools port.

In this flow, the Tool-calling agent reasons using an Open AI LLM. The agent selects the Calculator tool for simple math problems and the URL tool to search a URL for content.

Open Langflow and start a new flow

  1. Click New Flow, and then select the Simple Agent flow. This opens a starter flow with the necessary components to run an agentic application using the Agent component.

starter flow simple agent

The simple agent flow consists of these components:

  • The Text Input component accepts text input.

  • The Chat Output component prints the flow’s output to the chat.

  • The Agent component contains all of the elements required for creating an agent, including an agent prompt, an LLM selector, and a current-date tool.

  • The URL component fetches web content from multiple URLs.

  • The Calculator performs basic arithmetic operations.

Run the simple 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 Playground to start a chat session.

  3. To confirm the tools are connected, ask the agent, What tools are available to you? The response is similar to the following:

    I have access to the following tools:
    Calculator: Perform basic arithmetic operations.
    fetch_content: Load and retrieve data from specified URLs.
    fetch_content_text: Load and retrieve text data from specified URLs.
    as_dataframe: Load and retrieve data in a structured format (dataframe) from specified URLs.
    get_current_date: Returns the current date and time in a selected timezone.
  4. Ask the agent a question. For example, ask it to create a tabletop character using your favorite rules set. The agent will tell you when it’s using the URL-fetch_content_text tool to search for rules information, and when it’s using CalculatorComponent-evaluate_expression to generate attributes with dice rolls. The final output is similar to the following:

    Final Attributes
    Strength (STR): 10
    Constitution (CON): 12
    Size (SIZ): 14
    Dexterity (DEX): 9
    Intelligence (INT): 11
    Power (POW): 13
    Charisma (CHA): 8

Now that your query has completed the journey from Chat input to Chat output, you have completed the Simple Agent flow. For more ways to use tools with your agent, see Create a problem-solving-agent.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2025 DataStax | Privacy policy | Terms of use | Manage Privacy Choices

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