Request: public API to send messages to the base Cuppy agent chat (SSE + tool events)
Author: 78designCreated Aug 17, 2026Updated Aug 17, 2026
Feature request: expose a public API to send messages to the base Cuppy agent chat
Background
We built a Teable-powered web app (B2B lead/sourcing directory) and want to embed the real Cuppy agent (the one users chat with inside the Teable base UI — with its DB querying, web access and skills) directly in our app, instead of reimplementing a simplified agent on the app side.
Current state (verified)
These /base/{baseId}/chat/* endpoints work:
POST /base/{baseId}/chat/create→ creates a session (201, returns chatId)GET /base/{baseId}/chat/{chatId}/messages→ reads messagesGET /base/{baseId}/chat/history→ chat history
Missing / blocked:
- There is no endpoint to send a message. Tried
POST /base/{baseId}/chat/{chatId}/messages,/generation,/stream,/completions,/ask,/message,/messages/stream, etc. — all return route-level404(ExpressCannot POST ...), i.e. the route is not registered on the server. POST /base/{baseId}/chat/{chatId}/warmupandGET /base/{baseId}/chat/{chatId}/generation/statusreturn"You are not allowed to edit/access this chat"for the app token.- The feature is closed-source (not present in this repo's
features/chat— that controller is only the chart-completions endpoint), and the public API catalog (587 routes) has no message-send route. - No embeddable Cuppy chat UI exists either (
app.teable.cnsendsx-frame-options: deny; Claw bots only support Feishu IM with no web channel).
Proposal
Expose a documented, streamable endpoint for third-party apps, consistent with the existing /base/{baseId}/chat/* style:
POST /base/{baseId}/chat/{chatId}/messages
Authorization: Bearer <app token or user session token>
{ "content": "user message text" }
→ SSE stream (text/event-stream):
- content_block_delta (text_delta) for incremental text
- tool-use / progress events so clients can render the agent's task timelineWould appreciate clarity/availability on:
- A message-send endpoint with streaming, keeping conversation context across turns (same chatId).
- Tool/skill transparency: expose the agent's tool execution (DB queries, web fetch, installed skills) as SSE events.
- Permission model: allow both app tokens and logged-in user session tokens to send (and open
warmup/generation/statusto the chat creator). - Fallback if a full agent endpoint is not feasible soon: an endpoint like
POST /api/{baseId}/ai/generate-streambut with base context + tools.
Why it matters
- Lets third-party Teable apps reuse the real Cuppy (skills + tools) instead of reimplementing agents per app.
- Matches the in-UI Cuppy experience (thinking process, task timeline, skill calls).
- Happy to participate in testing once available.
We can reproduce the missing-route behavior instantly on request for debugging.
Source: teableio/teable