Docs

Daita agents / guide

Scheduled Routines

Repeat bounded read-only agent work through typed schedules, frozen authority, and durable inbox outcomes.

#Typed Schedules

A scheduled routine freezes one self-contained foreground-authorized instruction and one typed schedule:

  • OnceSchedule at an exact UTC instant;
  • IntervalSchedule anchored to an exact instant; or
  • CalendarSchedule at an exact local hour and minute in an IANA timezone.

Calendar schedules retain explicit daylight-saving gap and overlap policies. Misfires use bounded skip or latest_only handling; Daita never replays an unbounded backlog. Duplicate ticks and host restarts converge on the same stable occurrence identity.

#Frozen Authority

Admission records the exact agent, principal, conversation, sources, resources, MCP bindings, capabilities, model routes, sensitivity ceiling, budgets, expiration, outcome contract, distribution plan, and optional retained skill bytes.

Only capabilities declared scheduled_direct, with no operational effect and read/none data access, can enter a scheduled scope. Raw prompt text, source values, file contents, remote MCP metadata, and model output cannot enlarge it.

Scheduled execution can read admitted database resources or admitted remote MCP read tools and can create only:

  • a model-authored text/Markdown document;
  • an exact SQLite or PostgreSQL CSV/XLSX export; or
  • canonical JSON from an earlier validated result in the same run.

It cannot update data, start or cancel a job, manage another routine, edit or publish local files, deliver externally, run shell commands, or submit a workflow graph.

#Reporting and Prechecks

reporting_mode="always" runs every admitted occurrence. A changes_only routine can use an exact resource-revision precheck; when nothing changed, the occurrence completes with zero model calls and one no-change delivery.

Every terminal occurrence converges atomically with one immutable logical delivery. Repeated failures can move the routine to needs_attention and create one truthful inbox escalation. A failure before a model run starts does not invent a run record.

#Terminal Management

text
/routines
/routines create <self-contained instruction>
/routines promote <basis-run-id> <self-contained instruction>
/routines update <routine-id> <self-contained instruction>

The manager exposes pause, resume, run-now, and disable actions at the routine's current revision. Create and update use the normal foreground routine capability and approval card.

Headless lifecycle commands use an exact JSON specification:

bash
daita routines list atlas
daita routines inspect atlas <routine-id>
daita routines create atlas --spec /absolute/path/routine.json
daita routines promote atlas --spec /absolute/path/routine.json \
  --basis-run-id <completed-run-id>
daita routines update atlas <routine-id> <revision> \
  --spec /absolute/path/routine.json
daita routines pause atlas <routine-id> <revision>
daita routines resume atlas <routine-id> <revision>
daita routines run-now atlas <routine-id> <revision>
daita routines disable atlas <routine-id> <revision>

#Python Lifecycle

The public API separates proposal from durable creation:

python
proposal = await agent.propose_routine(draft)
routine = await agent.create_routine(proposal)
 
items = await agent.list_routines()
inspection = await agent.inspect_routine(routine.routine_id)
 
paused = await agent.pause_routine(
    routine.routine_id,
    expected_revision=routine.revision,
)

promote_routine() binds a draft to an exact completed basis run. update_routine(), resume_routine(), run_routine_now(), and disable_routine() all require the expected current revision and fail closed on concurrent change.

#Resident Host

Schedules progress only while one admitted host owns the agent-home writer lock. To keep work moving after the TUI exits:

bash
daita --root /absolute/daita-state \
  --workspace /absolute/path/project \
  host --agent atlas

Stop the resident host before opening the same agent in the TUI or another CLI process. The resident host uses the ordinary embedded composition; it does not add an API server, daemon manager, IPC framework, remote queue, or second writer.

See Inbox and Deliveries for occurrence outcomes.