onsails / onsails/right-agent

feat: Agent Output Canvas — rich HTML documents via Mini App

Open
#58 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
35
Forks
4
Avg merge
17h 19m
Merged PRs (30d)
8

Description

Problem

Long agent outputs (research reports, analyses, comparisons) are delivered as multiple truncated Telegram messages. Telegram's 4096-char limit, broken tables, and lack of navigation make complex documents unusable in chat.

Proposed Solution

Agent Output Canvas — when an agent produces a large or richly-formatted document, it generates an HTML page served by Right Agent and sends a single button to the user that opens it as a Telegram Mini App.

User Flow

User: "Research AI agent trends and write a full report"

Barry: [works for 3 minutes]

Barry: 📄 Research complete → [Open Report]  ← one Telegram message

[User taps] → Mini App opens with full HTML report:
  - Table of contents
  - Sections with headings
  - Formatted tables
  - Syntax-highlighted code
  - Collapsible sections

Features

Core
  • Agent writes HTML/Markdown to a unique URL on the Right Agent server
  • Mini App renders it with proper styling (Telegram theme-aware)
  • Single button message in chat instead of flooding
Rich Formatting
  • Tables, nested lists, code blocks with syntax highlighting
  • Collapsible sections for long content
  • Auto-generated Table of Contents with anchor links
  • Responsive mobile layout
Output Templates
  • Research Report
  • Meeting Notes
  • Code Review
  • Comparison Table
  • Task Breakdown
Live Updates
  • Agent streams content to Canvas as it writes (SSE/WebSocket)
  • User sees document being built in real time
  • Progress indicator while agent is still working
Sharing & Export
  • Public shareable URL (no auth required for read-only access)
  • Export to PDF / copy as Markdown
  • Optional: user can edit the canvas, agent sees changes

Why This Is Unique

All major agent frameworks (Hermes, Claude Code, AutoGen) dump output into a terminal or file system. There is no concept of a "living document" tied to the agent's output that:

  • Opens inside the messaging app the user is already in
  • Updates in real time as the agent writes
  • Is shareable without any login

Technical Notes

  • Right Agent HTTP server serves canvas pages at /canvas/{id}
  • Agent writes to canvas via new MCP tool: mcp__right__create_canvas(title, content_html) + mcp__right__append_canvas(id, html)
  • Mini App auth via Telegram initData for private canvases
  • Public canvases use a signed token in URL (no auth needed)
  • Canvas storage: SQLite or flat files in agent's working directory

🤖 Generated with Claude Code

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Right Agent HTTP server and the proposed /canvas/{id} route, then trace how MCP tools could create and append canvas content. Review the Telegram Mini App auth and storage options described in the issue; done means a rendered, navigable canvas can be opened from one chat button and updated by the agent.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, sqlite
Domain
backend, frontend, full-stack
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.