Skip to content

v0.20.0

Choose a tag to compare

@daltonnyx daltonnyx released this 28 Jul 06:15

AgentCrew v0.20.0 — Release Changelog

🚀 Major Features

1. A2A Protocol v1 Migration

The Agent-to-Agent protocol stack has been fully migrated from the deprecated v0.3 spec to the latest v1 protobuf-based specification, using a2a-sdk==1.1.2.

  • SDK route factories replace hand-rolled JSON-RPC routing — per-agent mounts with create_agent_card_routes() and create_jsonrpc_routes().
  • Clean enum contractTASK_STATE_WORKING (not working), ROLE_USER (not Role.user), etc., with zero legacy v0.3 endpoints.
  • AgentCard v1supportedInterfaces contains a single JSONRPC 1.0 entry; legacy /agent.json returns 404.
  • Task-based streamingTaskArtifactUpdateEvent with proper append/last_chunk semantics, not message-based SSE.
  • Durable TaskStore — memory / file / Redis backends survive restarts; non-terminal tasks are reconciled on server restart.
  • AgentCrewA2AExecutor — new SDK AgentExecutor adapter with task-scoped cancellation, recursive LLM/tool rounds, and answer artifact continuity across re-connection.
  • ArtifactAccumulator — append-aware text aggregation that correctly handles both live deltas and reconnect snapshots (no false dedup of repeated content like "ha"+"ha" → "haha").
  • RemoteAgent — rewritten to use a2a.client.create_client() with ClientConfig for proper auth, reconnection via subscribe(SubscribeToTaskRequest), and input-required continuation.
  • Session storesAgentCrewSessionStore (history + pending tools) separated from protocol TaskStore, both with per-agent namespace isolation.
  • Lifecycle shutdownApplicationSetup.shutdown() drains all handlers (aclose()), closes session stores and task stores during ASGI lifespan.
  • Removed deprecated modules: task_manager.py, task_store/ (base, memory, file, redis, factory), task_execution.py, task_streaming.py, task_cancellation.py, task_interaction.py, common/client/client.py, common/client/card_resolver.py.

2. Tool Input Validation Layer

A new centralized validation gate intercepts every generated tool call before it reaches confirmation, permission, or execution.

  • validate_tool_input() — validates against the registered JSON Schema using jsonschema.iter_errors() collecting all failures, not just the first.
  • validate_tool_use() on LocalAgent — the single shared contract used by all execution modes.
  • Pre-confirmation rejection — invalid calls now reject before TOOL_USE events, confirmation dialogs, or ACP permission requests.
  • Designed for exactly-once — each generated call is validated once and only once, regardless of execution mode (Chat, ACP, A2A, Job).
  • Covered in all modes: run_agent_loop() (Job), ToolManager.execute_tool() (Chat), TurnExecutor.execute_tools() (ACP), AgentCrewA2AExecutor (A2A v1).

3. Async Lifecycle Migration (nest_asyncio removed)

Critical code paths have been converted to async-native lifecycle, enabling removal of the nest-asyncio dependency (shipped as nest-asyncio==1.6.0).

  • Agent selectionAgentManager.select_agent_async(), deactivate_async(), activate_async() with proper rollback semantics on target activation failure.
  • Transferperform_transfer_async() with context bookkeeping only committed on success; retry-safe.
  • MCP deregistration — uses await MCPSessionManager.deregister_tools_for_agent() natively instead of asyncio.run().
  • Chat commands/jump, /fork, /model, /agent now async (handle_jump(), handle_fork(), handle_model(), handle_agent()).
  • Config persistenceAgentsConfig.write_async(), update_agent_system_prompt_async(), reload_async().
  • Lifecycle wiringApplicationSetup.shutdown() releases plugin and remote-agent resources.
  • asyncio.Runner for uvicornstart() uses asyncio.Runner with uvicorn's loop_factory kwarg, safe on Python 3.12+.

4. Code Analysis Cache Revamp

The analyze_repo cache has been redesigned for schema v2 with manifest-based change detection.

  • Per-file hashing — each analyzed file stores a SHA-256 content hash; no raw Tree-sitter AST or complete analysis_text is persisted.
  • Change detection — compares current content hashes against stored files map; only added/modified/deleted files count as changes.
  • Incremental merge — small change sets (up to 20 files, minimum 5, 15% of baseline) merge without full re-analysis.
  • Schema versioning — entries without schema_version: 2 trigger a one-time full rebuild.
  • Deduplication via discover_supported_files() — shared discovery function ensures baseline consistency between manifest computation and full analysis.
  • Path normalizationos.path.relpath backslash results are normalized to forward slashes, enabling cross-platform cache mobility.

5. Code Quality & Linting

  • Fixed lint violations for the latest ruff version (ble001, per-file-ignores, type annotations).
  • typing_extensionscollections.abc for Callable, Awaitable, etc.
  • datetime usage fixed for timezone-awareness (datetime.now(UTC)).
  • subprocess.run(check=False) with manual returncode handling.
  • os.setsidstart_new_session=True for thread safety.
  • Fixed except (asyncio.TimeoutError, ...)except TimeoutError.
  • Pattern-starting commands in blocked list anchored (^reboot, ^shutdown, ^poweroff).

6. ACP Improvements

  • Pre-permission pre-start input validation — tools are validated before send_tool_started() and permission broker queries.
  • activate_async() / deactivate_async() — TurnExecutor uses async lifecycle natively.
  • Model switchingupdate_llm_service_async() used for ACP model controller operations.

7. Other Changes

  • Docker — fixed import path in main_docker.py.
  • run_command tool — removed client-side timeout parameter; default working directory set to ./.

Thank you for using AgentCrew! 🎉