Show us your Workflows

Following up on a post I made in the original workflows topic. I have figured out how to make it do what I want it to do. This is all a test of course, but here is what it does:

This is a re-engagement system that uses AI to hopefully spark discussion and boost re-engagement at times when the site is slow.

Phase A: Locate and Summarize

Locate posts that are older than 30 days and are some mix of the following:

-Popular topics that haven’t had a post in a while.
-Topics that are getting a lot of views, but haven’t had a reply in a while.
-Topics that had some activity in the last year, but then stopped.

Once it finds one, it initiates the Discourse ‘AI Summary’ agent. Have the AI agent write a summary. It does this by POSTing a http request to the summary API endpoint. Once the summary is done, it saves the existence of the workflow into a data table.

(This runs once an hour, but potentially more often).

Phase B: Evaluate Summary for Follow Up

Another scheduled workflow runs independently on its own schedule. It checks the data table for rows that have been summarized, but not evaluated. It grabs one topic from the data table and then gets the 5-10 most recent posts on that topic.

It goes into an AI agent that handles triage. It makes a determination. Is this a topic that should be revived? If so, how? It decided if the topic should be bumped, or if a post should be made that re-engages with the topic: asks a question, asks a follow up or nothing at all.

It updates the data table with the decision.

(This should run about as often as Phase A, you could also trigger it from or combine it with Phase A.)

Phase C: Re-Engage with Topic

Another scheduled workflow runs on its own schedule, not as frequently. It’s first step is to check and see how active the forum has been lately. It does that by checking how many posts have been made on average per hour, for the last 3 hours. It then takes the average of how busy the forum has been for 3 hour periods, on the same day and time over the last 2 months. If the site isn’t as busy as it normally would be at the same time on the same day, it will say ‘we can do a re-engagement now’.

It then grabs up to 10 available re-engagement opportunities. It sends to an AI agent and asks to pull out the strongest candidate for a re-engagement out of the list. The AI decides and returns a topic_id. The classifier in Phase B decided between 3 options: Bump topic, post follow up, do nothing.

The workflow will do a bump unless the follow up is designated. If destined for follow up, it will take the topic id and grab the latest posts from that topic. It will hand it over to an AI agent who will determine what the best response would be to re-engage with the topic. It has guardrails to ensure a very basic reply, that is still on topic and doesn’t give recommendations or provide commentary. It mainly just asks for an update, asks if the original poster has an update on something that happened.. etc. It posts the reply and then updates the data table with the completed at date.

Hopefully I didn’t just duplicate some hidden Discourse feature that I didn’t know about! It took some trial and error, but I got it done.

3 likes