@archastro/sdk
    Preparing search index...

    Class AgentAgentComputerResource

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Provision a computer for an agent Creates and provisions a new computer resource associated with the specified agent. The computer is allocated in the requested region (defaulting to iad) and its status transitions from provisioning to running once it is ready. Requires an app-scoped API key. The agent identified by agent must belong to the same app. Supplying a lookup_key lets you retrieve this computer later without storing its ID — the key must be unique within the app.

      Parameters

      • agent: string

        Agent ID (agt_...). When provided, only computers belonging to this agent are returned.

      • input: {
            config?: Record<string, unknown>;
            lookup_key?: string;
            metadata?: Record<string, unknown>;
            name: string;
            provider?: string;
            region?: string;
        }

        Request body.

        • Optionalconfig?: Record<string, unknown>

          Provider-specific configuration for the computer. Supported keys vary by provider. A top-level provider takes precedence over config.provider.

        • Optionallookup_key?: string

          Stable, user-defined key for this computer. Must be unique within the app. Use it to look up the computer without storing its ID.

        • Optionalmetadata?: Record<string, unknown>

          Arbitrary key-value metadata to attach to the computer. Not interpreted by the platform; returned as-is on all subsequent reads.

        • name: string

          Human-readable display name for the computer.

        • Optionalprovider?: string

          Compute backend for the computer: "sprites" (Fly Sprites, the default) or "vercel" (Vercel Sandbox). Folded into config.provider.

        • Optionalregion?: string

          Region in which to provision the computer, e.g. "iad". Defaults to "iad" when omitted.

      Returns Promise<AgentComputer>

      The newly provisioned computer.

    • List computers Returns all computers belonging to the authenticated app, ordered by creation time descending. Pass agent to scope the results to a single agent's computers. When agent is omitted, computers for all agents in the app are returned. Requires an app-scoped API key. If the specified agent does not exist or does not belong to the app, the endpoint returns 404.

      Parameters

      • agent: string

        Agent ID (agt_...). When provided, only computers belonging to this agent are returned.

      Returns Promise<AgentComputerListResponse>

      Object containing a data array of computer records.