Skip to content

feat(ai): add send message raven ai function#1775

Open
prathameshkurunkar7 wants to merge 6 commits intodevelopfrom
send-message-raven-ai-function
Open

feat(ai): add send message raven ai function#1775
prathameshkurunkar7 wants to merge 6 commits intodevelopfrom
send-message-raven-ai-function

Conversation

@prathameshkurunkar7
Copy link
Copy Markdown
Member

@prathameshkurunkar7 prathameshkurunkar7 commented Jul 4, 2025

Add "Send Message" AI Function for Agent Communication

Overview

Introduces a new Send Message AI function that allows bots to send messages to users and channels mentioned in conversations.

Key Features

  • Message Targeting: Parses @username and #channel mentions from messages
  • Multi-format Support: Handles text content, file attachments, and document links
  • Auto-channel Creation: Creates DM channels for user mentions automatically
  • Validation: Ensures either content or file is provided

Technical Changes

  • Added send_message() function with mention parsing logic
  • Added extract_channel_mentions() method to RavenMessage class
  • Added current_message_id parameter passing in AI handler to let the bot know the current message which would contain the mentions.

Impact

  • Enables proactive bot communication workflows. In future we can use this function to handover tasks between agents.
  • Allows bots to notify relevant users about document updates, alerts, etc.
  • Supports multi-modal messaging (text, files, document links)

Video and Screenshots:

Expenso sends created expense claim to other user via mention(An example of us being able to send DocTypeLinks) -

CleanShot.2025-07-04.at.20.00.37.mp4

Report Wizard sends insights and charts generated to user and channel mentions -

CleanShot 2025-07-05 at 17 52 23@2x

CleanShot 2025-07-05 at 17 53 12@2x

CleanShot 2025-07-05 at 17 55 47@2x

CleanShot 2025-07-05 at 17 56 25@2x

@prathameshkurunkar7 prathameshkurunkar7 marked this pull request as draft July 4, 2025 14:45
@prathameshkurunkar7 prathameshkurunkar7 marked this pull request as ready for review July 5, 2025 12:43
@mzndako
Copy link
Copy Markdown

mzndako commented Sep 7, 2025

This looks great.. Does this logic account for messages where the agent is explicitly mentioned (@agent_name) in channels?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants