@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;
        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;
    }
    Index

    Properties

    acl?: Acl

    Access 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.

    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.

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