Cookbook
Agents & skills · for AI agents

Look up users and their sessions

List your end users and their chat sessions over MCP — directory and metadata only; transcripts stay in the console, reached by a link the tools hand back.

MCP tools:list_end_usersget_end_userlist_user_sessions

Principle — hand back a link, not a transcript. These tools return who your users are and how much they chat — never the conversation text. Each result carries a console_url; give that to the user so they open and read the transcript in the console, where it renders properly.

Three read-only tools cover "who is using my agents, and how much":

1. The user directory

list_end_users(sort="tokens24h")     # busiest first; sort="recent" for newest
list_end_users(q="alex")             # filter by name or external id

Each user comes back with sign-in method, email (if any), space/session/document counts, 24h token usage, and a console_url. Use case — "who's my heaviest user this week?"sort="tokens24h", then hand back the top user's console_url.

2. One user's detail

get_end_user(uid="…")                # profile: name, contact email/phone, city, timezone, spaces

Profile fields only — no conversation content. Includes a console_url to their detail page.

list_user_sessions(uid="…")          # per session: agent, AI-summarised title, message_count, tokens, time

The messages themselves are not returned — by design. You get the session's shape (which agent, how long, when, an AI title) plus two links: console_url opens that exact conversation (the console jumps straight to it and pops the transcript — no hunting through a long list), and user_console_url opens the user's detail page. Use case — "has this customer talked to us before, and what about?" → list their sessions, summarise the titles, and hand back the console_url of the relevant one so they land right on that thread.

Why no transcript over MCP: chat content is your end users' data, and a tenant API key is held by whatever agent you connected. So the platform returns metadata + a console link, and the raw conversation is read by a human in the console — not streamed to an integrating agent.

Report back. Lead with the answer ("Alex has 3 sessions, all about refinancing, most recent yesterday"), then paste the console_url of the relevant session so the user clicks straight into that exact thread — or user_console_url for the whole person.