Key facts
| Agent runtime | Function calling loop on /v1/chat/completions (live) |
| Embeddings | plugsky-embed-multilingual via /v1/embeddings (live) |
| Language handling | Detect locale in code, pass it to tools as a filter |
| Models | 30+ models behind one endpoint, choose per language and task |
| Tools | Locale-aware search, translation and formatting tools |
| Structured output | JSON mode for responses with locale and source metadata |
| Deployment | Region-locked planes, VPC, on-prem and air-gapped options |
| Free tier | plugsky-micro and plugsky-lite on the free plan, no card required |
TL;DR
- Detect language deterministically in code; do not ask the model to guess.
- Route by language and task — some models handle Arabic and other languages better.
- Filter retrieval by locale so answers use the right regional content.
- Keep one multilingual vector space instead of separate indexes per language.
- Evaluate quality per language, not just on the aggregate.
How it works, step by step
- List the languages and locales you must support, and label real samples for each to use as evaluation data.
- Add deterministic language and locale detection before the agent loop, and pass results into tools as filters.
- Expose locale-aware tools: content search per locale, unit and date formatting, and translation when required.
- Implement the agent loop with output requirements that include the response language and source locale.
- Embed corpora with plugsky-embed-multilingual so documents in one language can be retrieved by questions in another.
- Score quality per language on a fixed question set, including code-switching and mixed-script inputs.
- Route each language and task to the model that scores best, and keep the routing table in configuration.
Original data
Try it yourself
Open the embedding model comparison →
Language detection and routing
Language handling starts outside the model. Deterministic detection is cheaper, faster and more predictable than asking a model to identify a language, and it gives your tools a reliable filter. Once the locale is known, the agent can retrieve locale-specific content, format dates and numbers correctly, and answer in the user's language.
Routing comes next. With 30+ models behind one OpenAI-compatible endpoint, you can assign models per language and task based on measured quality rather than assumption. The agent loop itself is unchanged: live function calling on /v1/chat/completions, tools for retrieval and formatting, structured output for the final response.
Tools and locale-aware retrieval
Multilingual retrieval works best with one shared vector space. plugsky-embed-multilingual embeds several languages so a question in one language can match documents in another — a natural fit for GCC deployments where policies, manuals and support content mix Arabic and English.
- Locale filters: prefer content in the user's locale and fall back explicitly when it is missing.
- Script handling: normalise Arabic diacritics and mixed Latin/Arabic input before embedding.
- Formatting tools: dates, currency and numerals belong in code, not in prompts.
- Glossaries: keep approved terminology per language and pass it into the prompt for consistency.
Quality assurance across languages
Aggregate scores hide language-specific problems. Evaluate each language separately with native reviewers, covering intent recognition, retrieval accuracy, terminology and tone. Include code-switching inputs, since real users mix languages mid-sentence more often than test suites assume.
Track per-language metrics and route accordingly: if one model leads on Arabic and another on English, let the routing table reflect that. Keep prompts and glossaries versioned per language so improvements in one do not regress another. For regulated deployments, the same agent runs in a region-locked plane or on-prem with Plugsky deployments, keeping content within the market it serves.
Honest comparison
| Concern | Plugsky multilingual agent | English-only agent | Separate bots per language |
|---|---|---|---|
| Retrieval | One multilingual vector space | English corpus only | Duplicated indexes |
| Model choice | 30+ models, route per language | One model | Often inconsistent |
| Locale handling | Filters and formatting tools | Manual | Per-bot logic |
| Evaluation | Per-language scoring | Aggregate only | Fragmented |
| Deployment | Region-locked planes, VPC, on-prem, air-gapped | Single region | Multiple deployments |
Frequently asked questions
Can one agent handle both Arabic and English?
Yes. Detect the language in code, filter retrieval by locale, and use plugsky-embed-multilingual so a question in either language can retrieve content from both.
How do we choose a model per language?
Measure. Run the same evaluation set per language across candidate models and record scores, then encode the winners in a routing table. 30+ models share one endpoint, so switching is configuration.
Should we translate queries into English first?
Sometimes, as a fallback for thin locales. But with multilingual embeddings, direct cross-language retrieval is usually better and preserves nuance.
How do we handle mixed-language input?
Detect the dominant language, keep the original text for retrieval, and instruct the agent to answer in the dominant language. Normalise scripts before embedding.
What about right-to-left formatting?
Formatting belongs in your UI and tools, not the model. Return structured content and let the interface apply direction and typography rules per locale.
How should we evaluate quality?
Score each language separately with native reviewers, covering intent, retrieval, terminology and tone, and include code-switched inputs in the test set.
Can agents run in-region?
Yes. Plugsky supports region-locked cloud planes plus VPC, on-prem and air-gapped deployment, so content can stay in the market it serves.