class

Autobot::Tools::MessageTool

Inherits Autobot::Tools::Tool < Reference < Object

Tool for sending messages to users on chat channels.

Integrates with the message bus to deliver messages back to the originating channel/chat. Context (channel + chat_id) is set per-conversation so the LLM doesn't need to specify targets.

Supports optional file attachments via file_path for sending media (images, GIFs, documents) from the workspace.

Constants

Log = ::Log.for("tools.message")

Constructors

new(executor : SandboxExecutor | Nil = nil, send_callback : SendCallback | Nil = nil, default_channel : String = "", default_chat_id : String = "")
Source

Instance methods

clear_last_sent
Source
description
Source
execute(params : Hash(String, JSON::Any)) : ToolResult
Source
last_sent_content

Content of the last successfully sent message (used by cron to save to session).

Source
name
Source
parameters
Source
send_callback=(callback : SendCallback) : Nil

Set the callback for sending messages via the bus.

Source
set_context(channel : String, chat_id : String) : Nil

Set the current message context (called when processing a new inbound message).

Source