langchain-nativ
LangChain integration for Nativ — AI-powered localization.
Give any LangChain agent the ability to translate text, search translation memory, manage terminology, and more — all backed by your team's brand voice and style guides.
Installation
pip install langchain-nativ
Quick start
from langchain_nativ import NativTranslateTool
tool = NativTranslateTool() # reads NATIV_API_KEY from env
result = tool.invoke({
"text": "Hello world",
"target_language": "French",
})
print(result)
# Bonjour le monde
# Rationale: Standard greeting translated with neutral register.
Use with a LangChain agent
from langchain_nativ import NativToolkit
from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
tools = NativToolkit().get_tools()
llm = ChatOpenAI(model="gpt-4o")
agent = create_react_agent(llm, tools)
result = agent.invoke({
"messages": [{
"role": "user",
"content": "Translate 'Welcome back!' to French, German, and Japanese",
}]
})
Available tools
| Tool | Description |
|---|---|
NativTranslateTool |
Translate text with cultural adaptation |
NativTranslateBatchTool |
Translate multiple texts to one language |
NativSearchTranslationMemoryTool |
Fuzzy-search existing translations |
NativAddTranslationMemoryEntryTool |
Store an approved translation for reuse |
NativGetLanguagesTool |
List configured target languages |
NativGetStyleGuidesTool |
Get style guide content |
NativGetBrandVoiceTool |
Get the brand voice prompt |
NativGetTranslationMemoryStatsTool |
Get TM statistics |
Configuration
All tools accept api_key and base_url parameters:
tool = NativTranslateTool(api_key="nativ_...", base_url="https://api.usenativ.com")
Or set the environment variable:
export NATIV_API_KEY=nativ_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Use individual tools
from langchain_nativ import NativSearchTranslationMemoryTool
search = NativSearchTranslationMemoryTool()
print(search.invoke({"query": "Welcome"}))
# Found 3 match(es):
# - [98% exact] "Welcome" → "Bienvenue"
# - [85% fuzzy] "Welcome back" → "Content de vous revoir"
# ...
License
MIT
Metadata
Release files for langchain-nativ 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| langchain_nativ-0.1.0.tar.gz | 8.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langchain_nativ-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.3 kB
Release files / langchain_nativ-0.1.0.tar.gz
| Download URL | langchain_nativ-0.1.0.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc227b1dc4d868a656fd5fc565b3b507046829b88b0ce711437eddccb87b64df
|
|
BLAKE2b-256 checksum How to use checksums |
057211e56795f58bace21c34dcf05d679d92994dcbd6788d04e7e38e69460bfd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 20, 2026.
Transparency logRelease files / langchain_nativ-0.1.0-py3-none-any.whl
| Download URL | langchain_nativ-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
75d89875da227a67ae79e63d2a5074138cbd8af4c22defea803e938c5d6688bc
|
|
BLAKE2b-256 checksum How to use checksums |
8b697ff1b218f5287ace2fe36078d019903a3aa60371be28928ac40027cb1bc3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 20, 2026.
Transparency log