ACPs Translation Forge
Protocol-native multi-agent contrastive translation for people who need to understand a translation decision, not just receive a finished sentence.
acps-translation-forge 1.0.0 is a professional contrastive translation workbench built on acps-sdk 2.1.0. It is designed for CATTI translation preparation, commercial contract and quotation drafting, and business-letter practice where a learner must defend every word choice.
Instead of returning one opaque translation, three independent ACPs agents collaborate through AIP v2 tasks:
- Literal Agent produces a deliberate word-for-word gloss, preserving source word order and exposing grammar, collocation and register faults.
- Native Agent consumes that validated literal product and rebuilds each segment with target-language constructions and business-letter conventions.
- Critique Agent compares both versions, names the translation technique behind every rewrite (part-of-speech shift, amplification, omission, inversion, recast, register control), and turns the contrast into CATTI-style drills.
A Leader discovers each skill through ADP, dispatches tasks over JSON-RPC, validates every structured product and returns one auditable report.
Naming
acps-translation-forge combines three ideas:
- ACPs — the agent capability protocol stack the project is built on.
- Translation — the domain: Chinese-English business correspondence.
- Forge — a workshop where raw literal metal is hammered into native-quality prose. The name signals craft and an auditable production pipeline, not a one-shot toy translator.
The PyPI distribution uses hyphens (acps-translation-forge); the import package
uses underscores (translation_forge).
Why three agents instead of one translator?
| Concern | Single black-box translator | Translation Forge mesh |
|---|---|---|
| Diagnosis | only a final sentence | literal gloss with segment-level risk labels |
| Decision visibility | hidden | every rewrite linked to a named technique |
| Learning value | copy the answer | contrastive explanation plus drills |
| Register control | inconsistent | dedicated salutation/closing/signature handling |
| Auditability | one response | ACS capability, ADP discovery, AIP task id, state and latency per hop |
| Failure isolation | one prompt owns everything | typed request/product validation at every agent boundary |
The collaboration is real JSON-RPC between three independently hosted services:
┌──────────────────┐
User letter ─> Leader ──>│ Literal Agent │
└────────┬─────────┘
│ LiteralReport
▼
┌──────────────────┐
│ Native Agent │
└────────┬─────────┘
│ NativeReport
▼
┌──────────────────┐
│ Critique Agent │
└────────┬─────────┘
│ CritiqueReport
▼
TranslationReport
Each downstream agent consumes the previous agent's structured product. The report is therefore built from three auditable hops, not three independent opinions on the raw text.
Real application scenarios
- CATTI 笔译备考:练完一段译文后,先看直译暴露了哪些“字面对应”的陷阱, 再对照地道译文和技巧标签复盘,而不是只背参考译文。
- 商务合同/报价函翻译:检查“收悉”“敬请查收”“给予百分之五折扣”等套语 是否被逐字硬译,确保语域与术语一致。
- 日常商务信函练习:用同一封函件练习正式函件、邮件简写两种文体,观察 敬语层级如何变化。
- 翻译教学与教研:报告中的每一组对照都有可审计的技巧标签,便于课堂讲评。
Project layout
acps-translation-forge/
├── pyproject.toml
├── README.md
├── run_demo.py
├── src/translation_forge/
│ ├── __init__.py
│ ├── __main__.py
│ ├── agents/
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── critique.py
│ │ ├── literal.py
│ │ └── native.py
│ ├── cli.py
│ ├── corpus.py
│ ├── critique_engine.py
│ ├── demo.py
│ ├── identity.py
│ ├── leader.py
│ ├── lexicon.py
│ ├── literal_engine.py
│ ├── mesh.py
│ ├── models.py
│ ├── native_engine.py
│ ├── py.typed
│ ├── registry.py
│ ├── report.py
│ ├── runtime.py
│ └── segmentation.py
└── tests/test_end_to_end.py
Install
Python 3.10 or newer is required.
python -m venv .venv
# Windows PowerShell
.venv\Scripts\Activate.ps1
# macOS / Linux: source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
The runtime dependency is pinned with acps-sdk==2.1.0; FastAPI, uvicorn,
Pydantic and HTTPX host the local AIP services and typed payloads.
One-click demo
python run_demo.py
# equivalent after installation:
translation-forge demo
# or:
python -m translation_forge demo
The script starts all three agent services, submits the built-in Chinese business letter, runs the full pipeline and prints the contrastive report. Stable content includes:
==============================================================================
ACPs Translation Forge v1.0.0 · 多智能体对比式翻译工坊
本次方向:中文 → 英文
==============================================================================
本地 AIP v2 网格已启动(每个 Specialist 独立 RPC 端点):
· Literal Agent ... instance 000301
· Native Agent ... instance 000302
· Critique Agent ... instance 000303
## 2. Literal Agent · 直译底稿
Respected Mr. Smith:
Thank you on November 18, 2026 's incoming letter. Your esteemed company about
intelligent warehouse system procurement 's inquiry, our side already receive
and know and deeply interest. Through study, our side agree at contract total
amount on the basis give your side 5 percent 's discount. Along with the letter
attach revised quotation, please check and receive. If receive early reply,
extremely grateful.
## 3. Native Agent · 地道译文
Dear Mr. Smith,
Thank you for your letter dated November 18, 2026. We acknowledge receipt of
your inquiry regarding the procurement of an intelligent warehousing system and
are deeply interested in it. Upon review, we agree to offer you a 5% discount on
the total contract value. Please find the revised quotation enclosed for your
review. We would appreciate your prompt reply.
Yours sincerely,
Li Ming
Purchasing Manager
East China Intelligent Manufacturing Co., Ltd.
## 5. 评分与复盘
- 忠实度:95 / 100
- 流畅度:95 / 100
- 文体控制:95 / 100
The full report also contains a segment-by-segment contrast table with techniques
such as 词性转换, 增译, 省译, 语序调整, plus CATTI tips and drills.
Use translation-forge demo --json when another application needs the raw
TranslationReport.
The tool is bidirectional:
translation-forge demo --direction en-zh
Translate your own letter
Inline text:
translation-forge translate \
--direction zh-en \
--title "Contract concession · draft 3" \
--text "尊敬的史密斯先生:感谢您于2026年11月18日的来函。……"
UTF-8 file:
translation-forge translate \
--direction zh-en \
--file letter.txt \
--genre business-letter \
--title "Supplier concession letter"
The built-in engine is a deterministic construction-based baseline, not an LLM
call. It does not upload your letter or require an API key. Coverage is reported
honestly: sentences outside the bilingual construction bank are marked as
待人工校订 rather than silently invented. The lexicon and construction bank are
in lexicon.py and native_engine.py and can be extended for new domains.
Use it as a library
import asyncio
from translation_forge import Direction, LocalAgentMesh, TranslationSession
from translation_forge.report import render_markdown
async def main() -> None:
with LocalAgentMesh() as mesh:
async with TranslationSession(mesh.registry) as session:
report = await session.translate(
"尊敬的史密斯先生:感谢您的来函。",
direction=Direction.ZH_EN,
title="Lesson 01",
)
print(render_markdown(report))
asyncio.run(main())
Tests and static checks
pytest -q
ruff check .
The suite covers literal risk detection, native business-English rewriting, technique attribution, the English-to-Chinese direction, exact SDK pinning and a complete three-agent AIP RPC round trip.
Build the wheel
python -m pip install --upgrade build twine
python -m build --wheel
python -m twine check dist/*
The resulting installable artifact is:
dist/acps_translation_forge-1.0.0-py3-none-any.whl
To build both wheel and source distribution, run python -m build without
--wheel.
Publish to TestPyPI and PyPI
Rehearse on TestPyPI first:
python -m twine upload --repository testpypi dist/*
Then publish the same validated artifacts to PyPI:
python -m twine upload dist/*
Use an API token when prompted: username __token__, password the full token
(including its pypi- prefix). A .pypirc file or the TWINE_USERNAME and
TWINE_PASSWORD environment variables can supply credentials without putting
them in shell history. PyPI versions are immutable: increment
[project].version and PROJECT_VERSION together before uploading a replacement.
Honest scope
This project demonstrates protocol-native multi-agent collaboration with a transparent, deterministic Chinese-English business-letter engine. It is not a general-purpose neural machine translation system, and it does not claim human-level literary translation. Its value is the contrastive learning loop: literal diagnosis → native rewrite → technique-level critique, with every hop discoverable, typed and auditable through ACPs.
Metadata
Release files for acps-translation-forge 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| acps_translation_forge-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for acps_translation_forge-1.0.0-py3-none-any.whl |
Release files / acps_translation_forge-1.0.0-py3-none-any.whl
| Download URL | acps_translation_forge-1.0.0-py3-none-any.whl |
|---|---|
| Size | 48.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5520608aa87dd525d1029abe48dba3a50cc38982e7de40c1b7dce6d1ee3c8d1b
|
|
BLAKE2b-256 checksum How to use checksums |
7533e4400620b4a232500691227cca68cd767db072a6a7126415c65d4cff48e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for acps-translation-forge 1.0.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.