✍️ 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.
- Human-in-the-loop: Edit the final draft.
- Comparative Analysis: The agent analyzes your edits vs. its draft.
- 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
- Clone the Repo: git clone https://github.com/your-username/headwriter.git
- Configure API Keys: Access the "Settings" for each model to inject you own API keys.
- Define Principles: Update the "Synthesis Principles" to reflect your brand voice or technical requirements.
- Run: Open index.html (or your local dev server).
📋 Recommended Workflow
- Input: Paste your English source text.
- Generate: Click "Run All Models" to get 4+ distinct perspectives.
- Ground: Enable "Live Research" for technical content.
- Synthesize: Generate the Golden Master.
- 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.
This contains everything you need to run your app locally.
View your app in AI Studio: https://ai.studio/apps/drive/1YqPTyeZWUPonlfFfK3Mn8vZF4GCDFrr5
Prerequisites: Node.js
- Install dependencies:
npm install - Set the
GEMINI_API_KEYin .env.local to your Gemini API key - Run the app:
npm run dev
