Activity Feeds V3 is in closed alpha — do not use it in production (just yet).

Processors

Activity processors enable you to do additional processing on activities after they are posted.

Supported activity processors:

TypeDescription
text_interest_tagsAnalyzes text content to extract topics
image_interest_tagsAnalyzes image attachments to extract topics
og_metadata_enrichmentAnalyzes Open Graph (OG) metadata of links in activity text to extract topic

Processors use AI to extract topics from the given sources.

The topics of an activity are stored in the interest_tags field.

Topic information can be used to query activities or filter feeds based on topics.

Activity topics enable the Stream API to automatically compute users’ interests (what activities a user interacts with). A user’s interest can be used as input for activity selectors and ranking.

Topics can also be set explicitly with the create and update activity endpoints.

Setting up activity processors

You can set up activity processors on the feed group level:

create_response = self.client.feeds.create_feed_group(
    id= feed_group_id,
    default_visibility= "public",
)

Reading topics

Whenever a new activity is posted, the processors will run. Interest topics are not computed instantly; they are added with the feeds.activity.updated event.

response = self.client.feeds.add_activity(
    type="post",
    feeds=[self.test_feed.get_feed_identifier()],
    text="This is a test activity from Python SDK",
    user_id=self.test_user_id,
    custom={
        "test_field": "test_value",
        "timestamp": int(datetime.now().timestamp()),
    },
)
© Getstream.io, Inc. All Rights Reserved.