AgentX docs

Translation

AgentX includes a built-in translation kit: detect a language and translate across 200+ languages, running locally on your own machine — no external API, no per-word cost, and it works offline once the models are downloaded.

Using it

Open the Translation tool from the app, paste or type your text, and AgentX detects the source language automatically and translates to the target you pick. It’s a standalone utility — useful on its own, and the same kit backs any translation an agent needs.

How it works — two levels

Translation runs in two stages, trading a fast first pass for broad final coverage:

  • Level I — detection. A small, fast model identifies the source language across ~20 common languages and returns an ISO 639-1 code (fr, de, ja, …) with a confidence score.
  • Level II — translation. The detected language is bridged to an NLLB-200 code, and the full model translates across 200+ languages.

A LanguageLexicon bridges the two — converting a Level I code like fr into the Level II code NLLB expects (fra_Latn). NLLB codes pair an ISO 639-3 language with its script, {language}_{script} — a handful for orientation:

LanguageNLLB-200 code
Englisheng_Latn
Chinese (Simplified)zho_Hans
Japanesejpn_Jpan
Arabicarb_Arab
Hindihin_Deva
Russianrus_Cyrl

See the translation pipeline on the System Design page.

Models

Two models power it, both pulled from HuggingFace on first use:

PurposeModelSize
Language detectioneleldar/language-detection~50 MB
Translationfacebook/nllb-200-distilled-600M~600 MB

They load lazily — nothing downloads until the first translation request, so server startup stays fast — and you can pre-fetch them with task models:download. The programmatic surface (detect, translate) is in the API Reference.