Skip to content

v0.2.16

Choose a tag to compare

@jin-bo jin-bo released this 28 Apr 15:34
· 166 commits to main since this release

Agentao 0.2.16

Maintenance release that closes the embedded-harness M2 / M3
milestones
. Agentao(...) is now a pure-injection construction
surface — nothing in the constructor implicitly reads os.environ,
Path.home(), Path.cwd(), or <wd>/.agentao/*.json unless the
caller routes through agentao.embedding.build_from_environment().
CLI and ACP both go through the factory, so end-user behavior is
unchanged. Embedded hosts get a deterministic, side-effect-free
construction surface plus an await agent.arun(...) async path,
opt-in replay / sandbox / bg_store, and a one-cycle
soft-deprecation for Agentao() constructed without
working_directory= (TypeError in 0.3.0).

No breaking changes for CLI / ACP users. The full Added / Changed /
Deprecated breakdown is in the CHANGELOG.md [0.2.16] entry.

Highlights

  • agentao.capabilitiesFileSystem / ShellExecutor protocols
    with LocalFileSystem / LocalShellExecutor defaults that are
    byte-equivalent to today's behavior. File, search, and shell tools
    route through the capability layer, so embedded hosts can swap in
    Docker exec, virtual filesystems, audit-log shells, or remote
    runners without monkey-patching subprocess / pathlib.
  • agentao.embedding.build_from_environment(...) factory.
    Single chokepoint for every implicit .env / .agentao/permissions.json
    / .agentao/mcp.json / .agentao/replay.json / .agentao/sandbox.json
    / cwd / home read that used to live in Agentao.__init__. CLI
    (agentao/cli/...) and ACP (session_new, session_load) both
    call through it; subsystem fallbacks are now dead code from their
    perspective.
  • Pure-injection construction. Agentao.__init__ accepts
    explicit llm_client, logger, memory_manager, skill_manager,
    project_instructions, mcp_manager, filesystem, and shell
    injections. When skill_manager or project_instructions is
    injected, the auto-discovery / <wd>/AGENTAO.md disk-read paths
    are skipped entirely.
  • Async public surface — Agentao.arun(...). Bridges the sync
    chat pipeline through loop.run_in_executor, so async hosts can
    await agent.arun(...) without rolling their own thread bridge.
    Cancellation, replay, and max_iterations behave identically
    across chat() and arun(). Internal runtime stays sync (no
    AsyncTransport).
  • Opt-in replay / sandbox / bg_store. Three new keyword-
    only kwargs on Agentao.__init__. Each defaults to None =
    fully disabled; embedded hosts that don't ask for the feature pay
    zero cost. Notable: when bg_store=None, the run_in_background
    field is schema-level removed from sub-agent tool definitions
    (not expose-then-error), so the LLM cannot be tempted to call a
    disabled feature and ACP / OpenAI catalogs do not advertise it.
    CLI continues to construct all three through the factory.
  • Subsystem constructors no longer fall back to environment.
    LLMClient(api_key=, base_url=, model=), MemoryManager(project_root=, global_root=),
    PermissionEngine(project_root=), and load_mcp_config(project_root=)
    raise TypeError if their required arguments are missing — no
    more silent reads of os.environ, Path.cwd(), or Path.home().
    Direct construction in embedded-host or test code may need a
    one-line update; CLI / ACP behavior is unchanged because the
    factory has been passing these explicitly since the M2 cut.
  • Sub-agent credential split bug fixed. Sub-agent construction
    in agentao/agents/tools.py no longer re-reads provider env vars
    ({PROVIDER}_API_KEY / _BASE_URL). Children inherit the
    parent's already-resolved LLM config, so a mid-run env mutation
    cannot create a credential split between parent and sub-agent.

Deprecation (one-cycle warning before 0.3.0)

  • Agentao() constructed without working_directory= emits a
    DeprecationWarning pointing callers at the factory or the
    explicit working_directory=Path(...) form. The argument becomes
    a required keyword in 0.3.0. Internal docs, examples, and tests
    have already been migrated; pytest -W error::DeprecationWarning tests/
    is clean on this release.

Tests

  • tests/test_agent_subsystems_optional.py (new) — pins the
    replay_config=None / sandbox_policy=None / bg_store=None
    contract: bare construction, schema removal of run_in_background,
    short-circuited /agent CLI subcommands, factory parity.
  • tests/test_no_subsystem_fallback_reads.py (new) — trip-wires
    Path.cwd() and Path.home() while constructing LLMClient /
    MemoryManager / PermissionEngine / load_mcp_config, so any
    re-introduced fallback surfaces as a loud failure rather than
    silent steering into the user's home directory.
  • Existing test suite (tests/test_acp_*, tests/test_bg_task_store.py,
    tests/test_mcp_config.py, tests/test_per_session_cwd.py,
    tests/test_permissions.py, etc.) updated to pass explicit
    project_root= / user_root= / capability arguments.

Release Summary

  • Version: 0.2.16
  • Git tag: v0.2.16
  • GitHub release type: regular release, not pre-release
  • Publish workflow: .github/workflows/publish.yml

Install

pip install -U agentao

Maintainer Checklist

  1. Ensure agentao/__init__.py reports 0.2.16 (drop the .dev0
    suffix from 0.2.16.dev0).

  2. Run the smoke path:
    uv run python -m pytest tests/ && uv build && uv run twine check dist/*.

  3. Push the tag:

    git push origin v0.2.16
  4. Create the GitHub release for v0.2.16.

  5. Leave Set as a pre-release unchecked so
    .github/workflows/publish.yml publishes to PyPI (the workflow's
    tag-vs-package version consistency check will validate alignment
    before upload).

  6. Close embedded-harness GitHub issue #15 (Issue 9, opt-in
    Replay / Sandbox / BackgroundTaskStore) once the
    release is on PyPI. Issues #7-#13 (capability protocols,
    factory, fallback deletion, arun, soft deprecation) were
    already closed when c1f802f and b3b403f landed and do
    not need to be re-closed. Issues #14 (Issue 8, hard break)
    and #16-#18 (M5: MemoryStore / MCPRegistry /
    docs/EMBEDDING.md) stay open and are scheduled for 0.3.0
    and follow-ups.

Full Changelog

See CHANGELOG.md for the 0.2.16 entry.