Sessions

Your server says who the user is.

Mindset takes your server’s word for the user. Name them by email or your own ID, and add labels the model can never change.

POST …/agent-sessions
{
  "user": { "externalId": "cust_8812" },
  "agent": "billing-help",
  "createUserIfNeeded": true,
  "attribution": {
    "plan": "enterprise",
    "region": "eu",
    "account": "acme-ltd"
  }
}

→ 200
{
  "session": "…opaque, don't decode or store…",
  "enabledFeatures": ["…"]
}
4 of 12
Speaker notes

Send exactly one of user.email or user.externalId. Email matches case-insensitively and is the same person as their Mindset sign-in, if they have one; externalId matches exactly, never merges with an email, and keeps their email out of Mindset. Pick one form per user and keep it, or you get two users with two histories. The session reaches one agent, one user and one environment, so one taken from a browser reaches nothing else. Attribution labels, up to 16, are set once at creation and the page can’t change them: functions and scripts read them as attribution.plan to route per customer, they reach your trace export, and MCP servers you choose receive them. The session lasts while it’s used: about 20 minutes to first use, 7 days idle, 30 days at most, and a reload asks your endpoint again.