AI Chatbot Workflow with Conversation History

Chatbot workflow using dedicated chatbot task type with session-based conversation history

Back
Workflow Information

ID: ai_chatbot_with_history_workflow

Namespace: default

Version: 1

Created: 2025-07-18

Updated: 2025-07-18

Tasks: 1

Quick Actions
Manage Secrets
Inputs
Name Type Required Default
user_message string Required Hello! How are you today?
session_id string Optional None
Outputs
Name Type Source
ai_response string chatbot_task
session_id string chatbot_task
conversation_length number chatbot_task
Tasks
chatbot_task
chatbot

Generate AI response using session-based conversation history

Task Inputs: session_id, user_message
YAML Source
id: ai_chatbot_with_history_workflow
name: AI Chatbot Workflow with Conversation History
tasks:
- id: chatbot_task
  name: Chatbot with Conversation History
  type: chatbot
  config:
    user_id: anonymous
    ai_config:
      streaming: true
      max_tokens: 1000
      temperature: 0.7
      system_prompt: You are a helpful AI assistant. Respond to user questions in
        a friendly and informative way. Keep your responses conversational and helpful.
      model_client_id: openai_gpt4_mini
    workflow_id: ai_chatbot_with_history_workflow
  inputs:
    session_id: ${session_id}
    user_message: ${user_message}
  description: Generate AI response using session-based conversation history
inputs:
- name: user_message
  type: string
  default: Hello! How are you today?
  required: true
  description: User's message to the chatbot
- name: session_id
  type: string
  default: ''
  required: false
  description: Chat session ID (optional for new sessions)
labels:
- chat
- chatbot
- conversation
- history
outputs:
- name: ai_response
  type: string
  source: chatbot_task
  description: AI assistant's response to the user message with conversation context
- name: session_id
  type: string
  source: chatbot_task
  description: Chat session ID for conversation tracking
- name: conversation_length
  type: number
  source: chatbot_task
  description: Number of messages in the conversation
version: 1
description: Chatbot workflow using dedicated chatbot task type with session-based
  conversation history
model_clients:
- id: openai_gpt4_mini
  config:
    model: gpt-4o-mini
    api_key: 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
    max_tokens: 1000
    temperature: 0.7
  provider: openai
Execution ID Status Started Duration Actions
aa18d234... COMPLETED 2025-07-24
06:34:05
N/A View
3fd087bd... COMPLETED 2025-07-19
16:29:33
N/A View
d65995d5... COMPLETED 2025-07-18
17:22:57
N/A View
f8b893f8... COMPLETED 2025-07-18
10:50:21
N/A View
62ee72b6... COMPLETED 2025-07-18
10:49:54
N/A View
21bd484b... COMPLETED 2025-07-18
09:20:14
N/A View