Whoami
Show the current sender and session context. Useful for debugging on messaging channels.
Steps
-
Detect the surface:
- CLI: no
<channel source="..."> - WhatsApp:
<channel source="whatsapp">withuser_id(JID) - Telegram:
<channel source="telegram">with user ID - etc.
- CLI: no
-
Extract sender info from the message metadata if on a messaging channel.
-
Get agent identity from IDENTITY.md (name + emoji).
-
Format the response:
CLI
You: local user
Agent: <Name> <emoji>
Workspace: <path>
Session: <id if available>
*You:* <user_id>
*Agent:* <Name> <emoji>
*Channel:* WhatsApp
Telegram
**You:** <user_id>
**Agent:** <Name> <emoji>
**Channel:** Telegram
- Keep it short — one card, no preamble.
Notes
- On CLI, there's no sender ID — use "local user".
- On messaging channels, use the
user_idfrom the<channel>metadata. - This is the agent's version of OpenClaw's
/whoamicommand.