@archastro/sdk
    Preparing search index...
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Retrieve a schedule Returns a single schedule belonging to the specified agent. Use this endpoint to fetch the current state, next run time, and configuration of an individual schedule. Requires an app-scoped API key. Both the agent and the schedule must belong to the app identified by the key. Returns 404 if the schedule does not exist or belongs to a different agent.

      Parameters

      • agent: string

        Agent ID (agi_...). The agent whose schedules you want to retrieve.

      • schedule: string

        Schedule ID (asc_...). The schedule to retrieve.

      Returns Promise<AgentSchedule>

      The requested agent schedule.

    • List schedules for an agent Returns all schedules belonging to the specified agent in any status. Use the status parameter to narrow results to a single lifecycle state. Requires an app-scoped API key. The agent must belong to the app identified by the key.

      Parameters

      • agent: string

        Agent ID (agi_...). The agent whose schedules you want to retrieve.

      • Optionalparams: { status?: string }

        Query parameters.

        • Optionalstatus?: string

          Filter results by schedule status. One of "active", "paused", "completed", "cancelled", or "expired". Omit to return schedules in all statuses.

      Returns Promise<
          {
              data?: {
                  agent?: string;
                  app?: string;
                  created_at?: string;
                  cron_expression?: string;
                  id: string;
                  instructions?: string;
                  last_run_at?: string;
                  max_runs?: number;
                  metadata?: Record<string, unknown>;
                  next_run_at?: string;
                  run_count?: number;
                  schedule_type?: string;
                  scheduled_at?: string;
                  status?: string;
                  thread?: string;
                  timezone?: string;
                  updated_at?: string;
              }[];
          },
      >

      Successful response