Quickstart
|
This release contains access to DataStax Langflow as a Tech Preview. The Tech Preview is intended for you to view the capabilities of DataStax Langflow, and to provide your feedback to the product team. You are permitted to use the information only for evaluation purposes and not for use in a production environment. IBM provides the information without obligation of support and "as is" without warranty of any kind. |
Get started with Langflow by loading a template flow and running it.
Run the Simple Agent template flow
-
In the Astra Portal header, switch your active app from Astra DB Serverless to Langflow.
-
In Langflow, click New Flow, and then select the Simple Agent flow.
The Simple Agent template consists of an Agent component connected to Chat Input and Chat Output components, a Calculator component, and a URL component. When you run this flow, you submit a query to the agent through the Chat Input component, the agent uses the Calculator and URL tools to generate a response, and then returns the response through the Chat Output component.
Many components can be tools for agents. The agent decides which tools to call based on the context of a given query.
-
In the Agent component, enter your OpenAI API key directly or use a global variable.
This example uses the Agent component’s built-in OpenAI model. If you want to use a different provider, edit the model provider, model name, and credentials accordingly. If your preferred provider or model isn’t listed, set Model Provider to Connect other models, and then connect any language model component.
-
To run the flow, click Playground.
-
To test the Calculator tool, ask the agent a simple math question, such as
I want to add 4 and 4.To help you test and evaluate your flows, the Playground shows the agent’s reasoning process as it analyzes the prompt, selects a tool, and then uses the tool to generate a response. In this case, a math question causes the agent to select the Calculator tool and use an action like
evaluate_expression.
-
To test the URL tool, ask the agent about current events.
For this request, the agent selects the URL tool’s
fetch_contentaction, and then returns a summary of current news headlines. -
When you are done testing the flow, click Close.
Now that you’ve run your first flow, try these next steps:
-
Edit your Simple Agent flow by attaching different tools or adding more components to the flow.
-
Build your own flows from scratch or by modifying other template flows.
-
Integrate DataStax Langflow flows into your applications by following the steps in Get started with the DataStax Langflow API.