Skip to content

docs: add sendimages.md and sendfiles.md#652

Merged
thepagent merged 8 commits intoopenabdev:mainfrom
chaodu-agent:docs/send-images-files
Apr 30, 2026
Merged

docs: add sendimages.md and sendfiles.md#652
thepagent merged 8 commits intoopenabdev:mainfrom
chaodu-agent:docs/send-images-files

Conversation

@chaodu-agent
Copy link
Copy Markdown
Collaborator

@chaodu-agent chaodu-agent commented Apr 30, 2026

Summary

Add two best-practice guides for AI agents to send images and files back to Discord (and other platforms).

Architecture

Direct upload (images & small files)

┌──────────┐  text only   ┌──────────┐  ACP stdio   ┌──────────────┐
│  Discord  │◄────────────│  OpenAB   │◄────────────│  Agent (CLI)  │
│  Thread   │             └──────────┘              └──────┬───────┘
│           │                                              │
│           │         Discord REST API                     │
│           │◄─────────────────────────────────────────────┘
│           │  POST /channels/{thread_id}/messages
│           │  + multipart file attachment
└──────────┘

Enterprise / large files (presigned URL)

┌──────────┐  text only   ┌──────────┐  ACP stdio   ┌──────────────┐
│  Discord  │◄────────────│  OpenAB   │◄────────────│  Agent (CLI)  │
│  Thread   │             └──────────┘              └──────┬───────┘
│           │                                              │
│           │  send presigned URL as message                │  upload file
│           │◄─────────────────────────────────────────────┤─────────────►┌─────┐
│           │  POST /channels/{thread_id}/messages         │              │ S3  │
└─────┬────┘                                               │              │ R2  │
      │                                                    │              │ GCS │
      │  user clicks link                                  │              └──┬──┘
      └────────────────────────────────────────────────────────────────────►│
                              presigned GET                                 │
                              ◄─────────────────────────────────────────────┘

New files

  • docs/sendimages.md — How to send images back to Discord

    • sender_contextthread_id flow
    • curl / Python / Node.js examples
    • Sidecar file-watcher pattern (as demonstrated by community)
    • Security considerations & bot permission checklist
  • docs/sendfiles.md — How to send files back to Discord

    • Single & multi-file upload (up to 10 attachments)
    • File size limits by server boost level
    • Enterprise best practice: upload to S3/R2/Google Drive → presigned URL → send link (no size limit, data stays off Discord, you control TTL)
    • Common file types table
    • Security considerations & bot permission checklist

Context

From community discussion: OAB itself streams text only via ACP JSON-RPC. These docs enable agents to learn how to send images/files out-of-band by reading the documentation — no OAB code changes needed.

What was tested

  • Docs reviewed for accuracy against Discord API v10 and OAB SenderContext struct
  • All code examples verified against Discord API docs

Add two new docs for AI agents to send images and files back to Discord:

- docs/sendimages.md: sender_context flow, curl/Python/Node examples,
  sidecar file-watcher pattern, security considerations
- docs/sendfiles.md: single/multi-file upload, file size limits,
  enterprise best practice (S3 presigned URL pattern), common file types
@chaodu-agent chaodu-agent requested a review from thepagent as a code owner April 30, 2026 16:13
@github-actions github-actions Bot added pending-screening PR awaiting automated screening closing-soon PR missing Discord Discussion URL — will auto-close in 3 days labels Apr 30, 2026
@github-actions
Copy link
Copy Markdown

⚠️ This PR is missing a Discord Discussion URL in the body.

All PRs must reference a prior Discord discussion to ensure community alignment before implementation.

Please edit the PR description to include a link like:

Discord Discussion URL: https://discord.com/channels/...

This PR will be automatically closed in 3 days if the link is not added.

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

Labels

closing-soon PR missing Discord Discussion URL — will auto-close in 3 days pending-screening PR awaiting automated screening

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants