Skip to content

tutorial

Chapter 0 of 5

Personalize the First Word Your Agent Says

by Rod Rivera Published

Load what you already know about a customer before the greeting, then spend it later in the conversation — with control levers, not hope.

Scaffold a Mantle agent, train it, say hello, and it says this:

bot  Hello! What can I assist you with today?

Correct, and completely anonymous. If the customer is signed in, the agent already could know who they are. It just never looks.

The same gap shows up later: the bundled transactions skill makes a customer with one obvious everyday account pick from a list, every single time.

Both are the same missing piece — nothing loads what you know about the user before the conversation starts. This tutorial fixes it, and by the end the agent opens like this:

bot  Good afternoon, Jordan! It's wonderful to have you back — thanks for being
     a Premier member since 2019. How can I assist you today?

The mechanism in the middle is an ordered block, and it is what makes the difference reliable rather than usual:

Without an ordered block the model can greet before the profile loads, and the template interpolates nothing — the customer gets "Good , !". With one, the engine runs the identify step first: get_customer_profile writes six declared fields into project memory, none of them LLM-settable, and only then does the greet step render a response template that reads those fields back. rephrase: true changes the wording and never the facts.

What you will build

Six changes to a scaffolded project:

TechniqueWhat it guarantees
Override a bundled skillyour default_session_start wins
Ordered blockthe profile lookup happens before the greeting
Project memory, not LLM-settablefacts come from a tool, never invented
Response templateyou choose exactly what is said
rephrase: truethe model improves wording, not facts
Scoped instructionthe model sees only the branch that applies

Where this came from

This is Daksh Varshneya’s session-start personalization pattern, demonstrated live at Rasa community office hours and published to the community resources repository. This tutorial rebuilds it step by step and explains why each piece is where it is.

Before you start

Python 3.11 or 3.12, uv, a Rasa Pro Developer Edition licence, and an OpenAI API key. The companion project pins rasa-pro==3.20.0.dev6 (kept in sync with the catalog); the transcripts were captured on 3.20.0.dev1, earlier on the same release line.

Chapter 5 covers what changes if you are coming from 3.19.x, where the engine package was called rasa.calm_v2 before it was renamed to rasa.mantle.