OptionalaclAccess control list for the routine. Contains a grants array where each entry specifies principal_type, principal, and actions. null when no ACL restrictions are applied and the routine is accessible to all members of its scope.
OptionalagentID of the agent that owns this routine (agi_...).
OptionalappApplication that scopes this routine (dap_...).
OptionalconfigID of the Config record that backs this routine's configuration (cfg_...). null when the routine is not config-backed.
Optionalcreated_When this routine was created (ISO 8601).
OptionaldescriptionOptional description of what this routine does. null when not set.
Optionalevent_Additional configuration controlling how the event trigger is matched or filtered. Shape depends on event_type. null when not configured.
Optionalevent_Platform event type that triggers this routine, e.g. "agentroutine.invoked". null for schedule-only routines.
Optionalhandler_Execution strategy for this routine. One of "workflow_graph", "script", "preset", or "chain".
Routine ID (arn_...).
Optionallast_ID of the AgentRoutineTemplate Config this routine was last provisioned or updated from (cfg_...). null for hand-built routines.
Optionallookup_Unique human-readable key used to look up this routine without knowing its ID. null when not set.
OptionalmetadataArbitrary key-value metadata attached to this routine. null when not set.
OptionalnameHuman-readable name for the routine.
Optionalpreset_Resolved preset configuration when handler_type is "preset". null for other handler types.
Optionalpreset_Name of the preset invoked when handler_type is "preset". null for other handler types.
OptionalscheduleCron expression controlling when the routine fires on a schedule. null for event-only routines.
OptionalscriptInline script body executed when handler_type is "script". null for other handler types.
OptionalstatusLifecycle status of the routine. One of "draft", "active", or "paused". Only "active" routines respond to triggers.
OptionalstepsOrdered list of chain steps (present when handler_type is "chain"). Each step is a plain map with handler_type, optional body fields (preset_name / preset_config / script / config), and step-local plumbing (name, inputs, output_key, on_error).
Optionaltrigger_Execution context in which runs are created. One of "event" (background job) or "chat_session" (interactive session). Defaults to "event".
Optionalupdated_When this routine was last updated (ISO 8601).
An agent routine defines a reusable handler — script, preset, or chain — that runs in response to events or on a schedule.