v0.20.4
v0.20.4
AgentCrew v0.20.4 — this release focuses on the A2A protocol server: cross-agent conversation continuity with tenant-scoped sessions, per-turn streaming artifacts, recovery of orphaned tasks after crashes/restarts, and a significant performance boost for long-running streaming tasks. It also introduces truly async agent activation so MCP discovery runs natively on the caller's event loop.
What's Changed
🚀 Features
-
Agent-agnostic sessions keyed by tenant (
7dea77e4) — Conversation history is now shared across agents and keyed by{owner}:{context_id}, so a conversation can continue seamlessly when switching between agents. Task and pending-tool state stays isolated per agent namespace + owner. -
Truly async agent activation (
a865214b) —LocalAgent.activate_asyncnow replicates the full sync activation path and runs MCP discovery as a non-blocking background task on the caller's event loop instead of spawning a thread withasyncio.run(). Also fixes cross-event-loop OAuth lock binding by scopingasyncio.Locks per(server, event loop).
🐛 Bug Fixes
-
Orphaned A2A tasks no longer hang on resubscribe (
82568a6f) — Resubscribing to a persisted non-terminal task with no live producer (server restart or an execution that died mid-stream) previously hung on an idle SDK producer. The newAgentCrewRequestHandlerV2terminates such resubscribes by marking the orphaned taskFAILED, and startup reconciliation marks stale tasksFAILEDafter a restart. -
Performance fix for long-running streaming tasks (
c8793cc7) — Token chunks are now buffered and flushed every 100ms as one batched artifact event, so SDK task-store persistence runs once per batch instead of once per token (the cause of A2A streaming being slower than the interactive UI). The file-backed task store also switched to JSONL appends with atomic compaction — steady-state saves no longer reread the whole file, and torn trailing lines from crashes are tolerated.
🧹 Refactors & Cleanup
-
Per-turn artifacts for every LLM round-trip (
bf896114) — Each LLM/tool round now streams into its own per-turn artifact (answer_{task_id}_turn_{n}, plus per-turn thinking/tool artifacts), giving clients a clean view of multi-turn tool workflows. -
Separated concerns in the A2A executor (
3237a55d) — The executor was split into dedicated modules:artifact_stream.py(streaming state + chunk buffer),attachment_processor.py(file/URI attachment preprocessing), andtool_executor.py(tool-call orchestration). -
Cleanup and formatting (
9c757943)
Thanks for the continued contributions, bug reports, and feedback! 🎉