Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 3 additions & 27 deletions workflows/flowcraft/chat-assistant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ spec:
type: script
- config:
max_tokens: 512
model: generate_model
model: chat
system_prompt: "${board.system_prompt}"
track_steps: true
id: answer
Expand All @@ -52,20 +52,15 @@ spec:
id: claw
max_iterations: 8
name: Claw
conversation:
context_id: flowcraft-chat-assistant
history:
enabled: true
kind: buffer
max_messages: 20
conversation: {}
memory:
embedding:
enabled: false
enabled: true
extract:
enabled: true
mode: two_pass
model: extract_model
model: extraction
schema_name: claw_memory_facts
system_prompt: Extract durable user memories from the conversation.
temperature: 0
Expand All @@ -83,29 +78,10 @@ spec:
item_prefix: "- "
max_items: 5
top_k: 5
retrieval:
backend: bbh
bbh:
bleve:
analyzer: gojieba
hnsw:
flush_interval: 60000000000
search_overfetch: 50
scope:
agent_id: claw
runtime_id: claw
user_id: local
write:
mode: async_semantic
save_conversation: true
tier: general
settings:
extract_model: extraction
generate_model: chat
workspace:
history_root: history
memory_root: memory
state_root: state
voice_adapter:
asr_model: asr
default_voice: assistant-voice
Expand Down
59 changes: 16 additions & 43 deletions workflows/flowcraft/journey-guide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ spec:
- config:
max_tokens: 96
messages_channel: story_route_channel
model: generate_model
model: chat
output_key: tmp_story_route_text
system_prompt: |
You are a fast control formatter for a Journey to the West interactive storyteller.
Expand Down Expand Up @@ -572,7 +572,7 @@ spec:
type: script
- config:
max_tokens: 80
model: generate_model
model: chat
output_key: tmp_story_text
system_prompt: |
你是西游记互动故事的讲述者,当前要讲石猴从花果山出世、出海拜师、得名孙悟空,到返回花果山取得金箍棒并改写生死簿的开篇故事。
Expand Down Expand Up @@ -671,7 +671,7 @@ spec:
type: script
- config:
max_tokens: 80
model: generate_model
model: chat
system_prompt: |
你是西游记互动故事的讲述者,当前要讲孙悟空被天庭招安又反出天宫,偷桃盗丹、大闹天宫,最后被如来压在五行山下的故事。
这是语音对话。只输出你会直接说出口、能被 TTS 朗读的中文对话文本。
Expand Down Expand Up @@ -750,7 +750,7 @@ spec:
type: script
- config:
max_tokens: 80
model: generate_model
model: chat
system_prompt: |
你是西游记互动故事的讲述者,当前要讲唐三藏西行出发,救出孙悟空,并让白龙马、猪八戒、沙悟净陆续入队的故事。
这是语音对话。只输出你会直接说出口、能被 TTS 朗读的中文对话文本。
Expand Down Expand Up @@ -829,7 +829,7 @@ spec:
type: script
- config:
max_tokens: 80
model: generate_model
model: chat
system_prompt: |
你是西游记互动故事的讲述者,当前要讲取经队伍进入连续劫难,真假难辨、误会加深,悟空被逐又归来的故事。
这是语音对话。只输出你会直接说出口、能被 TTS 朗读的中文对话文本。
Expand Down Expand Up @@ -907,7 +907,7 @@ spec:
type: script
- config:
max_tokens: 80
model: generate_model
model: chat
system_prompt: |
你是西游记互动故事的讲述者,当前要讲师徒经过女儿国等奇异国度,面对权力、欲望、人情和强妖阻路的故事。
这是语音对话。只输出你会直接说出口、能被 TTS 朗读的中文对话文本。
Expand Down Expand Up @@ -992,7 +992,7 @@ spec:
type: script
- config:
max_tokens: 80
model: generate_model
model: chat
system_prompt: |
你是西游记互动故事的讲述者,当前要讲取经队伍接近灵山前的最后大劫、取得真经、经历无字经试炼并最终修成正果的故事。
这是语音对话。只输出你会直接说出口、能被 TTS 朗读的中文对话文本。
Expand Down Expand Up @@ -1221,7 +1221,7 @@ spec:
type: script
- config:
max_tokens: 80
model: generate_model
model: chat
output_key: tmp_story_text
system_prompt: |
你是西游记互动故事的讲述者,当前要讲石猴从花果山出世、出海拜师、得名孙悟空,到返回花果山取得金箍棒并改写生死簿的开篇故事。
Expand Down Expand Up @@ -1310,7 +1310,7 @@ spec:
type: llm
- config:
max_tokens: 80
model: generate_model
model: chat
system_prompt: |
你是西游记互动故事的讲述者,当前要讲孙悟空被天庭招安又反出天宫,偷桃盗丹、大闹天宫,最后被如来压在五行山下的故事。
这是语音对话。只输出你会直接说出口、能被 TTS 朗读的中文对话文本。
Expand Down Expand Up @@ -1379,7 +1379,7 @@ spec:
type: llm
- config:
max_tokens: 80
model: generate_model
model: chat
system_prompt: |
你是西游记互动故事的讲述者,当前要讲唐三藏西行出发,救出孙悟空,并让白龙马、猪八戒、沙悟净陆续入队的故事。
这是语音对话。只输出你会直接说出口、能被 TTS 朗读的中文对话文本。
Expand Down Expand Up @@ -1448,7 +1448,7 @@ spec:
type: llm
- config:
max_tokens: 80
model: generate_model
model: chat
system_prompt: |
你是西游记互动故事的讲述者,当前要讲取经队伍进入连续劫难,真假难辨、误会加深,悟空被逐又归来的故事。
这是语音对话。只输出你会直接说出口、能被 TTS 朗读的中文对话文本。
Expand Down Expand Up @@ -1516,7 +1516,7 @@ spec:
type: llm
- config:
max_tokens: 80
model: generate_model
model: chat
system_prompt: |
你是西游记互动故事的讲述者,当前要讲师徒经过女儿国等奇异国度,面对权力、欲望、人情和强妖阻路的故事。
这是语音对话。只输出你会直接说出口、能被 TTS 朗读的中文对话文本。
Expand Down Expand Up @@ -1591,7 +1591,7 @@ spec:
type: llm
- config:
max_tokens: 80
model: generate_model
model: chat
system_prompt: |
你是西游记互动故事的讲述者,当前要讲取经队伍接近灵山前的最后大劫、取得真经、经历无字经试炼并最终修成正果的故事。
这是语音对话。只输出你会直接说出口、能被 TTS 朗读的中文对话文本。
Expand Down Expand Up @@ -1701,25 +1701,17 @@ spec:
id: journey-storyteller
max_iterations: 16
name: Journey Storyteller
parallel:
enabled: true
max_branches: 4
merge_strategy: last_wins
conversation:
context_id: flowcraft-journey-guide
starts: self
history:
enabled: true
kind: buffer
max_messages: 20
# Upstream #472 intentionally makes Journey wait for the peer's opening turn.
starts: peer
Comment thread
idy marked this conversation as resolved.
Comment thread
idy marked this conversation as resolved.
memory:
embedding:
enabled: false
enabled: true
extract:
enabled: true
mode: two_pass
model: extract_model
model: extraction
schema_name: journey_story_memory
system_prompt: |
Extract durable memory facts for an interactive Journey to the West storytelling agent.
Expand Down Expand Up @@ -1849,18 +1841,6 @@ spec:
item_prefix: "- "
max_items: 4
top_k: 4
retrieval:
backend: bbh
bbh:
bleve:
analyzer: gojieba
hnsw:
flush_interval: 60000000000
search_overfetch: 80
scope:
agent_id: journey-storyteller
runtime_id: journey
user_id: local
write:
board_facts:
- board_var: tmp_story_progress_line
Expand All @@ -1871,13 +1851,6 @@ spec:
mode: sync
save_conversation: true
tier: general
settings:
extract_model: extraction
generate_model: chat
workspace:
history_root: history
memory_root: memory
state_root: state
voice_adapter:
asr_model: asr
default_voice: journey-narrator
Expand Down
68 changes: 5 additions & 63 deletions workflows/flowcraft/murder-mystery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ spec:
to: generate_game_master
- condition: case_status == "solved"
from: generate_game_master
to: call_case_solved
to: write_case_audit
Comment thread
idy marked this conversation as resolved.
- condition: case_status != "solved"
from: generate_game_master
to: write_case_audit
- from: call_case_solved
to: write_case_audit
- from: write_case_audit
to: __end__
- from: solved_chat
Expand Down Expand Up @@ -68,7 +66,7 @@ spec:
type: script
- config:
max_tokens: 64
model: generate_model
model: chat
output_key: case_action_text
system_prompt: |
You classify the latest user turn for a murder mystery game.
Expand Down Expand Up @@ -296,7 +294,7 @@ spec:
- config:
max_tokens: 64
messages_channel: case_game_master_channel
model: generate_model
model: chat
system_prompt: |
你是中文剧本杀《雨夜留声机》的主持人。玩家是侦探,正在沈家大宅调查沈鹤年的密室死亡。

Expand Down Expand Up @@ -351,26 +349,6 @@ spec:
id: generate_game_master
publish: true
type: llm
- config:
max_tokens: 64
messages_channel: case_game_master_channel
model: generate_model
system_prompt: |
You are a case lifecycle node.

The murder mystery is solved. Do not write any user-facing text.
Call case_solved exactly once with:
- case_id: "rainy_gramophone"
- culprit: "沈知秋"
- status: "solved"

Current state:
${board.case_progress_state_text}
tool_names:
- case_solved
id: call_case_solved
publish: true
type: llm
- config:
source: |
const state = board.getVar("case_progress_state") || {};
Expand All @@ -392,7 +370,7 @@ spec:
type: script
- config:
max_tokens: 64
model: generate_model
model: chat
system_prompt: |
案件《雨夜留声机》已经破案。

Expand All @@ -413,33 +391,8 @@ spec:
id: murder-mystery-gm
max_iterations: 10
name: Murder Mystery GM
tools:
- description: Emit a lifecycle event when the player solves the murder mystery
case.
input_schema:
properties:
case_id:
description: Stable case identifier.
type: string
culprit:
description: Culprit identified by the player.
type: string
status:
description: Final case status.
type: string
required:
- case_id
- culprit
- status
type: object
name: case_solved
conversation:
context_id: flowcraft-murder-mystery
starts: self
history:
enabled: true
kind: buffer
max_messages: 20
starts: agent
memory:
embedding:
enabled: false
Expand All @@ -460,10 +413,6 @@ spec:
recall: Audit only. Runtime routing uses workspace case_progress_state.
recall:
enabled: false
scope:
agent_id: murder-mystery-gm
runtime_id: murder-mystery
user_id: local
write:
board_facts:
- board_var: tmp_case_state_line
Expand All @@ -479,16 +428,9 @@ spec:
mode: sync
save_conversation: true
tier: general
settings:
generate_model: chat
workspace:
history_root: history
memory_root: memory
state_root: state
voice_adapter:
asr_model: asr
default_voice: game-master
node_voices:
call_case_solved: police-officer
generate_game_master: game-master
solved_chat: detective