Your work interface, first contact surface — reducing communication cost, protecting flow state.
Ask Me First is a digital proxy that acts as your professional avatar. It intercepts incoming messages to respond autonomously when you're busy or focused, learning your unique communication style over time. By filtering low-risk interruptions and managing expectations based on your real-time availability, it protects your focus while ensuring your contacts receive immediate, context-aware responses.
- Persona Learning System: Automatically observes your real message exchanges to distill your communication style and preferences.
- Inbound Claim Interception: High-performance hook that allows the avatar to "claim" and reply to simple messages (greetings, acknowledgments) before they even reach your main agent.
- Conversation-Based Style Learning: Learns how you interact with specific people to refine its response accuracy.
- Per-User Persona: Support for
persona.jsonin the workspace, allowing deep customization of the avatar's personality and rules.
This plugin is fully adapted to the OpenClaw v2026.3.23 plugin strategy changes:
- Uses the
definePluginEntrySDK entry point (introduced in v2026.3.22). - Registers
inbound_claimhook for autonomous message interception — a core capability enabled by the 3.23-era plugin architecture. - Registers
message_sendinghook for passive conversation observation and persona learning. - All capabilities are declared in
openclaw.plugin.jsonper the new manifest requirements. - Published to ClawHub as a
code-plugin(not a skill) per the updated taxonomy.
Minimum SDK version: >=2026.3.22. Recommended: >=2026.3.23.
The avatar acts as a high-speed filter for simple interactions.
Message → inbound_claim hook → classify → auto-claim low-risk → LLM reply as avatar → { handled: true }
For nuanced messages, the avatar provides deep context to your main agent.
Message → before_prompt_build → Avatar Decision Chain → identity + state + escalation → context injection → reply
Install directly via the ClawHub package manager:
clawhub package install ask-me-firstInstall as a dependency and configure manually:
npm install ask-me-firstClone the repository into your plugins directory:
git clone https://github.com/LENKIN233/ask-me-first.gitThe v2.1.x update introduces a sophisticated learning architecture that moves beyond static templates.
- Conversation-Based Learning: The plugin observes outbound messages sent by you. It analyzes the intent and tone to update its internal representation of how you speak.
- Editable persona.json: All learned traits are stored in
persona.jsonwithin your workspace. You can manually edit this file to prune incorrect styles or reinforce specific behaviors. - Maturity Progression: The avatar tracks its own confidence. It starts in a "learning" phase and progresses to "confident maturity," where it begins to auto-claim more complex categories.
- Message Classification: Every incoming message is sorted into one of 10 categories:
greeting,ack,scheduling,status_check,routing,faq,complaint,personal,decision, orunknown. - Auto-Claim: To ensure safety, only low-risk categories (like greetings and acknowledgments) are handled automatically, and only after the avatar has reached sufficient maturity.
ask-me-first/
├── index.ts # Plugin entry (hooks, commands, services)
├── openclaw.plugin.json # Plugin manifest + config schema
├── package.json # v2.1.2
├── src/
│ ├── controller.ts # AvatarController orchestrator
│ ├── decision-chain.ts # Deterministic decision chain (232 lines)
│ ├── persona/ # ★ NEW — Persona learning system
│ │ ├── schema.ts # PersonaProfile types, validation, merge
│ │ ├── classifier.ts # Rule-based message classifier (10 categories)
│ │ ├── renderer.ts # System prompt renderer (persona-aware)
│ │ └── learner.ts # Conversation observer + trait distiller
│ ├── state/ # State detection (Win32 + calendar)
│ ├── identity/ # Identity resolution & trust scoring
│ ├── escalation/ # Three-tier escalation engine
│ ├── generation/ # Reply formatting
│ ├── tools/ # Calendar, presence, context, memory
│ └── utils/
│ └── safe-write.ts # Atomic file writes
├── config/
│ ├── persona-seed.json # ★ Default persona template
│ ├── identities.json
│ ├── escalationRules.json
│ └── templates.json
├── prompts/
│ └── persona-system-prompt.md # Customizable persona template
├── tests/ # 68 tests, 14 suites
└── docs/
The plugin persists its state in ~/.openclaw/workspace/ask_me_first/. Key files include:
- persona.json: The distilled personality and rules for your avatar.
- persona_events.jsonl: A log of observed interactions used for learning.
- avatar_state.json: The current availability and evidence used for decision making.
- users.json: Trust scores and identity mappings for your contacts.
Configuration is managed via openclaw.plugin.json or your agent's config:
- Users & Trust: Define admin users and track trust scores for guests.
- State Detection: Toggle Windows foreground window detection and Feishu/Lark calendar integration.
- Escalation Rules: Define which categories of messages should trigger an immediate notification versus an avatar reply.
- Persona Customization: Adjust the learning rate and default response templates.
- Identity-Aware Responses: Different behavior for admins, colleagues, and strangers.
- Presence Sensing: Detects when you are in a meeting (via calendar) or focusing (via active window).
- Three-Tier Escalation: Automatically handles simple tasks, gathers info for medium tasks, and escalates urgent ones.
- Trust Scoring: Gradually grants more information access to frequent, high-trust contacts.
- Atomic Persistence: Uses safe-write utilities to prevent data corruption during power loss or crashes.
- Command Interface: Use
/avatarto check status or/avatar set <online|busy|focus|offline>(admin only) to override auto-detection.
- No Environment Access: The plugin does not read global environment variables; all credentials (like Feishu API keys) must be passed through the gated plugin config.
- Safe Evaluation: Replaced
new Function()with a safe expression evaluator to prevent arbitrary code execution. - Atomic Writes: Prevents partial file writes during system interruptions.
- Strict Capabilities: Declares all filesystem, network, and system execution needs in the manifest for transparency.
| Hook / Command | Type | Status | Description |
|---|---|---|---|
inbound_claim |
Hook | Stable | Intercepts messages before the main agent. |
before_prompt_build |
Hook | Stable | Injects avatar context into the LLM prompt. |
message_received |
Hook | Stable | Tracks trust and identity for incoming traffic. |
message_sending |
Hook | Stable | Observes owner replies for persona learning. |
/avatar |
Command | Stable | View or manually override avatar state. |
- Platform Support: State detection (foreground window) is currently Windows-only.
- Persona Distillation: While the system learns from conversations, full LLM-based autonomous persona distillation is planned for a future update and currently relies on rule-based trait extraction.
MIT