v0.4.0 — Path A first break (P0.9 dependency split + P0.10 friendly error)
The single break release of the Path A P0 plan
(see docs/design/path-a-roadmap.md §3.2). The break is a packaging
change only — no public Python API is renamed, removed, or signature-
changed. The "no-change" upgrade line is pip install 'agentao[full]',
which reproduces the 0.3.x bundled closure exactly (CI-enforced against
a 122-package baseline).
Breaking changes
-
P0.9 dependency split —
pip install agentaonow installs only
the core (7 packages) needed to construct anAgentao()instance and
callchat()against an OpenAI-compatible endpoint. CLI, web fetch,
and Chinese tokenization become opt-in extras.0.3.x direct dep 0.4.0 location openai/httpx/pydantic/pyyaml/mcp/python-dotenv/filelockcore rich/prompt-toolkit/readchar/pygments[cli]beautifulsoup4[web]jieba[i18n]Migration matrix:
You are… Install line Embedding host (Python from agentao import Agentao)pip install agentaoCLI user ( agentaoconsole script)pip install 'agentao[cli]'Want zero behaviour change pip install 'agentao[full]'Closure equivalence is enforced by
tests/test_dependency_split.py
againsttests/data/full_extras_baseline.txt(122 packages frozen
on 2026-05-01). Seedocs/migration/0.3.x-to-0.4.0.mdfor the full
guide.
Added
-
P0.10 friendly missing-dep error — running the
agentaoCLI in
a core-only install (no[cli]extra) now exits 2 with a one-line
actionable message instead of crashing with an opaque
ModuleNotFoundError: rich:agentao CLI requires extra packages (missing: rich). pip install 'agentao[cli]' # CLI surface only pip install 'agentao[full]' # 0.3.x-equivalent closure See docs/migration/0.3.x-to-0.4.0.md for details.Implementation:
agentao/cli/__init__.pydefinesentrypoint()
inline (no module-level imports of rich / prompt_toolkit / readchar /
pygments) so the module load itself stays free of CLI deps; every
[cli]dep is preflighted viaimportlib.util.find_specso a
partial install (rich present, prompt_toolkit missing) still hits
the friendly path instead of leaking a "Fatal error" from
entrypoints.run_init_wizard's broadexcept Exception. All other
public names inagentao.clilazy-load via PEP 562__getattr__.
Slow-marked tests intests/test_cli_missing_dep_message.pycover
the friendly-message path, the post-[cli]boot path, the
no-trace-leak invariant, and the partial-install regression. -
docs/migration/0.3.x-to-0.4.0.md— full migration guide with
install matrix, dependency map, common project-shape recipes, and
a[full]fallback for any path the migration may have missed.
Changed
-
Web tools omitted from the registry without
[web]—
WebFetchToolandWebSearchToolregister only when
beautifulsoup4is importable. In a core install the model never
seesweb_fetch/web_searchin its tool schema (vs. the previous
behaviour of registering them and failing at execute time with an
opaque ImportError). Mirrors the existingbg_store is not None
pattern that already conditionally registers the background-agent
tools. -
Memory recall degrades gracefully without
[i18n]—
MemoryRetriever.tokenize()skips the jieba code path entirely
when the query has no CJK characters (cheap regex check). On a
CJK-bearing query in a[i18n]-less install,_cjk_segment()
returns an empty set with a one-time warning pointing at
pip install 'agentao[i18n]'instead of silently failing. -
CI test environment installs
[cli,web,i18n]— the existing
unit-test surface importsfrom agentao.cli import AgentaoCLI,
the web-fetch tool, and the jieba memory path. The defaultTest
matrix job now installs those three extras so the suite still
resolves in the core-split world. The core-only contract is
independently validated by the smoke job and
tests/test_dependency_split.py. -
Shared test helper
tests/support/wheel.py—REPO_ROOT,
find_wheel(),require_wheel(), andmake_venv()centralized
out of the venv-creation pattern that was duplicated across
test_clean_install_smoke.py,test_dependency_split.py, and
test_cli_missing_dep_message.py.