Skip to main content

Credentials

Add connector credentials in Dashboard → Integrations. Each credential has a Key (the token name below) and a Value (Plain Text or JSON).
Key: GITHUB_TOKEN Type: Plain TextGet your token at: GitHub → Settings → Developer settings → Personal access tokens
The tab order here matches the dashboard. You can add any key-value pair not listed above — AgentRein stores it encrypted and passes it to your connector at runtime.

How Rollback Works

When you use wrap(), AgentRein intercepts every method call and logs it to the backend with the action name (e.g. stripe.invoices.create) and the method response. The backend maintains a Rollback Registry — a map of action names to compensation strategies.When rollback is triggered for a session, the backend looks up each action in the registry and executes the appropriate undo strategy in LIFO order.

Registry

The following action names have automatic rollback strategies registered in the backend:
ActionUndo Strategy
github.issues.createClose the issue
github.issues.updateRestore beforeState

Validating Credentials Before Execution

Before running your agent, you can verify that all required connector credentials are configured in the dashboard using validateConfig():
const result = await agentrein.validateConfig(['github', 'slack']);

if (!result.valid) {
  console.error('Missing credentials:', result.missing);
  // result.suggestions → ['Configure GitHub credentials at Dashboard → Settings → Connectors']
  process.exit(1);
}

Return Value

FieldTypeDescription
validbooleantrue only if ALL requested connectors have credentials configured
configuredstring[]Connectors that have credentials stored
missingstring[]Connectors that do not have credentials stored
suggestionsstring[]Human-readable setup instructions for each missing connector
Rollback will fail with ROLLBACK_FAILED if connector credentials are not configured before executing actions. Always call validateConfig() during your agent’s startup to catch this early.

Unsupported Services

For services not in the registry, wrap() will still log all actions and trigger session rollback on failure — but the compensation step will be marked ROLLBACK_FAILED since no undo strategy exists yet.To request support for a new connector, open an issue at github.com/AgentReinAi.