Class that holds the parameters for an action to be run. This is passed to the Run method of an action.

Example

// Define a typed context
interface MyActionContext {
apiEndpoint: string;
apiKey: string;
environment: 'dev' | 'staging' | 'prod';
}

// Use with type safety
const params = new RunActionParams<MyActionContext>();
params.Action = myAction;
params.ContextUser = currentUser;
params.Context = {
apiEndpoint: 'https://api.example.com',
apiKey: process.env.API_KEY,
environment: 'prod'
};

Type Parameters

  • TContext = any

    Type of the context object passed to the action execution. This allows for type-safe context propagation from agents to actions. Defaults to any for backward compatibility.

Constructors

Properties

Action: ActionEntity

The action entity to be run.

Context?: TContext

Optional context object that provides runtime-specific information to the action. This context is separate from the action parameters and is not stored in the database.

Common use cases include:

  • Environment-specific configuration (API endpoints, service URLs)
  • Runtime credentials or authentication tokens
  • User preferences or session information
  • Feature flags or toggles
  • Request-specific correlation IDs

The context flows from agents to actions, maintaining consistency throughout the execution hierarchy. Actions can use this context to adapt their behavior based on runtime conditions without modifying their core parameter structure.

Note: Avoid including sensitive data like passwords unless absolutely necessary, as context may be passed through multiple execution layers.

ContextUser: UserInfo

The user context for the action.

Optional, a list of filters that should be run before the action is executed.

Params: ActionParam[]

Optional, the input and output parameters as defined in the metadata for the action.

SkipActionLog?: boolean

Optional, if true, an ActionExecutionLogEntity will not be created for this action run.