Skip to main content
Use this pattern when the agent should recognize a known user and make the first turn feel specific to that user.

Concept

Personalization at startup has two moving pieces: a source of user context and an ON_START response that uses it. The context can come from runtime session values, channel metadata copied into session values, memory recall, or a startup tool call. Use only low-risk personalization in the welcome. Do not expose sensitive account details until identity and authorization are established.

Minimal working example

How it works

The tool call runs during startup. Its result is stored under profile because the call uses AS: profile. The response interpolates profile.first_name and profile.tier. The tool is declared as read-only with side_effects: false and confirm: never, because a profile lookup should not require the user to approve a side effect.

Common variations

Personalize by segment

Use startup SET when the value is already known at session start.

Verification

Start a session with a known session.member_id. Confirm that the startup tool receives the member id, the profile value is available in session data, and the welcome uses the returned profile fields. In traces, look for startup tool execution followed by dsl_respond.

Common mistakes

Troubleshooting

If the welcome shows an empty value, verify the tool result shape and the AS name. If the tool fails, the runtime logs the startup call error and continues; use a fallback response that does not depend on the tool result when the lookup is not guaranteed.

Production readiness checklist

  • Personalize with non-sensitive fields only.
  • Make startup lookup tools read-only.
  • Define parameter descriptions for tool inputs.
  • Provide a generic fallback when profile data is unavailable.
  • Do not assume channel metadata exists unless the channel integration supplies it.