Skip to content

evaouyang-ai/HeadWriter

Repository files navigation

✍️ HeadWriter: Agentic Translation Studio HeadWriter is a professional-grade "Studio" for AI-assisted localization. It moves beyond simple prompt-response cycles into an Agentic Workflow that orchestrates multiple Large Language Models (LLMs) to produce a single, high-fidelity "Golden Master" translation. The application follows a Map-Reduce pattern: it "maps" source text across a diverse panel of AI models (Deepseek, GPT-4, Doubao, etc.) and "reduces" them through a Lead Editor Agent (Gemini 3.0 Pro) to synthesize a version that adheres to complex linguistic and formatting principles.

🚀 Core Features 🤖 Multi-Model Orchestration Connect and trigger translations from multiple providers simultaneously. Compare how different architectures handle nuance, idioms, and technical terms in real-time.

  • Supported Providers: Deepseek V3, OpenAI (GPT-4o), Volcengine (Doubao), and Google Gemini. 🧠 The Synthesizer Agent (Gemini 3.0 Pro) Instead of a simple "best of" selection, the Lead Editor performs a deep semantic analysis of all candidate outputs. It arbitrates conflicts, catches hallucinations, and polishes the final text based on a strict set of Master Principles. 🔍 Real-time Search Grounding Enable Live Research to allow the agent to verify technical terms, proper nouns, and cultural references using Google Search. It provides clickable citations for every fact-check performed during synthesis. 💡 Explainable AI: Attribution Mapping The UI features a unique Attribution Map. Hover over any phrase in the final masterpiece to see which candidate model provided the inspiration for that specific wording, providing total transparency into the agent's decision-making process. 🔄 The Optimization Hub (Feedback Loop) Close the loop between AI and Human.
  1. Human-in-the-loop: Edit the final draft.
  2. Comparative Analysis: The agent analyzes your edits vs. its draft.
  3. Prompt Engineering: Automatically generates glossary terms and prompt improvements to refine your future workflows.

🛠 Technical Architecture

  • Frontend: React + TypeScript + Tailwind CSS.
  • Intelligence: Integration with Google GenAI SDK (Gemini 2.5/3.0 series).
  • State Management: LocalStorage-backed persistence for history and API configurations.
  • Networking: Advanced API service layer with built-in CORS proxy support for browser-to-LLM communication.
  • UI/UX:
    • Synchronized scrolling between source and candidates.
    • Administrative Key Vault for enterprise-grade management.
    • Responsive design with a focus on a "Studio" aesthetic.

📦 Getting Started

  1. Clone the Repo: git clone https://github.com/your-username/headwriter.git
  2. Configure API Keys: Access the "Settings" for each model to inject you own API keys.
  3. Define Principles: Update the "Synthesis Principles" to reflect your brand voice or technical requirements.
  4. Run: Open index.html (or your local dev server).

📋 Recommended Workflow

  1. Input: Paste your English source text.
  2. Generate: Click "Run All Models" to get 4+ distinct perspectives.
  3. Ground: Enable "Live Research" for technical content.
  4. Synthesize: Generate the Golden Master.
  5. Refine: Edit the result in the Optimization Hub and generate a feedback loop to capture glossary terms.

HeadWriter is not just a translator; it's a writers' room, directed by you.

GHBanner

Run and deploy your AI Studio app

This contains everything you need to run your app locally.

View your app in AI Studio: https://ai.studio/apps/drive/1YqPTyeZWUPonlfFfK3Mn8vZF4GCDFrr5

Run Locally

Prerequisites: Node.js

  1. Install dependencies: npm install
  2. Set the GEMINI_API_KEY in .env.local to your Gemini API key
  3. Run the app: npm run dev

About

The AI writers’ room — directed by you.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors