When to use this: John says "conversation link." This is the exact process to build it. Output: a shareable URL that looks like a text conversation, deployed permanently to Cloudflare Pages.
1
Find the session log
1
List session files by date — newest first
Expected: a list of .jsonl files. The most recent is the current session.
ls -lt ~/.openclaw/agents/main/sessions/*.jsonl | head -5
2
Confirm message count in the target file
Expected: a number. Typical session: 200–900 lines.
python3 -c "
import json
with open('~/.openclaw/agents/main/sessions/[SESSION_ID].jsonl') as f:
lines = [json.loads(l) for l in f if l.strip()]
msgs = [l for l in lines if l.get('type')=='message' and l.get('message',{}).get('role') in ['user','assistant']]
print(f'{len(msgs)} messages')
"
2
Extract and clean the transcript
3
Extract all user and assistant messages
Expected: raw list of (role, text) pairs saved to /tmp/workshop_messages.json
python3 extract_messages.py [SESSION_ID].jsonl
What this does: Parses every
type: message entry with role user or assistant. Handles both string and list content formats.4
Strip Telegram metadata envelopes from user messages
Expected: clean message text with no JSON blocks or sender metadata
Remove everything before and including the last ``` block in each user message.
Pattern: re.sub(r'^[\s\S]*?```\s*\n', '', text, count=1)
Note: User messages from Telegram always arrive wrapped in metadata. The actual message content is always after the last ``` block.
5
Remove TTS artifacts from assistant messages
Expected: clean assistant text with no audio lines
Remove any line containing:
- [[audio_as_voice]]
- MEDIA:/tmp/openclaw/tts
- NO_REPLY
- HEARTBEAT_OK
6
Remove internal system messages
Expected: only real conversation remains
Skip messages that contain:
- "Ready. Go ahead."
- "Switch to TTS"
- "File created. Workshop mode"
- build script filenames
- deployment URLs mid-session
- "Done. The Word doc"
7
Correct voice-to-text misfires with judgment
Expected: message text matches what John meant, not what autocorrect wrote
Read each user message. If a word is clearly wrong in context — fix it.
Example: "your mom isn't the only person" → "Guillermo isn't the only subcontractor"
This is judgment, not spell check. If unclear, leave it.
Rule: Only correct when the intended meaning is obvious from context. Never guess.
8
Scope: cut to workshop start and end
Expected: 30–60 messages covering the relevant workshop only
Start: the message where John names the project
End: the message where John calls the chapter
Cut everything before and after.
3
Build the page
9
Create the project folder and copy Archie's photo
Expected: folder exists with archie.jpg inside
mkdir -p workspace/[topic]-workshop
cp workspace/video_project/it_archie_heygen.jpg workspace/[topic]-workshop/archie.jpg
10
Generate index.html using the locked conversation link template
Expected: index.html with all messages rendered as chat bubbles
Template specs (exact — do not deviate):
- Font: Inter via Google Fonts (400, 500, 600, 700, 800)
- Outer background: #000
- Sticky top bar: rgba(0,0,0,0.92), blur(20px), Archie photo 38px circle
- Hero: "Conversations with Archie" gradient (#fff → #a78bfa), session date, topic badge
- Chat column: max-width 640px, background #e5e5ea
- John bubbles: right, background #5a9e6f, white text, radius 18px 18px 4px 18px
- Archie bubbles: left, background #fff, black text, radius 18px 18px 18px 4px
- Avatars: 28px, John = #5a9e6f "JK", Archie = HeyGen photo
- Footer: #000 background, "[Topic] · Built with Archie Nash"
Reference: marquette-workshop.pages.dev — every conversation link must match this exactly.
4
Deploy to Cloudflare Pages
11
Create the Cloudflare Pages project
Expected: "Successfully created the '[topic]-workshop' project"
wrangler pages project create [topic]-workshop --production-branch main
Naming: Project name = [topic]-workshop (e.g. marquette-workshop, trading-workshop)
12
Deploy the folder
Expected: "Deployment complete! https://[topic]-workshop.pages.dev"
cd workspace/[topic]-workshop
wrangler pages deploy . --project-name [topic]-workshop --commit-dirty=true
5
Log to the vault
13
Add a row to the Published Links table in ARCHIVES-SCHEMATIC.md
Expected: new row visible in the vault table
| [date] | Conversation | [topic description] | https://[topic]-workshop.pages.dev |
File: workspace/schematics/ARCHIVES-SCHEMATIC.md → Published Links (VAULT) table
14
Send the link to John
Done.
https://[topic]-workshop.pages.dev
