Agent Schedules & Automation
Relevant source files
The following files were used as context for generating this wiki page:
Agent Schedules & Automation is a core system within the Flow platform that enables the autonomous execution of agents based on defined time intervals. This feature allows users to automate repetitive tasks such as daily briefings, weekly research reports, and nightly evaluation runs without manual intervention.
The system integrates directly with the background worker infrastructure (Redis + ARQ) to trigger LangGraph agent pipelines. Results from these scheduled runs can be delivered to external systems via configurable channels like webhooks, ensuring that automated insights are pushed to the appropriate destinations.
Sources: README.md:14, README.md:144-149
System Architecture & Data Flow
The automation system operates through a specialized database table agent_schedules and a background worker that monitors and executes tasks. The frontend provides a management interface for creating, pausing, and deleting these schedules.
Workflow Execution
When a schedule's cron expression matches the current time, the ARQ worker triggers the specified agent using a pre-defined prompt template.
The diagram shows the lifecycle of a scheduled task from database retrieval to external delivery.
Sources: README.md:144-149, apps/web/src/app/(app)/schedules/page.tsx:28-39
Core Data Structures
The Schedule type defines the configuration for an automated agent run:
| Field | Type | Description |
|---|---|---|
id | UUID | Unique identifier for the schedule. |
agent_id | UUID | Reference to the agent to be executed. |
cron_expr | string | Standard 5-part cron expression (e.g., 0 8 * * *). |
prompt_template | string | The specific instruction passed to the agent during the run. |
delivery_type | string | Method of delivery, currently none or webhook. |
delivery_target | string | null | Destination URL for webhook delivery. |
enabled | boolean | Toggle to active or pause the automation. |
last_run_at | timestamp | ISO string of the most recent execution. |
| Sources: apps/web/src/app/(app)/schedules/page.tsx:28-39, README.md:214 |
Scheduling Configuration
Users configure schedules through the web UI, which provides several "Quick Cron" presets for common cadences.
Common Schedule Presets
The system encourages standardized intervals for different agent archetypes:
- Every Hour:
0 * * * *(e.g., for live monitoring) - Daily 8 AM:
0 8 * * *(e.g., for Morning Briefings) - Daily 3 AM:
0 3 * * *(e.g., for Nightly Evals/Cleanup) - Weekly Mon:
0 9 * * 1(e.g., for Weekly Summaries)
Sources: apps/web/src/app/(app)/schedules/page.tsx:43-48, README.md:105-117
Implementation Details: API Integration
Schedules are managed via the following REST endpoints:
GET /api/v1/schedules: Lists all schedules for a workspace.POST /api/v1/schedules: Creates a new automation entry.PATCH /api/v1/schedules/{id}/toggle: Enables or disables a specific schedule.DELETE /api/v1/schedules/{id}: Removes the schedule and stops future runs.
Sources: apps/web/src/app/(app)/schedules/page.tsx:327-356, services/api/flow/interfaces/http/routes/schedules.py
Automation Use Cases
Automation is utilized across several specialized agents defined in the system.
Nightly Evaluation Loop
A specific system-level cron job (auto_eval_tick) runs at 03:00 UTC to manage the "Continuous Improvement Loop." This process automates the evaluation of agents against "Golden Sets" to ensure quality over time.
Sources: README.md:105-117, services/api/flow/interfaces/http/routes/golden_sets.py:165-177
The sequence diagram illustrates the automated evaluation loop triggered nightly.
Sources: README.md:105-117, services/api/flow/interfaces/http/routes/golden_sets.py:165-177
Scheduled Agent Archetypes
| Agent Name | Typical Automated Task | Default Tools |
|---|---|---|
| Daily AI Briefing | Compiles daily news from arXiv/HuggingFace | tavily_search, hf_papers |
| Meeting Summarizer | Processes transcripts uploaded during the day | long_term_memory, retrieve |
| Research Analyst | Generates structured literature reviews | arxiv_search, tavily_search |
| Sources: services/api/scripts/seed_agents_and_datasets.py:53-150, services/api/scripts/seed_skills.py:615-630 |
Conclusion
Agent Schedules & Automation provides the infrastructure for Flow to function as an autonomous "second brain." By combining flexible cron-based triggers with specialized agent templates and robust delivery mechanisms, the system ensures that critical data synthesis and evaluation tasks are performed reliably and consistently.
Sources: README.md:14-17, apps/web/src/app/(app)/schedules/page.tsx:82-85