Lesson 3 of 4
Setting Assistant Personality
Estimated time: 5 minutes
Setting Assistant Personality
A multi-channel assistant without a personality is just a generic chatbot. In this lesson, you'll define who your assistant is — its tone, knowledge boundaries, and behavior rules — so it sounds consistent across every platform.
Why Personality Matters
User: What's your return policy?
Bot: I don't have specific information about return policies. You might want to check the company website or contact customer support for details.
Generic, unhelpful, sounds like every other chatbot.
Create a system prompt file
The system prompt is the foundation of your assistant's personality. Create a file for it:
mkdir -p ~/.openclaw/prompts
Create ~/.openclaw/prompts/assistant.md with your personality definition:
# Role
You are the customer assistant for Sunrise Bakery.
Your name is Sunny.
# Tone
- Warm and friendly, like talking to a neighbor
- Use simple language, avoid jargon
- It's okay to use emoji occasionally (🍞 🎂 ☀️)
- Keep responses concise — under 200 words unless the
question requires detail
# Knowledge
- Menu: sourdough ($6), croissants ($3.50), birthday cakes
(from $45), custom orders available
- Hours: Tue-Sun 7 AM - 3 PM, closed Mondays
- Locations: 123 Main St and 456 Oak Ave
- Return policy: 30 days, no questions asked
- Online ordering: bakery.com/order
# Rules
- Never make up information you don't know
- For complaints, empathize first, then offer to connect
them with the team
- For custom cake orders, collect: date needed, size,
flavor preferences, any allergies
- Don't discuss competitor bakeries
Start simple
You don't need a perfect prompt on day one. Start with the basics — role, tone, and key facts — then refine based on real conversations. The best prompts evolve over time.
Apply the prompt to your agent
Load the system prompt into your OpenClaw agent:
openclaw agent config --system-prompt ~/.openclaw/prompts/assistant.mdVerify it was applied:
openclaw agent config --showYou should see your system prompt content in the output.
Add knowledge boundaries
The system prompt sets the general personality, but you can also set explicit boundaries for what the assistant should and shouldn't do:
openclaw agent config \
--max-response-length 300 \
--fallback-message "I'm not sure about that! You can reach our team at hello@bakery.com or call (555) 123-4567." \
--blocked-topics "politics,religion,competitors"
| Flag | Purpose |
|---|---|
--max-response-length | Prevents walls of text. Set in words, not characters. |
--fallback-message | Shown when the AI can't answer confidently. Better than a confused response. |
--blocked-topics | Comma-separated list. The AI will politely decline to discuss these. |
You can tweak behavior per platform. For example, Slack messages can be longer (teams expect detail) while WhatsApp should be shorter (mobile reading):
openclaw agent config \
--platform slack --max-response-length 500
openclaw agent config \
--platform whatsapp --max-response-length 150
This is optional — the global settings work well for most use cases.
Test the personality
Send test messages from each platform and check for consistency.
Test these scenarios:
- Basic greeting: "Hi!" — should respond warmly, in character
- Knowledge question: "What are your hours?" — should give specific hours
- Unknown question: "Do you sell sushi?" — should use the fallback gracefully
- Complaint: "My cake was stale" — should empathize first
- Blocked topic: "What do you think of that bakery on 5th?" — should decline politely
Check all platforms
Don't just test on one platform. Send the same questions on WhatsApp, Slack, and Telegram. The responses should have the same personality and accuracy, even if the exact wording varies.
Iterate on the prompt
Based on your test results, refine the system prompt. Common adjustments:
Add to your prompt:
# Format Rules
- Lead with the answer, then explain if needed
- Use bullet points for lists
- Never exceed 3 paragraphs
After editing ~/.openclaw/prompts/assistant.md, reload:
openclaw agent config --system-prompt ~/.openclaw/prompts/assistant.md --reloadPersonality Checklist
Use this checklist to make sure your assistant personality is complete:
- Role defined (who is the assistant?)
- Tone described (how does it sound?)
- Key knowledge listed (what does it know?)
- Boundaries set (what does it refuse to discuss?)
- Fallback configured (what happens when it doesn't know?)
- Tested on all connected platforms
Why should you set a fallback message instead of letting the AI improvise?
Advanced Message Routing Across Channels
# Routing Like a Pro with OpenClaw Multi-channel routing is the backbone of a sophisticated AI agent infrastructure. It allows you to direct information flow based on origin, sender, and content, ens...