Skip to content

Investigate: attaching files returned by tool calls to outgoing messages #3221

@ocs-percy

Description

@ocs-percy

Overview

Investigate the feasibility of allowing files returned by tool calls (e.g. custom actions) to be attached to the output message that gets sent to users.

Context

Currently, when a tool call / custom action returns a file (or a reference to one), there is no mechanism to surface that file as an attachment on the message delivered to the end user. This investigation should determine whether and how that could work.

Questions to answer

  • Can custom actions today return file content or URLs? In what format?
  • What would the contract look like for a tool to signal "attach this file to the outgoing message"?
  • Which messaging channels support file attachments (WhatsApp, Slack, web widget, etc.) and what are their constraints?
  • How does this interact with the existing ChatAttachment model?
  • Are there security/size concerns (e.g. files sourced from external APIs)?

Acceptance criteria

A written conclusion on feasibility, proposed approach (or reasons it's not viable), and any follow-up issues if we proceed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions