Skip to main content

Settings

The Settings screen allows you to manage organization-specific configuration including Variables (secure key-value pairs), Models (AI/LLM configurations), System Models (platform-wide AI models), and Users (team member management with role-based access control).

Settings Screen

Billing & Subscription

Billing and subscription management has moved to the Dashboard for better visibility. Navigate to the Dashboard to view and manage your subscription plan.


Variables

Variables are secure, environment-scoped key-value pairs that are injected into workflow execution contexts. Use variables for API keys, configuration values, and other sensitive data.

Security Model

Variables follow a write-only security model:

  • Values are never exposed through the API or UI after creation
  • Only the variable name is visible when editing
  • Values are encrypted at rest in the database
  • Values are decrypted and injected into the V8 isolate at runtime
tip

This design ensures that sensitive credentials like API keys cannot be retrieved by users with read-only access or through API inspection.

Creating a Variable

  1. Select an Environment from the dropdown (required for new variables)
  2. Click the Add button
  3. Enter the variable details:
    • Name (required): The variable identifier (e.g., MASTODON_ACCESS_TOKEN)
    • Value (required for new): The secret value to store

Example:

Name: OPENAI_API_KEY
Value: sk-proj-xxxxxxxxxxxxx

Using Variables in Scripts

Variables are automatically injected into the V8 execution context. You can access them in three ways:

1. Direct Variable Access:

// Variables are injected as top-level vars
const apiKey = OPENAI_API_KEY;
const serverUrl = MASTODON_SERVER_URL;

2. Variables Object:

// Access all variables as an array
for (const variable of __variables__) {
print(`${variable.name}: defined`);
}

3. Variables by Name Map:

// Access variables by name from a lookup object
const token = __variablesByName__['API_TOKEN'];

Variable Table Columns

ColumnDescription
NameVariable identifier
EnvironmentWhich environment this variable belongs to
CreatedWhen the variable was created
ModifiedWhen the variable was last updated

Editing a Variable

  1. Click the Edit icon (pencil) in the row actions
  2. Update the Name if needed
  3. Optionally enter a new Value (leave blank to keep existing)
  4. Click Save
note

When editing, the current value is not displayed. Enter a new value only if you want to change it.

Deleting a Variable

  1. Click the Delete icon (trash) in the row actions
  2. Confirm the deletion
warning

Deleting a variable may break workflows that depend on it. Ensure no active workflows reference the variable before deletion.

Best Practices

Naming Conventions:

  • Use SCREAMING_SNAKE_CASE for consistency
  • Prefix with service name: MASTODON_ACCESS_TOKEN, OPENAI_API_KEY
  • Avoid generic names like TOKEN or KEY

Environment Separation:

Development Environment:
- MASTODON_SERVER_URL: https://mastodon.social (test server)
- DEBUG_MODE: true

Production Environment:
- MASTODON_SERVER_URL: https://your-instance.com
- DEBUG_MODE: false

Universal Model System

The platform uses a universal model system that supports multiple AI providers through a structured hierarchy of providers, definitions, credentials, and configurations.

Model Hierarchy

Model Provider (e.g., OpenAI, Anthropic, Google, AWS Bedrock, xAI)
└── Model Definition (e.g., GPT-4o, Claude 3.5 Sonnet, Gemini Pro)
└── Model Credential (API key or IAM role for the provider)
└── Model Configuration (ready-to-use config with defaults)

Model Providers

Providers are the AI platforms supported by the system. These are seeded reference data and include:

ProviderAPI FormatAuth Type
OpenAIopenaiAPI Key
AnthropicanthropicAPI Key
AWS BedrockbedrockIAM Role
Google (Gemini)googleAPI Key / Service Account
xAI (Grok)openaiAPI Key

Model Definitions

Definitions are specific models within a provider (e.g., GPT-4o, Claude 3.5 Sonnet). They include:

FieldDescription
Display NameHuman-readable name
Model IDProvider-specific identifier (e.g., gpt-4o)
Categorychat, embedding, image, etc.
Tierstandard, premium, economy
Context WindowMaximum token capacity
PricingInput/output cost per million tokens
CapabilitiesVision, function calling, streaming, etc.

Model Credentials

Credentials store authentication details for a provider. They can be scoped to:

  • System: Available to all organizations (managed by platform admins)
  • Organization: Private to a single organization
FieldDescription
NameDisplay name (e.g., "Production OpenAI Key")
ProviderWhich provider this authenticates with
Scopesystem or organization
API KeyBearer token (write-only, never exposed after creation)
Rate LimitsOptional requests/tokens per minute/day caps
Security

Credential values (API keys, service account JSON) are write-only — they are never returned in API responses. Only boolean flags like hasApiKey are returned.

Model Configurations

Configurations combine a model definition with a credential and optional defaults to create a ready-to-use model:

FieldDescription
NameConfiguration display name
Model DefinitionWhich specific model to use
CredentialWhich credential to authenticate with
Default TemperatureDefault sampling temperature
Default Max TokensDefault maximum response tokens
VisibilityWhether this config appears in model selectors
PriorityOrdering preference when multiple configs exist

Creating a Model Configuration

  1. Navigate to SettingsModels tab
  2. Select or create a Credential for your provider
  3. Click Add Configuration
  4. Select a Model Definition and Credential
  5. Set default parameters (temperature, max tokens)
  6. Save

Using Models in Workflows

Model configurations are selected in Prompt workflow entities:

  1. Create a Prompt entity
  2. Select the model configuration from the dropdown
  3. Configure the prompt template
  4. The credential is automatically used during execution

Validating Credentials

You can validate that a credential works before using it:

  1. Navigate to the credential
  2. Click Validate
  3. The system makes a minimal test call to the provider
  4. Results show success or the specific error

Legacy Models

The system also supports legacy models for backward compatibility. Legacy models store the URL and credentials directly on the model record rather than using the provider/definition/credential hierarchy.

See the Model Entity documentation for details on both legacy and universal models.

API Reference

For complete API documentation:


Users

The Users section allows you to manage team members within your organization with Role-Based Access Control (RBAC). User management is powered by Auth0 Organizations, providing enterprise-grade identity management.

Viewing Organization Members

The Users grid displays all current members of the selected organization:

ColumnDescription
AvatarUser's profile picture (or initial)
NameUser's display name from their identity provider
EmailUser's email address
RoleUser's assigned role within this organization
JoinedWhen the user was added to the organization

Inviting New Users

To invite a new team member to your organization:

  1. Click the Invite button in the toolbar
  2. Enter the user's email address
  3. Select a Role for the new member (Admin, User, or Guest)
  4. Click Send Invitation

What happens next:

  1. An invitation email is sent to the specified address
  2. The invitee clicks the link to accept the invitation
  3. If they don't have an account, they'll create one during signup
  4. Once accepted, they appear in the Users grid with their assigned role
  5. They can immediately access the organization's resources based on their permissions
tip

Invitations expire after 7 days. You can resend or revoke invitations from the pending invitations list.


Role-Based Access Control (RBAC)

The platform implements a comprehensive permission system that controls access to resources based on user roles within each organization.

Available Roles

RoleDescriptionUse Case
SystemFull platform access (platform owners only)Platform administrators
AdminFull access to organization resourcesOrganization managers
UserCan create/edit workflows, read-only access to entitiesDevelopers and analysts
GuestRead-only access to all resourcesStakeholders and reviewers

Permission Matrix

Workflow Permissions

PermissionSystemAdminUserGuest
workflows:read
workflows:create
workflows:update
workflows:delete

Entity Permissions

PermissionSystemAdminUserGuest
entities:read
entities:create
entities:update
entities:delete

Environment Permissions

PermissionSystemAdminUserGuest
environments:read
environments:create
environments:update
environments:delete

Variable Permissions

PermissionSystemAdminUserGuest
variables:read
variables:create
variables:update
variables:delete

Member Management Permissions

PermissionSystemAdminUserGuest
members:read
members:invite
members:remove
members:editRole

Special Permissions

PermissionSystemAdminUserGuestDescription
organizations:*Organization CRUD (system only)
admin:accessAdmin screens access
sentiment:accessSentiment analysis access

How RBAC Works

  1. Authentication: User logs in via Auth0
  2. Organization Context: User selects an organization
  3. Role Lookup: System queries UserOrganizationRole for the user's role in that organization
  4. Permission Evaluation: PermissionEvaluator checks permissions for each API request
  5. Access Control: API routes return 403 Forbidden if permission is denied

API Permission Checking

Every API route checks permissions using the getAuthContext function:

// In API route
const auth = await getAuthContext(req, organizationId);

if (!auth.permissions.can('entities:create')) {
return NextResponse.json(
{ error: 'Forbidden: You do not have permission to create entities' },
{ status: 403 }
);
}

Database Schema

RBAC is implemented with these database models:

model User {
id String @id @default(uuid())
auth0UserId String @unique
email String @unique
name String?
picture String?

organizationRoles UserOrganizationRole[]
}

model Role {
id String @id @default(uuid())
name String @unique // 'admin', 'user', 'guest'
description String?

userRoles UserOrganizationRole[]
}

model UserOrganizationRole {
id String @id @default(uuid())
userId String
organizationId String
roleId String

@@unique([userId, organizationId])
}

Changing User Roles

To change a user's role within your organization:

  1. Navigate to SettingsUsers
  2. Find the user in the grid
  3. Click the Edit Role button (pencil icon)
  4. Select the new role from the dropdown
  5. Click Save
note

Only users with members:editRole permission (Admin or System) can change roles.

Removing Users

To remove a user from your organization:

  1. Navigate to SettingsUsers
  2. Find the user in the grid
  3. Click the Remove button (trash icon)
  4. Confirm the removal
warning

Removing a user immediately revokes their access to the organization. They can be re-invited later if needed.

Auth0 Integration

The Users feature integrates with Auth0 Organizations to provide:

  • Single Sign-On (SSO) — Users can authenticate with their identity provider
  • Multi-Factor Authentication (MFA) — Enhanced security for user accounts
  • Social Logins — Support for Google, GitHub, and other providers
  • Enterprise Connections — SAML, OIDC, and Active Directory integration

Environment Variables Required:

# Auth0 application credentials
AUTH0_SECRET=your-auth0-secret
AUTH0_BASE_URL=https://your-app.com
AUTH0_ISSUER_BASE_URL=https://your-tenant.auth0.com
AUTH0_CLIENT_ID=your-client-id
AUTH0_CLIENT_SECRET=your-client-secret

# Auth0 Machine-to-Machine credentials (for Management API)
AUTH0_DOMAIN=your-tenant.auth0.com
AUTH0_M2M_CLIENT_ID=your-m2m-client-id
AUTH0_M2M_CLIENT_SECRET=your-m2m-client-secret

API Reference

For complete API documentation with JavaScript, cURL, and MCP examples, see the dedicated API reference pages:

Variables API

OperationMethodEndpoint
ListGET/api/variables?organizationId={id}&environmentId={id}
CreatePOST/api/variables
Get by IDGET/api/variables/{id}
UpdatePUT/api/variables/{id}
DeleteDELETE/api/variables/{id}

Complete Variables API Reference →

Models API

OperationMethodEndpoint
ListGET/api/models?organizationId={id}
CreatePOST/api/models
Get by IDGET/api/models/{id}
UpdatePUT/api/models/{id}
DeleteDELETE/api/models/{id}

Complete Models API Reference →

Users & Members API

OperationMethodEndpointPermission
List MembersGET/api/organizations/{id}/membersmembers:read
Get MemberGET/api/organizations/{id}/members/{userId}members:read
Update RolePUT/api/organizations/{id}/members/{userId}members:editRole
Remove MemberDELETE/api/organizations/{id}/members/{userId}members:remove

Invitations API

OperationMethodEndpointPermission
List InvitationsGET/api/organizations/{id}/invitationsmembers:read
Send InvitationPOST/api/organizations/{id}/invitationsmembers:invite
Revoke InvitationDELETE/api/invitations/{id}members:invite
Accept InvitationPOST/api/invitations/{token}/accept(Invitee only)

Roles API

OperationMethodEndpointPermission
List RolesGET/api/rolesAny authenticated