Skip to content

Port WritableDocument (agent↔user collaborative document) feature from Kea (main) to Swift #1905

Description

@florian-muller

Summary

The WritableDocument feature was built on the main (Kea) version of Fred and does not exist on Swift (confirmed: no writable_documents code on the swift branch). Since Swift has diverged significantly, this feature must be re-implemented / ported. This issue tracks that work at a high level — there is no RFC for this feature, so the description below captures the concept; implementation detail is out of scope here.

Concept

Let an agent and a user collaborate on a document instead of dumping long-form output into the chat.

  • When the user asks for a document to be written (e.g. an email, a meeting summary), an agent that has the tool uses it to write into a WritableDocument rather than replying inline in the chat.
  • Once written, the document opens in a side panel to the right of the chat, rendered in a Markdown WYSIWYG editor.
  • The user can review and edit the document directly, or ask the agent to iterate on it.
  • If the user edits the document, the agent is aware of the change (edit detection) and works from the updated content.
  • The user can export the document to Word (.docx) or Markdown at any time (PDF planned as a future addition).

Scope of this issue

Re-implement the feature on Swift, adapting to the diverged architecture. On Kea it spans (for reference):

  • writable_documents inprocess toolkit provider + tools (agent writes/iterates on the document)
  • Persisted document store (Postgres store + migration on Kea) and document model/contracts
  • User-edit detection so the agent sees user changes
  • Chat message-part / session-orchestrator wiring to surface the document to the UI
  • Frontend WritableDocumentPane — right-side Markdown WYSIWYG editor with review/edit + iterate flow
  • Export to .docx and Markdown (PDF future)

Notes

  • No deep implementation design needed here — this issue exists to make the porting work visible on the Swift backlog.
  • Implementation should be re-evaluated against Swift's current topology (Agentic API / Knowledge Flow / Control Plane) rather than copied 1:1 from Kea.
  • Companion porting issue: PPT Filler Toolkit → Port PPT Filler Toolkit feature from Kea (main) to Swift #1903.

Metadata

Metadata

Fields

No fields configured for Feature.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions