New Tool Radar

AI Agents & Automation

How to Build a First Langflow Agent Flow With Chat Input and Output

Connect Chat Input, an Agent component and Chat Output in Langflow, then add a tool, to get a working agent flow you can test in the Playground.

Schematic diagram with three steps: New blank flow, Connect input and agent, then Test in Playground.

Langflow's Agent component provides everything needed to create an agent, including a choice of language model providers, tool calling and custom instructions. A first flow is only three components plus a tool: Chat Input, Agent and Chat Output.

Before you start

You need a running Langflow instance and an API key for one model provider. The Langflow documentation explains the Model Providers pane: open your profile icon, select Settings, then Model Providers, and add the provider key there.

Create a blank flow and connect the three components

Click New Flow, then Blank Flow, and add an Agent component to the canvas. Select the model you want from the Language Model dropdown on the Agent component. Add Chat Input and Chat Output components and connect them in order: Chat Input to Agent, Agent to Chat Output. The Agent component includes a Calculator tool that is enabled by default.

Add one tool and test in the Playground

Add a Web Search component and a URL component, enable Tool Mode on each, and connect their Toolset ports to the Tools port on the Agent component. Open the Playground and ask the agent what tools it is using to answer questions. The reply should name its tools, which confirms the wiring works.

Worked example: A first agent for a fictional research desk

Maple Research is a fictional research desk. Its first Langflow agent answers background questions with a web search tool. The table shows the three components and what each does.

Component Job in the flow
Chat Input Receives the user message
Agent Chooses the model and the tools, then answers
Chat Output Shows the completed reply in the Playground

Expected result (UNTESTED): the Playground question about tools returns a reply naming the Calculator and the Web Search tool. We checked the Langflow agents documentation, which describes the blank-flow steps, the Agent component and the Playground test, but we did not build the flow on a live Langflow instance.

Limits

This guide builds a first flow only. It does not cover memory, deployment, or the Agent component parameters that are hidden by default. A model provider key is billed by that provider, so a test question still costs a call.

Sources

See all