@archastro/sdk
    Preparing search index...

    Class AgentAgentEnvVarResource

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Create an agent environment variable Creates a new environment variable for the specified agent. The variable is stored securely and the plaintext value is never returned after creation; subsequent reads return a masked representation showing only the last four characters. The authenticated user must have access to the agent's parent app. Pass the app scope via the app parameter when calling with an API key that is scoped to a specific app. Each key must be unique within the agent; attempting to create a duplicate key returns a validation error.

      Parameters

      • agent: string

        Agent ID (agt_...). Returns environment variables belonging to this agent.

      • input: { description?: string; key: string; value: string }

        Request body.

        • Optionaldescription?: string

          Optional human-readable note describing what the variable is used for.

        • key: string

          Environment variable name, e.g. WEBHOOK_SECRET. Must be unique within the agent.

        • value: string

          Plaintext secret value to store. The value is encrypted at rest and never returned in full.

      Returns Promise<AgentEnvVarMasked>

      The newly created environment variable with its value masked.

    • List an agent's environment variables Returns all environment variables defined for the specified agent. Variable values are always masked in the response; only the last four characters are visible. To inspect a specific variable, use the retrieve endpoint. The authenticated user must have access to the agent's parent app. Pass the app scope via the app parameter when calling with an API key that is scoped to a specific app. Results are returned in an unordered flat list.

      Parameters

      • agent: string

        Agent ID (agt_...). Returns environment variables belonging to this agent.

      Returns Promise<AgentEnvVarMaskedList>

      List of environment variables for the agent, with values masked.