AI editing actions
Rewrite, shorten, expand, or auto-annotate any selected text.
Context enhancement
Optionally ground edits in your knowledge base (RAG) or live web results.
Audio narration
Generate a narration script and MP3 audio with a choice of six voices.
Multi-format export
Export your document as Markdown or PDF.
How to use
Enter or paste text
Type directly in the Markdown editor or paste existing content. The editor renders a live preview.
Select text and apply an AI action
Highlight the text you want to modify, then choose Rewrite, Shorten, Expand, or Auto Mark from the toolbar.
Optionally set a context source
For Rewrite and Expand, you can select RAG (your knowledge base) or Web to pull in supporting context before the edit is applied.
Narrate the document
Click Narrate, choose a voice and language, and wait for the MP3 to generate. The audio URL appears in the panel when complete.
EditAgent
EditAgent accepts a text selection, an action type, an optional instruction, and an optional context source. It returns the edited text and a unique operation_id that links to the tool-call log for that edit.
Actions
Rewrite
Rewrite
Rewrites the selected text according to a custom instruction. You can specify tone, style, audience, or any other transformation.Optionally set
source to "rag" to retrieve supporting context from your knowledge base before rewriting, or "web" to pull in current web results.Shorten
Shorten
Compresses the selected text while preserving key information. Useful for cutting verbose paragraphs or producing summaries.
Expand
Expand
Adds details, examples, and context to the selected text. Pair with
source="rag" to pull technically accurate expansions from your knowledge base.Auto Mark
Auto Mark
Automatically identifies and annotates key concepts in the text without a custom instruction. Useful for producing a first-pass annotated draft.
Return value
NarratorAgent
NarratorAgent converts document content into a natural-language narration script and then generates an MP3 audio file using the DashScope TTS API.
Voices
The following OpenAI-compatible TTS voices are available:| Voice | Character |
|---|---|
alloy | Neutral and balanced |
echo | Warm and conversational |
fable | Expressive and dramatic |
onyx | Deep and authoritative |
nova | Friendly and upbeat |
shimmer | Clear and pleasant |
Usage
Return value
Python API — full workflow example
REST API endpoints
| Method | Path | Description |
|---|---|---|
POST | /api/v1/co_writer/edit | Apply an editing action |
POST | /api/v1/co_writer/automark | Auto-annotate key content |
POST | /api/v1/co_writer/narrate | Generate narration and TTS audio |
Output files
All co-writer output is written todata/user/co-writer/.
TTS configuration
The default TTS voice is configured via theTTS_VOICE environment variable (default: alloy). You can override this per-request through the API by passing the voice parameter.
GET /api/v1/co_writer/tts/status.