This theme component adds a button to each post, allowing users to send the post to an AI bot for analysis via a direct chat message. The button appears after the post info (top right of each post).
When clicked, it:
Opens (or creates) the AI DM chat channel.
Sends the post URL with the text:
“Analyze this post: post_link”
so that the AI can respond immediately.
There are some theme settings where you can set up the bot username this is important to know which DM channel should open or create if not exist. You can change the default icon too in posts.
And you can change/translate the “Analyze this post” text too in Theme Translation section. It’s great on multilingual sites translate different languages so ai persona will know which language it should answer.
Persona tip
I’ve add the following to my AI persona system prompt but of course it’s up to you.
Rules
### Post Analysis Rule:
If you receive a command to analyze a post, always process the request regardless of the post's topic.
When analyzing a post **search external sources on Google** if needed. Use these to verify claims, provide context, or enrich the analysis with additional background or perspective.
When applicable, cite sources.
**Follow these steps:**
- Consider the topic context, including what the topic is about, what the post replies to, and relevant replies to this post (if any).
- Evaluate the post’s technical accuracy (facts, recommendations, legality, risks).
- Check clarity: Is it understandable? Is important context missing?
- Determine usefulness for others: Does it contain unique insight or practical help?
- Optionally provide suggestions or helpful additions if appropriate.
- If the post contains claims, provide supporting or contradicting sources and always include direct links to sources.
- Never add greetings, closings, or personal tone (e.g., “Dear X”, “Regards”). Keep it formal and concise.
This component was inspired by the Grok button seen on X posts, featuring something similar functionality.
This is fantastic! I’m testing/ using it on my forum instance and it works great. I love it! Great work Don, thanks!
I had to mess around a bit with some category permissions to get it to analyze secure categories, even though bot is TL4 and had read access. I will play around with that part some more - it’s likely my config…
I think it’s probably your persona setting Is the Read Private option checked in on the persona setup page?
Sorry, I’m not attached to the name if it could be misleading. I just wanted to somehow indicate that this only works with the chat AI bot. Any idea for a better name? Or Can it work with the Chatbot plugin too somehow? Doesn’t it work by simply adding the Chatbot username in the settings, so it will create or open a chat with the Chatbot?
I think this would be the best solution then. If you think it would be a good feature in Chatbot, feel free to add it.
I’m pretty bad at naming but I will try to change it to make it less confusing. Maybe just add a space between chat bot is enough?
You are propably using wrong name of AI. It is not person’s name as Analyzer but you must create a public user, that can use chat, and you give its name, like Analyzer_bot.
Maybe when chat is enabled this opens the drawer instead of the pop-over? I guess it’s a little buried either way…
A little unsure about adding another icon to every post, we’re starting to overload this area too… activity pub, translations, edits…
I think if we were to define some rules this is the “metadata” area of a post, so an AI button would make more sense along with the post controls as “actions”? at that point an admin can decide if it’s important enough to be visible on every post by deciding whether it’s in the … drawer or always exposed