@squidcloud/client
    Preparing search index...

    Interface AiAgentEventAutomation

    An automation that runs its agent when an event of a type is emitted with squid.events().emit. The agent is run with the event's own prompt, else with the automation's default one, and the event is appended to it as data.

    interface AiAgentEventAutomation {
        agentId: string;
        createdAt: Date;
        enabled: boolean;
        eventType: string;
        id: string;
        integrationIds?: string[];
        lastJobId?: string;
        lastRunAt?: Date;
        lastSkippedAt?: Date;
        lastSkipReason?: AiAgentAutomationSkipReason;
        maxRunsPerHour?: number;
        name: string;
        prompt?: string;
        skippedRuns?: number;
        type: "event";
        updatedAt: Date;
    }

    Hierarchy

    • AiAgentAutomationBase
      • AiAgentEventAutomation
    Index
    agentId: string

    The agent the automation runs.

    createdAt: Date

    When the automation was created.

    enabled: boolean

    Whether the automation runs.

    eventType: string

    The type of the events that start a run.

    id: string

    The automation ID, unique within the agent.

    integrationIds?: string[]

    Restricts the automation to the events of these integrations. Absent means events of any origin.

    lastJobId?: string

    The job of the last run, usable with the job API and as the jobId filter of the agent's audit log.

    lastRunAt?: Date

    When the automation last started a run.

    lastSkippedAt?: Date

    When the automation last skipped a run.

    Why the automation last skipped a run.

    maxRunsPerHour?: number

    The most runs the automation starts within an hour, up to 10,000; events past it are skipped. Guards against event loops and floods. Defaults to DEFAULT_AI_AGENT_AUTOMATION_MAX_RUNS_PER_HOUR.

    name: string

    A display name.

    prompt?: string

    The prompt for an event that carries none of its own. Without it, such an event starts no run.

    skippedRuns?: number

    Runs the automation was due to start and did not, since it was created.

    type: "event"

    The automation kind.

    updatedAt: Date

    When the automation was last changed.