Written By William Bowen
Last updated About 2 months ago
Template
Example{
"$schema": "https://web-api.clerk.chat/pipeline-schema",
"name": "human handoff template",
"nodes": [
{
"type": "tool_provider",
"name": "ConversationTools",
"triggeredBy": [
"unreadMessage.fromAny"
],
"responseType": "tool_call_result",
"nodeConfig": {
"type": "conversation_tools",
"config": {},
"enabledTools": [
"assign_to_team_member",
"disable_ai_assistant"
],
"tools": {
"disable_ai_assistant": {
"paramValues": {}
},
"assign_to_team_member": {
"description": "assign conversation to a human for review",
"paramValues": {
"users": [
{
"type": "fixed",
"value": "all"
}
]
}
}
}
}
},
{
"type": "ai_bot",
"name": "FlagToHumanBot",
"triggeredBy": [
"unreadMessage.fromAny"
],
"responseType": "user_message",
"nodeConfig": {
"modelProvider": "openai",
"modelVersion": null,
"maxTokens": null,
"temperature": null,
"variables": {},
"prompt": "You are an AI Bot responsible for calling tools if the user asked to talk to a human. Your task is to always call the following tools: 'assign_to_team_member' and 'disable_ai_assistant' tools. Once the tools calls complete respond with an appropriate acknowledgment/concluding remark. ",
"promptSections": [
"conversation"
],
"sectionTemplates": {
"conversation": "{{#conversationHistory}}\n{{sender}} {{name}}: {{content}}\n{{/conversationHistory}}"
},
"responseSchema": {
"type": "object",
"required": [],
"properties": {}
}
}
}
],
"edges": [
{
"name": null,
"sourceNode": "FlagToHumanBot",
"destinationNode": "ConversationTools",
"sourceVariables": null,
"filters": []
},
{
"name": null,
"sourceNode": "ConversationTools",
"destinationNode": "FlagToHumanBot",
"sourceVariables": null,
"filters": []
}
]
}