跳到主要内容

Messaging tools

Messaging tools let the agent talk to chat channels directly. They are most useful in the gateway (where a channel manager delivers messages) and in subagents, which report results to the user through the message tool instead of the parent conversation.

ToolWhat it doesSwitch (default)
messageSend text and/or local media to a chat channeltools.message.enabled (true)
reactionAdd a reaction to a messagetools.reaction.enabled (false)

message​

Sends a message to the user on a chat channel. Supports text-only, media-only, or text with media attachments. Requires a running gateway (or another host that wires a send callback); in a bare CLI session without channel context the call fails with "No target channel/chat specified".

ConfigTypeDefaultDescription
tools.message.enabledbooltrueRegister the message tool
tools.message.media_enabledboolfalseAllow local media attachments through the media argument

Environment variables: PICOCLAW_TOOLS_MESSAGE_ENABLED, PICOCLAW_TOOLS_MESSAGE_MEDIA_ENABLED.

ArgumentTypeRequiredDescription
contentstringyesMessage text. When media is present it becomes the caption/body. Empty content is accepted only when media is attached
channelstringnoTarget channel (for example telegram, discord). Defaults to the current conversation's channel
chat_idstringnoTarget chat/user ID. Defaults to the current conversation
reply_to_message_idstringnoReply target for channels that support threaded replies
mediaarraynoLocal media attachments. Only advertised when media_enabled is true

Each media item has:

FieldTypeRequiredDescription
pathstringyesPath to the local file; relative paths resolve from the workspace
typestringnoOptional media type hint: image, audio, video, or file
filenamestringnoOptional display filename

Media files go through the same read policy as other filesystem reads: protected credential files are refused, and the size limit is agents.defaults.max_media_size (20 MB by default). Delivery goes through the shared media store, so media cleanup applies.

reaction​

Adds a lightweight reaction (for example a thumb-up) to a message, defaulting to the current inbound message. It is disabled by default; set tools.reaction.enabled to true to register it. It fails gracefully on channels that do not implement reactions.

ConfigTypeDefaultDescription
tools.reaction.enabledboolfalseRegister the reaction tool

Environment variable: PICOCLAW_TOOLS_REACTION_ENABLED.

ArgumentTypeRequiredDescription
message_idstringnoTarget message ID; defaults to the current inbound message
channelstringnoTarget channel. Defaults to the current conversation's channel
chat_idstringnoTarget chat/user ID. Defaults to the current conversation

Reaction support is checked at call time against the channel implementation (Telegram, Slack, Feishu, and OneBot implement it); on unsupported channels the tool returns an error and the agent continues normally. The gateway also uses the same capability to acknowledge inbound messages with a working reaction and remove it when the reply is sent.