Playground and sessions
Chat with a flow
Section titled “Chat with a flow”Playground in the top bar opens a chat panel on the right. Your message goes to the flow’s Chat Input, and the reply streams back token by token. The flow needs a Chat Input component.
The panel runs the flow with POST /api/v2/workflows in stream mode.
- Enter sends. Shift+Enter adds a new line.
- Stop stops following the reply.
- Replies render as Markdown.
Sessions
Section titled “Sessions”The session selector at the top of the panel lists this flow’s sessions.
- Default session uses the flow id as its session id.
- New session (the + button) starts a fresh conversation with a new session id.
- Delete this session removes the session and its messages.
Messages are stored on the server, so history survives a reload.
Over the API, pass session_id to /api/v1/run or /api/v2/workflows to choose the session. The monitor API lists and deletes sessions: GET /api/v1/monitor/messages/sessions, DELETE /api/v1/monitor/messages/session/{id}.
Human input in the chat
Section titled “Human input in the chat”When a run pauses for a decision, the Playground shows a card with one button per option. See Human in the loop.
Share a public playground
Section titled “Share a public playground”Share in the top bar (also a tab in Flow settings) switches the flow between PRIVATE and PUBLIC and shows its link, /playground/<flow id>.
The public page needs no login. It shows the flow’s name and description and a chat.
- An HttpOnly
client_idcookie keeps each visitor’s chats separate. - A public flow runs as its owner.
- Builds are limited to 10 starts per minute.
passwordfield values are blanked in the public flow JSON.- Visitors cannot answer human-input requests and cannot cancel a run. Stop following only stops reading the stream.
A private flow’s link answers 404.
API snippets
Section titled “API snippets”The API button in the editor shows ready-made curl, Python and JavaScript snippets that call POST /api/v1/run/{flow id} for this flow.
Weftra is open source under Apache-2.0. Made by Liceron.