@archastro/sdk
    Preparing search index...

    Interface AgentRoutine

    An agent routine defines a reusable handler — script, preset, or chain — that runs in response to events or on a schedule.

    interface AgentRoutine {
        acl?: Acl;
        agent?: string;
        app?: string;
        config?: string;
        created_at?: string;
        description?: string;
        event_config?: Record<string, unknown>;
        event_type?: string;
        handler_type?: string;
        id: string;
        last_applied_template_config?: string;
        lookup_key?: string;
        message_policy?: MessagePolicy;
        metadata?: Record<string, unknown>;
        name?: string;
        preset_config?: PresetConfig;
        preset_name?: string;
        schedule?: string;
        script?: string;
        status?: string;
        steps?: Record<string, unknown>[];
        trigger_context?: string;
        updated_at?: string;
        user?: string;
    }
    Index

    Properties

    acl?: Acl

    Access control list for the routine. Contains a grants array where each entry specifies principal_type, principal, and actions ("read", "invoke", or "assign" — an "assign" grant names the agents or orgs that may be handed this routine's embedded work items). null when no ACL restrictions are applied and the routine is accessible to all members of its scope.

    agent?: string

    ID of the agent that owns this routine (agi_...).

    app?: string

    Application that scopes this routine (dap_...).

    config?: string

    ID of the Config record that backs this routine's configuration (cfg_...). null when the routine is not config-backed.

    created_at?: string

    When this routine was created (ISO 8601).

    description?: string

    Optional description of what this routine does. null when not set.

    event_config?: Record<string, unknown>

    Additional configuration controlling how the event trigger is matched or filtered. Shape depends on event_type. null when not configured.

    event_type?: string

    Platform event type that triggers this routine, e.g. "agentroutine.invoked". null for schedule-only routines.

    handler_type?: string

    Execution strategy for this routine. One of "workflow_graph", "script", "preset", or "chain".

    id: string

    Routine ID (arn_...).

    last_applied_template_config?: string

    ID of the AgentRoutineTemplate Config this routine was last provisioned or updated from (cfg_...). null for hand-built routines.

    lookup_key?: string

    Unique human-readable key used to look up this routine without knowing its ID. null when not set.

    message_policy?: MessagePolicy

    Visibility and explicit recipient selection for messages emitted by this routine.

    metadata?: Record<string, unknown>

    Arbitrary key-value metadata attached to this routine. null when not set.

    name?: string

    Human-readable name for the routine.

    preset_config?: PresetConfig

    Resolved preset configuration when handler_type is "preset". null for other handler types.

    preset_name?: string

    Name of the preset invoked when handler_type is "preset". null for other handler types.

    schedule?: string

    Cron expression controlling when the routine fires on a schedule. null for event-only routines.

    script?: string

    Inline script body executed when handler_type is "script". null for other handler types.

    status?: string

    Lifecycle status of the routine. One of "draft", "active", or "paused". Only "active" routines respond to triggers.

    steps?: Record<string, unknown>[]

    Ordered 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).

    trigger_context?: string

    Execution context in which runs are created. One of "event" (background job) or "chat_session" (interactive session). Defaults to "event".

    updated_at?: string

    When this routine was last updated (ISO 8601).

    user?: string

    Optional co-owner user (usr_...). When set, that user shares view/modify/delete authority on this routine without administering the parent agent. null when not set. Never inferred from the caller — only present when explicitly provided on create/update.