ACPs Essay Writing Coach
Three editors, one essay, one revision plan. A production-style, multi-agent
English writing review tool built on acps-sdk 2.1.0.
acps-essay-writing-coach turns a single essay into three independent,
auditable review reports — grammar/spelling, style/vocabulary, and
logic/structure — and then merges them into one weighted revision plan. The
three reviewers run as real ACPs agents, each exposing its own capability
document (ACS), discovered through ADP and driven through AIP v2 task
lifecycle over JSON-RPC.
Why this exists
High-stakes English writing is rarely a single problem. A statement of purpose can be grammatically clean yet argumentatively flat; a business email can be well structured yet full of weak, colloquial vocabulary. Single-prompt "grammar checkers" collapse these dimensions into one opaque score.
This project separates the editorial board the way a real writing centre does:
| Scenario | What the learner needs | Which agent carries it |
|---|---|---|
| Study-abroad statement of purpose | Precise, formal prose and a coherent personal narrative | Style + Structure |
| CET-4/6, IELTS, TOEFL essay practice | Fast sentence-level correction against a stable rubric | Critic |
| Executive English email | Register control, concise signposting, clear next action | Style + Structure |
| Thesis / research abstract | Thesis clarity, paragraph logic, conclusion strength | Structure |
Why multi-agent instead of one prompt?
- Separation of concerns — each agent owns one rubric and cannot drown out the others.
- Parallel latency — the Leader dispatches three AIP tasks concurrently.
- Auditability — every dimension has its own score, issues and evidence.
- Replaceability — swap the deterministic engine for an LLM per agent without touching the ACPs wiring.
Architecture
ADP discovery: filter skills.tags
┌──────────────────────────────────────────────────────────────────────┐
│ Leader (EssayCoachSession) │
│ AIC 1.2.156.3088.1.1.34C2.478BDF.00000L.0SEN │
└───────┬──────────────────────┬───────────────────────┬───────────────┘
│ AIP start (parallel) │ AIP start (parallel) │ AIP start (parallel)
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌──────────────────┐
│ CriticAgent │ │ StyleAgent │ │ StructureAgent │
│ …000001.0SEN │ │ …000002.0SEN │ │ …000003.0SEN │
│ grammar │ │ vocabulary │ │ thesis / flow │
│ spelling │ │ register │ │ paragraph roles │
│ punctuation │ │ sentence vary │ │ outline │
└───────┬───────┘ └───────┬───────┘ └────────┬─────────┘
│ AIP product │ AIP product │ AIP product
└──────────────────────┴───────────┬────────────┘
▼
weighted synthesis 40 / 30 / 30
▼
CoachingReport (one plan)
Each agent is a FastAPI/uvicorn service on loopback exposing POST /aip/v2/rpc.
The default mesh (LocalAgentMesh) starts all three in background threads,
publishes their ACS into an in-process ADP registry, and lets the Leader
discover them by skill tag — exactly the same path a remote deployment would use.
AIP task lifecycle
start ──► awaiting-completion ──► complete
│ │
└── product ────┘ (grammar/style/structure report as StructuredDataItem)
The Leader runs start on all three agents with asyncio.gather, validates
every product, then issues complete for all three. The resulting task IDs and
final states are embedded in CoachingReport.collaboration.
Agent roles
| Agent | Skill ID | Input | Output |
|---|---|---|---|
| CriticAgent | essay-coach.critic |
Full EssaySubmission |
Corrected essay, per-sentence issues with category/severity, grammar score |
| StyleAgent | essay-coach.style |
Full EssaySubmission |
Type-token ratio, sentence rhythm, weak-word/cliché/repetition upgrades, style score |
| StructureAgent | essay-coach.structure |
Full EssaySubmission |
Paragraph roles, thesis statement, conclusion detection, transition coverage, genre outline, structure score |
The Leader applies fixed weights — Critic 40% / Style 30% / Structure 30% — and emits a prioritised action list, a revised opening, and three next steps.
Install
python -m pip install acps-essay-writing-coach
For local development from this repository:
python -m pip install -e ".[dev]"
No API key, network model, or external service is required. The bundled engine is deterministic, so the demo and tests produce reproducible output.
One-command demo
essay-coach demo
or, without relying on the console script:
python -m essay_coach demo
Review your own essay:
essay-coach review --file examples/sample_essay.txt \
--title "Should Universities Require Students to Study Abroad?" \
--genre ielts-task-2 --band "IELTS 6.5" --words 250
Paste an essay interactively (finish with a line containing END):
essay-coach practice --genre statement-of-purpose --band "CEFR C1" --words 800
Supported genres: ielts-task-2, toefl-independent, statement-of-purpose,
business-email. Use --variant en-GB|en-US for spelling convention.
Expected output (real run)
The built-in sample deliberately contains 12 sentence-level issues, several weak words/clichés, and two malformed signposts. The three agents report independently, then the Leader merges them:
==============================================================================
ACPs Essay Writing Coach v1.0.0 · AIP v2 多智能体协作演示
作文: Should Universities Require Students to Study Abroad? | 体裁: ielts-task-2 | 目标: IELTS 6.5 | 字数: 242/250
==============================================================================
[ADP] 通过发现协议解析到以下 ACPs 智能体:
1. CriticAgent skill=essay-coach.critic
aic=1.2.156.3088.1.1.34C2.478BDF.000001.0SEN
2. StyleAgent skill=essay-coach.style
aic=1.2.156.3088.1.1.34C2.478BDF.000002.0SEN
3. StructureAgent skill=essay-coach.structure
aic=1.2.156.3088.1.1.34C2.478BDF.000003.0SEN
[Leader] 正在通过 AIP v2 并发派发 3 个批改任务(Critic / Style / Structure)...
[CriticAgent] 语法与拼写纠错 · 得分 61/100 · 14 句 / 242 词 · 12 处问题(4.96/100 词)
#1 S1 [MAJOR · 主谓一致] "people is" -> "people are"
#5 S4 [MAJOR · 主谓一致] "studying abroad give" -> "studying abroad gives"
#9 S8 [MODERATE · 介词搭配] "In the other hand" -> "On the other hand"
#12 S14 [MODERATE · 拼写] "recieve" -> "receive"
[StyleAgent] 文风与词汇润色 · 得分 42/100
词汇多样性(TTR): 0.80 | 平均句长: 17.3 词 | 从句比例: 29%
高频重复词: students ×6、abroad ×5、people ×3、exchange ×3
1. [弱词替换] "very" -> markedly / notably / considerably
5. [陈词套话] "with the development of society" -> In an increasingly interconnected world
[StructureAgent] 逻辑与结构指导 · 得分 88/100 · 4 段 · 衔接覆盖率 100%
论点句: In my opinion, I think a short overseas exchange is beneficial, ...
段落诊断: P2/P3 衔接词形式有误(on one hand / in the other hand)
==============================================================================
Leader 汇总报告 · 三维加权批改
==============================================================================
Overall Score: 63.4/100
- 语法与拼写 (Critic) 61/100 × 权重 40%
- 文风与词汇 (Style) 42/100 × 权重 30%
- 逻辑与结构 (Structure) 88/100 × 权重 30%
优先修改动作:
1. [Critic] 修正第 1 句的主谓一致问题:"people is" -> "people are"
2. [Critic] 修正第 3 句的主谓一致问题:"flexibility matter" -> "flexibility matters"
3. [Style] 替换弱词:"very" -> "markedly"
4. [Structure] 按提纲逐段检查 topic sentence
AIP v2 协作轨迹:
- CriticAgent task=task-… skill=essay-coach.critic final=completed
- StyleAgent task=task-… skill=essay-coach.style final=completed
- StructureAgent task=task-… skill=essay-coach.structure final=completed
The full report additionally prints the corrected essay, every upgrade with an example sentence, paragraph-by-paragraph diagnostics, the genre-specific outline, and the revised opening.
Project structure
acps-essay-writing-coach/
├── pyproject.toml # PEP 621 metadata, version 1.0.0, console script
├── README.md
├── LICENSE # MIT
├── .gitignore
├── examples/
│ └── sample_essay.txt # essay used by `essay-coach review --file`
├── src/
│ └── essay_coach/
│ ├── __init__.py
│ ├── __main__.py # python -m essay_coach
│ ├── py.typed # PEP 561 marker
│ ├── models.py # pydantic payloads / report schemas
│ ├── engine.py # deterministic editorial engine (3 rubrics)
│ ├── identity.py # AIC + ACS construction
│ ├── registry.py # in-process ADP discovery service
│ ├── runtime.py # AIP RPC server + payload codecs
│ ├── leader.py # parallel task orchestration + synthesis
│ ├── mesh.py # starts the three agents on loopback
│ ├── cli.py # essay-coach demo / review / practice
│ ├── demo.py # scripted end-to-end demonstration
│ └── agents/
│ ├── __init__.py
│ ├── base.py # AIP lifecycle base class
│ ├── critic.py # CriticAgent
│ ├── style.py # StyleAgent
│ └── structure.py # StructureAgent
├── tests/
│ └── test_end_to_end.py # discovery + full AIP review + engine checks
└── dist/ # generated by `python -m build`
Build the wheel
python -m pip install --upgrade build twine
python -m build --wheel
python -m twine check dist/*
Expected artefact:
dist/acps_essay_writing_coach-1.0.0-py3-none-any.whl
Verify the built artefact in a clean environment:
python -m pip install --force-reinstall dist/acps_essay_writing_coach-1.0.0-py3-none-any.whl
essay-coach --version
essay-coach demo
To build both sdist and wheel:
python -m build
Publish to PyPI
Always validate on TestPyPI first:
python -m twine upload --repository testpypi dist/*
python -m pip install --index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/ acps-essay-writing-coach
Then publish to production:
python -m twine upload dist/*
Authenticate with a PyPI API token (recommended) rather than a password:
# PowerShell
$env:TWINE_USERNAME = "__token__"
$env:TWINE_PASSWORD = "pypi-XXXXXXXXXXXXXXXXXXXXXXXX"
python -m twine upload dist/*
# bash / zsh
export TWINE_USERNAME="__token__"
export TWINE_PASSWORD="pypi-XXXXXXXXXXXXXXXXXXXXXXXX"
python -m twine upload dist/*
Or configure ~/.pypirc:
[distutils]
index-servers =
pypi
testpypi
[pypi]
username = __token__
password = pypi-XXXXXXXXXXXXXXXXXXXXXXXX
[testpypi]
repository = https://test.pypi.org/legacy/
username = __token__
password = pypi-XXXXXXXXXXXXXXXXXXXXXXXX
Before every release, bump version in pyproject.toml (SemVer), rebuild,
and re-run twine check.
Run the tests
python -m pip install -e ".[dev]"
pytest
The suite covers:
- ADP discovery resolves all three agents by skill tag.
- A full review runs over real AIP RPC and returns three completed task traces.
- The Critic engine detects the seeded agreement, preposition and spelling errors.
Design notes
- Protocol-native payloads. Reports travel as
StructuredDataIteminside an AIPProduct; no private transport or ad-hoc envelope is introduced. - Deterministic by default.
EssayEnginecontains the editorial knowledge (rules, weak-word maps, clichés, transition lists). This keeps the demo, tests and wheel reproducible on any machine. - LLM-ready seams. Replace
review_grammar,review_styleorreview_structurewith LLM-backed implementations; the ACPs discovery, task lifecycle and synthesis remain unchanged. - Genre-aware rubrics. Outlines, contraction checks and target band
language adapt to
WritingGenreandLanguageVariant.
Naming
acps-— the project is built on the ACPs protocol family (Agent Capability Specification, Agent Discovery Protocol, Agent Identity Code, Agent Interaction Protocol) shipped byacps-sdk.essay-writing-coach— the product surface: a coach for high-stakes English essays and professional writing, not a generic grammar utility.- Import package:
essay_coach; console command:essay-coach.
License
MIT © 2026 ACPs Essay Coach Engineering.
Metadata
Release files for acps-essay-writing-coach 1.0.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 | Provenance | Actions |
|---|---|---|---|---|
| acps_essay_writing_coach-1.0.0.tar.gz | 44.1 kB | Without provenance | Details for acps_essay_writing_coach-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| acps_essay_writing_coach-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for acps_essay_writing_coach-1.0.0-py3-none-any.whl |
Total release size: 91.1 kB
Release files / acps_essay_writing_coach-1.0.0.tar.gz
| Download URL | acps_essay_writing_coach-1.0.0.tar.gz |
|---|---|
| Size | 44.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
728f607eb498e845961a05285f4217930e4c0d473eae7c052878ca2074efcc3f
|
|
BLAKE2b-256 checksum How to use checksums |
d7928a849bcb24215ab8df569d40d0eaaeb2f850a6eb5d8922526ab047fa8c6f
|
| 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}
|
Release files / acps_essay_writing_coach-1.0.0-py3-none-any.whl
| Download URL | acps_essay_writing_coach-1.0.0-py3-none-any.whl |
|---|---|
| Size | 47.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d83dedaa0d1ee7fd78639c1edfe18db4d4277c0b07b3eb6bb1187a96a8fd143
|
|
BLAKE2b-256 checksum How to use checksums |
4d448f1fa2572ff0d56669f39932293ce18325acd94fc5b14865c22a1e5a4ea6
|
| 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-essay-writing-coach 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.