v0.1.1
v0.1.1
Breaking Changes
Async enqueue() function
ax.enqueue()is now async and must be awaited:task = await ax.enqueue("task_name", MyContext(key="value"))
Type-safe context with Pydantic BaseModel
- Task context must be a Pydantic
BaseModelinstead of a rawdict - Context class is automatically inferred from handler type hints:
class ResearchContext(BaseModel): company: str @pool.task("research") async def research(agent_id: UUID, context: ResearchContext): company = context.company # Type-safe with IDE autocomplete
Redis URL now required
redis_urldefaults toNoneand must be explicitly configured viaREDIS_URL- Prevents accidental connections to wrong Redis instances
New Features
Configurable activity messages
- Activity status messages are configurable via environment variables:
AGENTEXEC_ACTIVITY_MESSAGE_CREATE="Waiting to start." AGENTEXEC_ACTIVITY_MESSAGE_STARTED="Task started." AGENTEXEC_ACTIVITY_MESSAGE_COMPLETE="Task completed successfully." AGENTEXEC_ACTIVITY_MESSAGE_ERROR="Task failed with error: {error}"
Improved Task architecture
Taskis now the primary execution object withexecute()methodTaskDefinitionhandles registration metadata and context class inference- Full lifecycle management (QUEUED → RUNNING → COMPLETE/ERROR) encapsulated in
Task.execute()
Better SQLAlchemy session management
- New
scoped_sessionpattern for worker processes - Proper session cleanup on worker shutdown
Internal Improvements
- Switched to async Redis client (
redis.asyncio) - Consolidated cleanup code in worker
_run()method - Removed unused
debugconfig option