Release 0.14.0
Changed
-
Executor Schema Mechanism — Pydantic BaseModel with ClassVar
-
All built-in executors now declare input/output schemas as Pydantic
BaseModelclasses assigned viainputs_schema: ClassVar[type[BaseModel]]andoutputs_schema: ClassVar[type[BaseModel]], replacing inlineget_input_schema()/get_output_schema()method overrides -
BaseTask.get_input_schema()andget_output_schema()are now implemented in the base class: they callmodel_json_schema()on the Pydantic model and resolve$refreferences inline viaresolve_schema_refs() -
Subclasses no longer need to override
get_input_schema()/get_output_schema()— just set theClassVar -
Both Pydantic
BaseModeland legacydictschemas are still supported (backward compatible) -
Added
resolve_schema_refs()helper incore/utils/helpers.pyto inline$defs/$reffrom Pydantic-generated JSON Schema -
Updated all 16 built-in executors:
AggregateResultsExecutor,ApiExecutor,BatchCrewaiExecutor,CrewaiExecutor,DockerExecutor,SendEmailExecutor,GenerateExecutor,GrpcExecutor,RestExecutor,LLMExecutor,McpExecutor,ScrapeExecutor,SshExecutor,CommandExecutor,SystemInfoExecutor,WebSocketExecutor -
Updated documentation across 8 files:
extending.md,custom-tasks.md,quick-reference.md,python.md,basic_task.md,quick-start.md,faq.md,best-practices.md -
API Architecture Refactoring — Three-Layer Design
-
Introduced unified capabilities registry (
api/capabilities.py) as single source of truth for all 15 task operations, replacing separate inline definitions in A2A and MCP modules -
A2A
POST /now only handles agent-level actions (tasks.execute,tasks.generate,tasks.cancel); CRUD operations return an error directing clients toPOST /tasks -
MCP adapter auto-generates all 15 tools from the capabilities registry via
call_by_tool_namerouting -
Simplified A2A adapter: removed ~300 lines of CRUD bridging code from
agent_executor.pyandtask_routes_adapter.py
Added
-
Email Executor (
send_email_executor) -
Send emails via Resend HTTP API or SMTP protocol
-
Provider dispatch:
inputs["provider"]selects"resend"or"smtp" -
Resend provider: POST to
https://api.resend.com/emailsviahttpx.AsyncClient, returns message ID and status code -
SMTP provider: Uses
aiosmtplib.send()(optional dependency, guarded import) -
Supports plain text and HTML emails, cc/bcc recipients, reply-to address
-
Input validation for required fields (provider, to, subject, from_email, body/html)
-
Schema methods (
get_input_schema,get_output_schema) and demo mode support -
Added
[email]optional dependency withaiosmtplib>=3.0.0 -
Added
emailto[all]installation extra -
Comprehensive test coverage: 26 tests for validation, Resend, SMTP, schemas, and demo results
-
Method Discovery Endpoint (
GET /tasks/methods) -
Returns all available task methods grouped by category (
agent_action,crud,query,monitoring) with input schemas, descriptions, and examples -
Driven by the capabilities registry for automatic consistency
-
Task Scheduling System
-
Added
ScheduleTypeenum supporting six schedule types:once,interval,cron,daily,weekly,monthly -
Added 9 scheduling fields to
TaskModel:schedule_type,schedule_expression,schedule_enabled,schedule_start_at,schedule_end_at,next_run_at,last_run_at,max_runs,run_count -
Created
ScheduleCalculatormodule for next execution time calculation across all schedule types -
Database migration
002_add_scheduling_fields.pyfor adding scheduling columns and indexes -
Automatic execution mode detection: tasks with children execute in tree mode, tasks without children execute in single mode
-
Internal Scheduler
-
Built-in asyncio-based scheduler (
InternalScheduler) for standalone deployment -
Configurable poll interval, max concurrent tasks, task timeout, and user filtering
-
Scheduler lifecycle management: start, stop, pause, resume
-
Task completion callbacks for monitoring and integration
-
External Scheduler Gateway
-
WebhookGatewayfor HTTP webhook integration with external schedulers -
HMAC signature validation, IP filtering, and rate limiting
-
Helper functions for generating cron entries and Kubernetes CronJob manifests
-
Support for cron, Kubernetes CronJob, APScheduler, Temporal integration
-
Calendar Integration
-
ICalExporterfor exporting scheduled tasks in iCalendar format -
RRULE support for recurring events (daily, weekly, monthly, interval)
-
Calendar feed URL generation for subscription in Google Calendar, Outlook, etc.
-
Scheduler CLI Commands
-
apflow scheduler start- Start internal scheduler (foreground or background) -
apflow scheduler stop- Stop running scheduler -
apflow scheduler status- Show scheduler status -
apflow scheduler trigger- Manually trigger a task -
apflow scheduler export-ical- Export tasks to iCal format -
apflow scheduler webhook-url- Generate webhook URL for external schedulers -
Scheduling API Endpoints
-
tasks.scheduled.list- List all scheduled tasks -
tasks.scheduled.due- Get tasks due for execution -
tasks.scheduled.init- Initialize/recalculate next_run_at -
tasks.scheduled.complete- Complete scheduled run and calculate next execution -
tasks.webhook.trigger- Trigger task execution via webhook (JSON-RPC) -
POST /webhook/trigger/{task_id}- REST endpoint for external schedulers -
Repository Methods for Scheduling
-
get_due_scheduled_tasks()- Query tasks ready for execution -
get_scheduled_tasks()- List scheduled tasks with filters -
mark_scheduled_task_running()- Mark task as in-progress -
complete_scheduled_run()- Complete run and update scheduling state -
initialize_schedule()- Calculate initial next_run_at -
Added
schedulingoptional dependency withcroniter>=1.0.0 -
Added scheduling to
standardandallinstallation extras -
Comprehensive test coverage: 118 tests for scheduling functionality