schedules/ Schedule Directory
schedules/ declares recurring turns for AgentDir. Each Markdown file is one schedule: frontmatter defines cron metadata, and the body is the prompt sent to the agent on every fire.
Schedule File
5-field cron is normalized to 6 fields by prefixing 0 seconds. Times are evaluated in UTC.
Independent Sessions
Every schedule uses a stable session id: schedule:<name>. Repeated fires of the same schedule accumulate context; different schedules stay isolated. Every session receives AgentDir instructions.md, agent.acl, skills/, and tools/.
Daily and weekly schedules can share one AgentDir without sharing chat history. Use external storage, A3S Memory, or explicit tools when schedules need shared state.
Serve Daemon
serve_agent_dir runs every enabled schedule until the cancellation token fires. Graceful cancellation lets an in-flight turn finish the current loop iteration.
Recovery And Limits
With a SessionStore, daemon restart restores the conversation history for existing schedule:<name> sessions. Current instructions.md, skills/, and tools/ are re-applied on every boot.
Know the limits:
- Recovery restores history; it does not catch up missed fires during downtime.
- The store directory is a trust boundary for recovered history and workspace state.
- Invalid cron fails when the scheduler is built and names the offending schedule.
- An AgentDir with no enabled schedules returns immediately.