Install
openclaw skills install pallioChat with Pallio AI knowledge-base personas. Ask questions against curated document collections with RAG-powered citations.
openclaw skills install pallioYou can chat with a Pallio AI persona — an AI assistant backed by a curated knowledge base of uploaded documents. The persona answers questions using RAG (Retrieval-Augmented Generation) with document citations.
The user must set the PALLIO_PERSONA_ID environment variable to the ID of a public Pallio persona. Browse available personas at https://pallioai.com/community.
Before sending any messages, initialize a session to get an authentication token.
curl -s "https://pallioai.com/api/widget/init/$PALLIO_PERSONA_ID"
The response contains:
token — Session token (valid for 2 hours). Store this for all subsequent messages.persona.name — The persona's display name.persona.welcomeMessage — An introductory message from the persona. Show this to the user.persona.starterPrompts — Suggested first questions. Offer these to the user.persona.messageLimit — Maximum free messages per session (typically 3).Send the user's message with the session token. Maintain conversation history for context.
curl -s -X POST "https://pallioai.com/api/widget/chat" \
-H "X-Widget-Token: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"message": "What topics do you cover?",
"history": []
}'
The history array should contain all previous messages in the conversation:
[
{ "role": "user", "content": "What topics do you cover?" },
{ "role": "assistant", "content": "I cover fire safety procedures..." },
{ "role": "user", "content": "Tell me more about ventilation." }
]
The response contains:
response — The AI-generated answer. Display this to the user.sources — Array of { title, page } objects. Display these as citations below the response.messageNumber — Which message this is (1, 2, 3...).messagesRemaining — How many free messages remain.nudge — If "signup_soft", gently suggest signing up. If "signup_required", the session is exhausted.signupUrl — URL for the user to create a full Pallio account.When sources is present and non-empty, format citations below the response:
Sources:
- Document Name (p. 42)
- Another Document (p. 15)
Each session allows a limited number of free messages (typically 3).
messagesRemaining reaches 0 or nudge is "signup_required", inform the user:
"You've used all free messages for this session. Sign up for full access: {signupUrl}"For unlimited access, the user can get a Pallio API key (Professional tier or higher) — see https://pallioai.com/settings.
| Error Code | Meaning | Action |
|---|---|---|
SESSION_NOT_FOUND | Token is invalid | Re-initialize the session |
SESSION_EXPIRED | Token TTL exceeded (2 hours) | Re-initialize the session |
MESSAGE_LIMIT_REACHED | Free messages exhausted | Show signup URL |
RATE_LIMITED | Too many requests | Wait and retry (check retryAfter field) |
PERSONA_NOT_FOUND | Invalid persona ID | Verify PALLIO_PERSONA_ID is correct |
WIDGET_DISABLED | Persona owner disabled widget | Try a different persona |
SESSION_EXPIRED, initialize a new session.