Credentials
Add connector credentials in Dashboard → Settings → Connectors: click Add Connector, select the provider, and fill in the fields shown. Credentials are encrypted (AES-256-GCM) at rest.- GitHub
- Slack
- Stripe
- HubSpot
- Salesforce
- Notion
- Gmail
- Google Drive
- Google Sheets
Fields: Personal Access TokenGet your token at: GitHub → Settings → Developer settings → Personal access tokens
Fields: Bot User OAuth TokenGet your token at: Slack API → Your Apps → OAuth & Permissions → Bot Token
Fields: Secret API KeyGet your key at: Stripe Dashboard → Developers → API keys → Secret key
Fields: Access TokenGet your token at: HubSpot → Settings → Integrations → Private Apps
Fields:
- Instance URL
- Access Token
https:// URL on a Salesforce domain, for example https://yourdomain.my.salesforce.com (sandboxes look like https://yourdomain--sandboxname.sandbox.my.salesforce.com). It must not include a port, path, or credentials.The Access Token must be an OAuth 2.0 access token or a session ID. A Salesforce security token is not an access token (it is only appended to a password when requesting a session ID), so it cannot be pasted here directly. See Salesforce REST API Developer Guide → Set Up Authorization.Fields: Integration TokenGet your token at: Notion → Settings → Connections → Develop or manage integrations
Fields:
- Client ID
- Client Secret
- Refresh Token
https://www.googleapis.com/auth/gmail.modifyFields:
- Client ID
- Client Secret
- Refresh Token
https://www.googleapis.com/auth/driveFields:
- Client ID
- Client Secret
- Refresh Token
https://www.googleapis.com/auth/spreadsheetsRegistry & Automatic Rollback Strategies
AgentRein supports 142 actions across 9 connectors. When rollback is triggered for a session, the backend executes inverse compensation in LIFO order.- GitHub
- Slack
- Stripe
- HubSpot
- Salesforce
- Notion
- Gmail
- Google Drive
- Google Sheets
| Action | Undo Strategy |
|---|---|
github.files.create | Delete the file |
github.files.update | Restore beforeState |
github.files.delete | Restore beforeState (recreates file content) |
github.issues.create | Close the issue |
github.issues.update | Restore beforeState |
github.issues.lock | Unlock the issue |
github.issueComments.create | Delete the comment |
github.pullRequests.update | Restore beforeState |
github.pullRequests.close | Reopen the pull request |
github.pullRequests.reopen | Close the pull request |
github.pullRequests.merge | No automatic rollback (requires human approval) |
github.pullRequestComments.update | Restore beforeState |
github.releases.create | Delete the release |
github.releases.update | Restore beforeState |
github.releases.delete | No automatic rollback (requires human approval) |
github.reviews.create | No automatic rollback (requires human approval) |
github.workflows.enable | Disable the workflow |
github.workflows.disable | Enable the workflow |
github.workflows.dispatch | No automatic rollback (requires human approval) |
github.users.invite | Cancel the pending invitation |
| Action | Undo Strategy |
|---|---|
slack.chat.postMessage | Updates message to Tombstone (⚠️ Reverted by AgentRein: [reason]) |
slack.chat.update | Restore beforeState |
slack.chat.delete | Re-posts original content from beforeState |
slack.channels.create | Archive channel |
slack.channels.rename | Restore beforeState |
slack.channels.setTopic | Restore beforeState |
slack.channels.setPurpose | Restore beforeState |
slack.channels.archive | Unarchive channel |
slack.channels.invite | Kick invited users |
slack.channels.kick | Re-invite user |
slack.channels.join | Leave channel |
slack.channels.leave | Re-join channel |
slack.channels.close | Open channel |
slack.channels.open | Close channel |
slack.files.upload | Delete uploaded file |
slack.files.delete | No automatic rollback (requires human approval) |
slack.reactions.add | Remove reaction |
slack.stars.add | Remove star |
slack.userProfile.update | Restore beforeState |
slack.userGroups.create | Disable user group |
slack.userGroups.update | Restore beforeState |
slack.userGroups.users.update | Restore beforeState |
slack.userGroups.enable | Disable user group |
slack.userGroups.disable | Enable user group |
| Action | Undo Strategy |
|---|---|
stripe.invoices.create | Delete draft invoice |
stripe.customers.create | Delete customer |
stripe.customers.delete | No automatic rollback (requires human approval) |
stripe.charges.create | No automatic rollback (requires human approval) |
stripe.refunds.create | No automatic rollback (requires human approval) |
stripe.coupons.create | Delete coupon |
stripe.coupons.delete | No automatic rollback (requires human approval) |
stripe.meterEvents.create | Cancel via adjustment (within 24h) |
stripe.paymentMethods.attach | Detach payment method |
stripe.paymentMethods.detach | No automatic rollback (requires human approval) |
| Action | Undo Strategy |
|---|---|
hubspot.contacts.create | Delete contact |
hubspot.contacts.update | Restore beforeState |
hubspot.contacts.delete | No automatic rollback (requires human approval) |
hubspot.companies.create | Archive company |
hubspot.companies.update | Restore beforeState |
hubspot.companies.delete | No automatic rollback (requires human approval) |
hubspot.deals.create | Delete deal |
hubspot.deals.update | Restore beforeState |
hubspot.deals.delete | No automatic rollback (requires human approval) |
hubspot.tickets.create | Archive ticket |
hubspot.tickets.update | Restore beforeState |
hubspot.tickets.delete | No automatic rollback (requires human approval) |
hubspot.engagements.create | Archive engagement |
hubspot.engagements.delete | No automatic rollback (requires human approval) |
hubspot.associations.create | Remove association |
hubspot.contactLists.addContact | Remove contact from list |
hubspot.contactLists.removeContact | Add contact back to list |
| Action | Undo Strategy |
|---|---|
salesforce.accounts.create | Delete record |
salesforce.accounts.update | Restore beforeState |
salesforce.accounts.delete | No automatic rollback (requires human approval) |
salesforce.contacts.create | Delete record |
salesforce.contacts.update | Restore beforeState |
salesforce.contacts.delete | No automatic rollback (requires human approval) |
salesforce.leads.create | Delete record |
salesforce.leads.update | Restore beforeState |
salesforce.leads.delete | No automatic rollback (requires human approval) |
salesforce.opportunities.create | Delete record |
salesforce.opportunities.update | Restore beforeState |
salesforce.opportunities.delete | No automatic rollback (requires human approval) |
salesforce.cases.create | Delete record |
salesforce.cases.update | Restore beforeState |
salesforce.cases.delete | No automatic rollback (requires human approval) |
salesforce.customObjects.create | Delete record |
salesforce.customObjects.update | Restore beforeState |
salesforce.customObjects.delete | No automatic rollback (requires human approval) |
salesforce.attachments.create | Delete attachment |
salesforce.attachments.update | Restore beforeState |
salesforce.attachments.delete | No automatic rollback (requires human approval) |
salesforce.tasks.create | Delete task |
salesforce.tasks.update | Restore beforeState |
salesforce.tasks.delete | No automatic rollback (requires human approval) |
salesforce.documents.create | Delete document |
salesforce.notes.create | Delete note |
salesforce.caseComments.create | Delete case comment |
salesforce.campaignMembers.create | Delete campaign membership |
| Action | Undo Strategy |
|---|---|
notion.pages.create | Move to trash |
notion.pages.update | Restore beforeState |
notion.pages.archive | Untrash page (notion.pages.restore) |
notion.pages.restore | Trash page (notion.pages.archive) |
notion.database_items.create | Move to trash |
notion.database_items.update | Restore beforeState |
notion.database_items.archive | Untrash database item (notion.database_items.restore) |
notion.database_items.restore | Trash database item (notion.database_items.archive) |
notion.blocks.append | Delete appended blocks |
| Action | Undo Strategy |
|---|---|
gmail.messages.send | Send correction reply in thread |
gmail.messages.reply | Send correction reply in thread |
gmail.messages.trash | Untrash message |
gmail.messages.untrash | Trash message |
gmail.messages.markAsRead | Restore UNREAD label |
gmail.messages.markAsUnread | Remove UNREAD label |
gmail.messages.delete | No automatic rollback (requires human approval) |
gmail.drafts.create | Delete draft |
gmail.drafts.delete | Recreate draft from snapshot |
gmail.threads.modify | Restore label IDs |
gmail.threads.trash | Untrash thread |
gmail.threads.untrash | Trash thread |
gmail.threads.delete | No automatic rollback (requires human approval) |
gmail.labels.create | Delete label |
gmail.labels.modify | Restore label IDs |
gmail.labels.delete | No automatic rollback (requires human approval) |
| Action | Undo Strategy |
|---|---|
gdrive.files.create | Move file to trash |
gdrive.files.update | Restore beforeState |
gdrive.files.move | Reverse move |
gdrive.files.copy | Move copy to trash |
gdrive.files.trash | Untrash file |
gdrive.files.share | Revoke granted permission |
gdrive.files.delete | No automatic rollback (requires human approval) |
gdrive.drives.create | Delete empty Shared Drive |
gdrive.drives.update | Restore beforeState |
gdrive.drives.delete | No automatic rollback (requires human approval) |
| Action | Undo Strategy |
|---|---|
gsheets.spreadsheets.create | Move spreadsheet to trash |
gsheets.sheets.add | Delete added sheet tab |
gsheets.values.append | No automatic rollback (requires human approval) |
gsheets.values.update | Restore beforeState |
gsheets.values.clear | No automatic rollback (requires human approval) |
gsheets.rows.insert | No automatic rollback (requires human approval) |
gsheets.rows.delete | No automatic rollback (requires human approval) |
gsheets.rows.appendOrUpdate | No automatic rollback (requires human approval) |
Validating Credentials Before Execution
CallvalidateConfig() during agent startup:
const result = await agentrein.validateConfig(['github', 'slack']);
if (!result.valid) {
console.error('Missing credentials:', result.missing);
process.exit(1);
}