Skip to main content
⏱️

Agent Triggers & Schedules

AI & Autonomous
Listen to this page

Agent Triggers & Schedules

Phasoric triggers turn a bounded event or a due schedule into an auditable Agent run and a reviewable Forge proposal. The run snapshots the selected Agent, Living Skill, Prompt Recipe, scope, instruction, allowed tools, policy, and budgets. Trigger handling does not mutate a vault directly or silently invoke an external provider.

Trigger Sources

Event triggers can subscribe to versioned note, metadata, task, meeting, Pulse, Strata, trust, connection, webhook, Microsoft ingestion, and generic external events. Each event carries an entity reference, content fingerprint, origin, correlation and causation IDs, and depth.

Schedule triggers support a one-time future timestamp or a five-field cron expression with an IANA time zone. Recurring schedules must be at least five minutes apart. A one-time trigger disables itself when its leased occurrence is claimed. Phasoric advances and leases a due occurrence before creating its event, so two workers cannot intentionally claim the same timestamp. A persistent idempotency key and run dedupe key make retries safe.

Hosted metadata writes emit metadata.changed through the internal event gateway after the canonical write succeeds. That gives Phasoric an internal end-to-end path in addition to REST, MCP-adjacent, webhook, Zapier, n8n, and connected-source ingestion.

Loop Prevention and Budgets

Every trigger stores:

  • Maximum event depth and runs per correlation chain.
  • Event cooldown and maximum concurrent runs.
  • Maximum retry attempts with bounded exponential backoff.
  • Maximum actions, external calls, duration, cost in microdollars, and tokens.
  • A policy snapshot showing the Agent → policy → Forge → audit route.

Self-originating trigger events and over-depth events are recorded as skipped runs. Capacity and correlation exhaustion are also recorded rather than silently dropped.

Forge includes controls to pause or resume all automations, pause or resume each definition, create event/cron/one-time definitions, select local Agent/Skill/Recipe identities, set bounded budgets, issue a dry-run test event, and inspect agent/run history. Account-level and per-agent pause state is enforced by hosted event and schedule workers rather than only hidden in the UI.

Agent Studio now presents these same records as Installed Agents. Installation combines the agent definition, scope, schedule or events, provider/tool policy, approval policy, and budgets in one flow. Each card shows status, next and last run, version snapshot, pending Forge proposals, pause/resume, run now, and uninstall controls; uninstall archives the trigger while retaining its receipts. No second scheduler or agent table is introduced.

A local-only agent can use a local vault only while a capable app is active. Hosted scheduling can run with the browser closed only over explicitly hosted or connected context allowed by the current Context Scope; it cannot remotely read an unmapped local-only vault.

Wake-Up Cadence

Phasoric's existing daily maintenance cron processes due schedules as a safe fallback. POST /api/automations/process lets the signed-in app wake its own schedules, and Developer/Team clients can call POST /api/dev/automation/process. Zapier, n8n, or another trusted scheduler can therefore provide a finer polling cadence without receiving a provider credential or an execution bypass. Actual firing precision is bounded by the chosen wake-up cadence.

Developer/Team clients can create and inspect trigger definitions through GET|POST /api/dev/automation/triggers, update or archive a trigger by ID, and inspect the durable run audit through GET /api/dev/automation/runs. Every operation is scoped to a workspace the token owner can access.

Approved Webhook Execution

A successful run creates an ActionProposal in proposed state with explicit approval required. Most external capabilities remain proposal-only until a capability-specific executor exists.

webhook.deliver is the first controlled executor. A Developer or Team workspace registers an HTTPS endpoint before a proposal is created. The destination and signing secret are encrypted, and the proposal references the immutable endpoint ID rather than supplying a URL. After policy-aware Forge approval, Phasoric signs and sends the bounded preview payload. Transient outcomes retry only within the proposal's external-call budget; permanent outcomes become visible dead letters. Forge shows queued, retrying, delivered, and dead-letter state.

Zapier and n8n starter assets are available from GET /api/dev/automation/templates. The Zapier asset is an honest configuration recipe rather than a proprietary Zap export. The n8n assets are importable workflow JSON for sending events and receiving approved signed deliveries. Registered endpoint metadata is available under /api/dev/automation/endpoints; URLs and signing secrets are not returned after creation.