Messaging
The Social module handles messages, channels, interactions, and follows. Use it for internal communication, content publishing, notification systems, or any structured messaging your agent needs.
Message
Messages are content entries — posts, notifications, updates, logs. They support reactions, comments, tags, file attachments, and channel distribution.
| Field | Type | Description |
|---|---|---|
| id / uuid | ID! | Unique identifiers |
| slug | String! | URL-friendly slug |
| message | String! | Message content |
| is_public | Boolean | Visibility |
| reactions_count | Int | Total reactions |
| comment_count | Int | Total comments |
| total_liked | Int | Total likes |
| total_saved | Int | Total saves |
| total_view | Int | Total views |
| user | User | Author |
| messageType | MessageType | Type classification |
| comments | [MessageComment!] | Comment thread |
| tags | [Tag!] | Tags |
| channels | [SocialChannel!] | Distribution channels |
| files | [Filesystem!] | Attached files |
| custom_fields | [CustomField!] | Custom data |
# List messages
query {
messages(first: 20, orderBy: [{ column: CREATED_AT, order: DESC }]) {
data {
id slug message is_public
reactions_count comment_count total_liked
user { displayname }
messageType { name }
tags { name }
channels { name }
files { url name type }
created_at
}
paginatorInfo { total hasMorePages }
}
}
# Create a message
mutation {
createMessage(input: {
message: "Weekly status: all systems operational"
message_verb: "post"
message_types_id: 1
is_public: true
}) {
id slug message created_at
}
}
# Update a message
mutation {
updateMessage(id: 1, input: { message: "Updated: all systems operational" }) {
id message
}
}Social Channels
Channels group messages and manage communication threads between users.
| Field | Type | Description |
|---|---|---|
| id / uuid | ID! | Unique identifiers |
| name | String! | Channel name |
| slug | String! | URL-friendly slug |
| description | String | Channel description |
| messages | [Message!] | Messages in the channel |
| users | [User!] | Channel members |
# Create a channel
mutation {
createSocialChannel(input: { name: "General Updates", slug: "general-updates", description: "Company-wide" }) {
id uuid name
}
}
# Add user to channel
mutation {
attachUserToSocialChannel(channel_id: 1, user_id: 5) {
id users { displayname }
}
}Interactions
# Like a message
mutation {
likeMessage(id: 1) {
id total_liked myInteraction { like save dislike }
}
}
# Follow a user
mutation {
userFollow(input: { entity_id: 5, entity_namespace: "user" }) { id }
}