Skip to content

v0.2.0rc1

Pre-release
Pre-release

Choose a tag to compare

@tcdent tcdent released this 31 Mar 20:16
· 13 commits to main since this release

0.2.0rc1 — Architecture overhaul

First release candidate for 0.2.0. Major refactor of the backend, queue, activity, and worker systems.

Breaking changes

  • agentexec.state.redis_backendagentexec.state.redis (update AGENTEXEC_STATE_BACKEND if set explicitly)
  • AGENTEXEC_QUEUE_NAMEAGENTEXEC_QUEUE_PREFIX (old name still accepted as alias)
  • Activity functions are now async (await ax.activity.create(...), await ax.activity.update(...), etc.)
  • Task.context is now Mapping[str, Any] (raw dict), not a typed BaseModel — hydration happens at execution time
  • Task.create() is now async
  • Removed: set_global_session/get_global_session/remove_global_session — use configure_engine/get_session
  • Removed: state.backend.publish/subscribe (pubsub), index_add/index_range/index_remove, clear, configure

New features

  • Partitioned Redis queues — tasks with lock_key route to dedicated partition queues with per-partition locking and SCAN-based fair dequeue
  • Activity handler pattern — pluggable persistence via PostgresHandler (default) and IPCHandler (worker processes)
  • Task retry with backoff — failed tasks requeue as high priority with AGENTEXEC_MAX_TASK_RETRIES (default 3)
  • Kafka backend (experimental)pip install agentexec[kafka] for queue and schedule via Kafka (state ops raise NotImplementedError)
  • Typed worker IPCTaskFailed, LogEntry, ActivityUpdated messages over multiprocessing.Queue
  • Schedule composite keys{task_name}:{cron}:{context_hash} for unique schedule identity

Improvements

  • Class-based backend architecture with ABCs
  • Task is pure data, TaskDefinition owns behavior
  • Session management via configure_engine/get_session (Pool owns the engine)
  • Status enum extracted to activity/status.py (no SQLAlchemy dependency)
  • 277 tests passing across partitions, retries, execute lifecycle, schedules