Simple agent
Build a Simple Agent flow for 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.
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.
Prerequisites
Open Langflow and start a new flow
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 Tool-calling agent.
Simple Agent flow
The Simple Agent flow consists of these components:
- The Tool calling agent component uses the connected LLM to reason through the user's input and select among the connected tools to complete its task.
- The URL tool component searches a list of URLs for content.
- The Calculator component performs basic arithmetic operations.
- The Chat Input component accepts user input to the chat.
- The Chat Output component prints the flow's output to the chat.
Run the Simple Agent flow
- Add your credentials to the Agent component.
- Click Playground to start a chat session.
- To confirm the tools are connected, ask the agent,
What tools are available to you?
The response is similar to the following:
_10I have access to the following tools:_10Calculator: Perform basic arithmetic operations._10fetch_content: Load and retrieve data from specified URLs._10fetch_content_text: Load and retrieve text data from specified URLs._10as_dataframe: Load and retrieve data in a structured format (dataframe) from specified URLs._10get_current_date: Returns the current date and time in a selected timezone.
- Ask the agent a question. For example, ask it to create a tabletop character using your favorite rules set.
The agent tells you when it's using the
URL-fetch_content_text
tool to search for rules information, and when it's usingCalculatorComponent-evaluate_expression
to generate attributes with dice rolls. The final output should be similar to this:
_10Final Attributes_10Strength (STR): 10_10Constitution (CON): 12_10Size (SIZ): 14_10Dexterity (DEX): 9_10Intelligence (INT): 11_10Power (POW): 13_10Charisma (CHA): 8
Now that your query has completed the journey from Chat input to Chat output, you have completed the Simple Agent flow.