Skip to content

sbf-developer/multi-agent-humanizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agent humanizer rewriter

Minimal multi-agent rewrite pipeline (Critic → Author → Editor) using the DeepSeek API, with a Cursor-like document UI and SSE stage updates so the right rail reflects real backend progress.

Stack

  • Client: Vite, React 19, TypeScript, Tailwind CSS v3
  • Server: Hono (@hono/node-server), OpenAI SDK pointed at DeepSeek, Zod

No Next.js, no login, no database in this MVP.

Setup

  1. Copy .env.example to server/.env (or repo root .env and load from server — here the server reads process.env, so use root .env when running from repo root).

  2. Set DEEPSEEK_API_KEY in that file.

  3. Install and run:

npm install
npm run dev

Optional hardening

  • Set API_SECRET on the server and VITE_API_SECRET in client/.env.local for local testing. Do not ship secrets in the client for public production; use same-origin cookies or a proper backend session instead.

API

  • POST /api/rewrite/stream — body { "text": string, "tone"?: …, "register"?: "neutral_analytic" | "explainer" | "reader_forward", "user_context"?: string } (defaults: tone = academic, register = neutral_analytic; user_context optional, max 8000 chars). Register controls stance (e.g. second-person / hype under neutral_analytic). Response text/event-stream with events: stage_start, critic_done, author_done, optional author_lint_fix_done (machine-lint repair pass), line_edit_done (line polish micro-pass; stage_start with stage: "line_edit" when it begins), editor_done, optional author_revision_done / second line_edit_done / editor_recheck_done, pipeline_complete, pipeline_error.
  • Rewritten prose is normalized server-side to remove Unicode em dash (U+2014) and en dash (U+2013) used as sentence punctuation.

UI

  • Tone is persisted in localStorage under humanizer-tone.
  • User context (sidebar notes) is persisted under humanizer-user-context.
  • Register (stance) is persisted under humanizer-register.
  • Theme (dark / light) uses data-theme on <html>, persisted as humanizer-theme, and updates theme-color for the browser chrome.

Build

npm run build

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors