Translation Agent is a small open-source Python project by Andrew Ng that demonstrates agentic translation using a reflection workflow. Instead of translating once and stopping, the system has a language model translate a text, reflect on its own translation to produce constructive suggestions, and then revise the translation using those suggestions — mirroring how a careful human translator improves a draft. Despite its compact size it has earned about 5,800 stars on GitHub, largely because it is one of the clearest teaching examples of the reflection agent pattern.
Traditional machine translation systems translate in a single pass and give you little control over style or terminology. By putting an LLM at the heart of the engine, Translation Agent is highly steerable: change the prompts and you can ask for formal or informal output, specify how idioms should be handled, or supply a glossary so names, technical terms and acronyms are rendered consistently. The three-step loop — translate, reflect, improve — runs in plain Python, which makes the code easy to read, modify and reuse in your own projects. Released in 2024, it is best seen as a reference implementation and starting point for building higher-quality, customizable translation workflows rather than a finished consumer product.
Translation Agent is free and open source under the MIT license. Your only cost is the LLM API usage for the translation and reflection calls you run.
Translation Agent is for developers and learners who want to understand and build agentic workflows, localization engineers prototyping higher-quality translation pipelines, and anyone who needs translation output they can steer by style and glossary rather than accept as-is.