Playground
The Playground executes the current flow in the workspace. To access it, click the Playground button in the top right corner of the workspace.
Chat with your flow, view inputs and outputs, and modify your AI’s memories to tune your responses in real time.
As long as you have an Input or Output component in your flow, you can view the AI interaction by clicking the Playground button.

Run a flow in the playgound
When you run a flow in the Playground, Langflow calls the /build/{flow_id}/flow
endpoint in chat.py. This call retrieves the flow data, builds a graph, and executes the graph. As each component (or node) is executed, the build_vertex
function calls build_and_run
, which may call the individual components' def_build
method, if it exists. If a component doesn’t have a def_build
function, the build still returns a component.
The build function allows components to execute logic at runtime. For example, the Recursive character text splitter is a child of the LCTextSplitterComponent
class. When text needs to be processed, the parent class’s build method is called, which creates a RecursiveCharacterTextSplitter
object and uses it to split the text according to the defined parameters. The split text is then passed on to the next component. This all occurs when the component is built.
View playground messages by session ID
When you send a message from the Playground interface, the interactions are stored in the Message Logs by session_id
. A single flow can have multiple chats, and different flows can share the same chat. Each chat will have a different session_id
.
To view messages by session_id
within the Playground, click the of any chat session, and then select Message Logs.
Use custom Session IDs for multiple user interactions
session_id
values are used to track user interactions in a flow. By default, if the session_id
value is empty, it is set to the same value as the flow_id. In this case, every chat call uses the same session_id
, and you effectively have one chat session.
The session_id
value can be configured in the Advanced Settings of the Chat Input and Chat Output components.
To have more than one session in a single flow, pass a specific Session ID to a flow with the session_id
parameter in the URL. All the components in the flow will automatically use this session_id
value.
-
To post a message to a flow with a specific
session_id
with curl, enter the following command:curl -X POST \ "https://api.langflow.astra.datastax.com/lf/YOUR_LANGFLOW_ID/api/v1/run/YOUR_FLOW_ID?stream=false" \ -H 'Content-Type: application/json'\ -H "Authorization: Bearer APPLICATION_TOKEN"\ -d '{"input_value": "message", "output_type": "chat", "input_type": "chat", "tweaks": { "session_id": "SESSION_ID" } }'
Replace the following:
-
LANGFLOW_ID: the Langflow ID
-
FLOW_ID: the flow ID
-
APPLICATION_TOKEN: the application token
-
SESSION_ID: the session ID
-
-
Check the Playground’s Memory logs tab. In addition to the messages stored for the Default Session, a new chat session is started with your new Session ID.