From bdf6a0b254529aea5506dc6fd2844d7b9e4ddc6b Mon Sep 17 00:00:00 2001 From: "charmenta[bot]" <291047445+charmenta[bot]@users.noreply.github.com> Date: Thu, 11 Jun 2026 16:29:41 +0000 Subject: [PATCH] auto-update(docs): feat(runtime): writable user profile fields (name, pictureUrl, properties, attributes) --- adk/conversations/state.mdx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/adk/conversations/state.mdx b/adk/conversations/state.mdx index 5d7747a5..b71312fb 100644 --- a/adk/conversations/state.mdx +++ b/adk/conversations/state.mdx @@ -214,4 +214,25 @@ import { bot, user } from "@botpress/runtime" const botId = bot.id const userId = user.id +const userId = user.id +``` + +## User profile + +In addition to state and tags, the `user` object exposes writable profile fields: `name`, `pictureUrl`, `properties`, and `attributes`. Changes are saved automatically at the end of the request. + +```typescript +import { user } from "@botpress/runtime" + +user.name = "Alice" +user.pictureUrl = "https://example.com/avatar.png" +user.properties.tier = "pro" +user.attributes.source = "webchat" +``` + +The `createdAt` and `updatedAt` timestamps are read-only: + +```typescript +const created = user.createdAt +const updated = user.updatedAt ```