Skip to main content
Palyra’s automation layer provides a robust framework for unattended agent execution, scheduled maintenance, and long-lived goal tracking. It bridges the gap between reactive messaging and proactive system behavior through a unified scheduling and objective-management system.

High-Level Automation Architecture

The automation layer is built on three pillars: the Cron Scheduler, Routines, and Objectives. These components interact to ensure that agents can fire based on time, events, or persistent goals while adhering to safety and approval constraints.

Natural Language to Code Entity Space: Automation Dispatch

This diagram illustrates how a user’s intent or a scheduled trigger flows from high-level concepts into the internal daemon machinery. Sources: crates/palyra-daemon/src/cron.rs#3-13, crates/palyra-daemon/src/routines.rs#94-103, crates/palyra-daemon/src/objectives.rs#3-7

Routines and Cron Scheduler

The spawn_scheduler_loop is the heart of Palyra’s proactive execution. It handles time-based triggers defined via cron expressions or natural language phrases. For details on scheduling logic, jitter, and routine synchronization, see Routines and Cron Scheduler.

Objectives, Webhooks, and Event Triggers

Objectives represent long-lived goals that may span multiple sessions and weeks. They provide a structured way to track progress and manage budgets for autonomous agents.

Code Entity Mapping: Objective Lifecycle

The relationship between objective goals and their underlying automation components.
Code EntityPurposeFile Reference
ObjectiveRecordThe primary document for goal state and history.crates/palyra-daemon/src/objectives.rs#3-7
ObjectiveBudgetEnforces token and run limits on autonomous agents.crates/palyra-daemon/src/objectives.rs#145-152
ObjectiveJudgeInputData structure used by LLM judges to evaluate goal completion.crates/palyra-daemon/src/transport/http/handlers/console/objectives.rs#31
WebhookRegistryManages external triggers and signature verification.crates/palyra-daemon/src/webhooks.rs#194-196
For details on the objective judge, planning regressions, and webhook replay protection, see Objectives, Webhooks, and Event Triggers.

Summary of Key Automation Components

ComponentResponsibilityPrimary Logic
Cron LoopMinute-by-minute tick evaluation and misfire recovery.spawn_scheduler_loop src/cron.rs
Routine RegistryMapping triggers to specific agent prompts and delivery channels.RoutineRegistry src/routines.rs
Objective StoreLong-term goal persistence and budget enforcement.ObjectiveRecord src/objectives.rs
Webhook HandlerSecure ingestion of external events via palyra-safety.WebhookRegistry src/webhooks.rs
CoalescerDebouncing rapid-fire events into single agent turns.InboundCoalescer src/application/inbound_coalescer/mod.rs
Sources: crates/palyra-daemon/src/cron.rs#3-8, crates/palyra-daemon/src/routines.rs#3-7, crates/palyra-daemon/src/objectives.rs#3-7, crates/palyra-daemon/src/webhooks.rs#3-9, crates/palyra-daemon/src/application/inbound_coalescer/mod.rs#1-8

Child Pages