This document provides a simple explanation of how the GoClaw system identifies users, recognizes them as the same person across different channels (Discord, MS Teams, Telegram, Facebook), and consolidates their memory records.
When you send a message to GoClaw, it first passes through the Gateway (the entry point). At this stage, the system verifies which organization and group the message is coming from.
Previously, these were named differently depending on the channel (e.g., GuildID for Discord, TeamID for MS Teams), but they have now been consolidated into a unified TenantID, which a routing binding matches with the key tenant_id whatever the channel. What it holds depends on the channel: the guild (server) ID on Discord; on MS Teams, the conversation ID of the group chat or channel (with ;messageid=… removed), and nothing in a 1:1 chat. Telegram and Facebook set none. See Multi-Agent Routing.
To accurately identify you, the system requires a Pairing step.
ABCD1234), instructing you to give this code to your administrator to activate your account. This is the default channels.dm_policy: pairing. With allowlist, an unknown sender is refused and gets no code; with open, everyone gets through. Accounts listed in channels.allow_from always get through. The App API skips this step: its callers are already authenticated.u_1710408593123456789: u_ and the creation time in nanoseconds) is created for you in the pairing store.This identification process is handled by the "AccessGate" layer within the Gateway, which resolves identity before passing the message context to the Agent.
When a user is registered, a specific GoClawRole is assigned to them. For example, if you are configured as an "admin" for an organization, you will retain admin permissions whether you interact via Discord or MS Teams. This is crucial for the bot to determine authorization rules, such as whether a user is allowed to write to the global memory (shared system instructions).
The most significant benefit of this architecture is Personal Memory consistency.
As the agent interacts with you, it saves important facts about you with the memory_write tool (scope: personal).
Previously, if you wrote from Discord, the system saved the memory to a file like memory/user_discord_123.md. If you wrote from MS Teams the next day, the bot would create a separate file like memory/user_msteams_abc.md and treat you as a completely new, unrecognized user.
Now:
AccessGate identifies you and passes your Unified ID to the Agent.user_<id>.md in ~/.goclaw/memory/personal/ (or in an agent's workspace memory/ folder), is still read, but only while you have no personal records in the database.Managing these user records is straightforward and can be done in two ways:
http://localhost:8080) and go to the "Pairing" menu. You will see verification codes for new users. Simply click the "Approve" button to verify their accounts and update their roles.POST /api/pairing (gateway token, body {"action": "approve", "code": "ABCD1234", "role": "admin"}).goclaw pairing list discord (List registered Discord users)goclaw pairing pending discord (View pending authorization codes)goclaw pairing approve ABCD1234 --role=admin (Approve a code and assign the admin role)goclaw pairing link u_123456 discord 9876543210 (Manually link an account from another channel to a Unified ID)goclaw pairing revoke u_123456 (Revoke authorization for a unified user)With this architecture, the system operates as a personal assistant tailored directly to your context.