diff --git a/docs/cli/configuration/settings.mdx b/docs/cli/configuration/settings.mdx
index d59da477..f3d800c4 100644
--- a/docs/cli/configuration/settings.mdx
+++ b/docs/cli/configuration/settings.mdx
@@ -286,7 +286,8 @@ System-level settings for status line, worktrees, and request timeouts.
| `networkPolicy` | object | `{ "allowedIps": string[] }` | unset | **Enterprise.** Restrict outbound network access from droid sessions to the specified IPs or CIDR ranges in `allowedIps`. |
| `sandbox` | object | `{ "enabled"?: boolean, "mode"?: string, "filesystem"?: object, "network"?: object }` | unset | **Beta.** Sandbox configuration controlling filesystem and network isolation for tool execution. See [Sandbox](/cli/configuration/sandbox). |
| `restrictMemberVisibility` | boolean | `true`, `false` | `false` | **Org-level.** Hide other org members from non-admin users. |
-| `restrictApiKeyCreationToManagers` | boolean | `true`, `false` | `false` | **Org-level.** Only org managers may create API keys. |
+| `restrictApiKeyCreationToManagers` | boolean | `true`, `false` | `false` | **Org-level.** Only org Managers and Owners may create Factory API keys from the API Keys settings page. |
+| `apiKeyMaxLifetimeDays` | number | `1`–`365` | unset | **Org-level.** Maximum lifetime, in days, of new and rotated Factory API keys. See [API key lifetime limit](/enterprise/hierarchical-settings-and-org-control#api-key-lifetime-limit). |
| `sessionRetentionDays` | number | `14`–`365` | Org default | **Org-level.** How long synced session history is retained before deletion. |
| `wikiCloudSync` | boolean | `true`, `false` | `true` | **Org-level.** Sync generated [Wiki](/cli/features/wiki/overview) content to Factory cloud. |
| `managedComputersEnabled` | boolean | `true`, `false` | `false` | **Enterprise.** Enable Factory-managed remote computers for the org. |
diff --git a/docs/cli/features/incident-response.mdx b/docs/cli/features/incident-response.mdx
index 2f82f6c4..ec0a2602 100644
--- a/docs/cli/features/incident-response.mdx
+++ b/docs/cli/features/incident-response.mdx
@@ -60,7 +60,7 @@ Incident Response is set up as an [automation](/web/automations) in the Factory
- - **Run as** sets the identity and billing the automation runs under. A [service account](/enterprise/service-accounts) is recommended for incident response so the computer and session interactivity are shared across the team.
+ - **Run as** sets the identity and billing the automation runs under. A [service account](/enterprise/service-accounts) is recommended for incident response so the computer and session interactivity are shared across the team. Only service accounts you have [access](/enterprise/service-accounts#access) to appear in the picker.
- **Run on** sets the computer where Droid investigates. Pick the computer with the right repositories, observability tools, and anything else you want to add that can help the agent. Learn more about Droid Computers [here](/cli/features/droid-computers).
diff --git a/docs/docs.json b/docs/docs.json
index abe1f1a5..6ea862b1 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -169,6 +169,7 @@
"enterprise/organization-roles",
"enterprise/identity-sso-and-scim",
"enterprise/service-accounts",
+ "enterprise/agent-profiles",
"enterprise/hierarchical-settings-and-org-control"
]
},
diff --git a/docs/enterprise/agent-profiles.mdx b/docs/enterprise/agent-profiles.mdx
new file mode 100644
index 00000000..e5ff979c
--- /dev/null
+++ b/docs/enterprise/agent-profiles.mdx
@@ -0,0 +1,210 @@
+---
+title: Agent Profiles
+description: An agent profile decides how Droid works. Its service account decides who Droid is while it works.
+---
+
+An agent profile decides **how** Droid works: the default model and reasoning level, custom instructions, plugins, the machine type and environment it runs on, and who the profile serves.
+
+A [service account](/enterprise/service-accounts) decides **who** Droid is while it works: the Git credentials, connectors, secrets, computers, and API keys it uses, and the name its work appears under in usage and the [audit log](/enterprise/audit-log).
+
+Every agent profile has its own service account. Work that runs on a profile runs as that profile's service account, so choosing a profile chooses both how Droid works and who it is. You manage both from the profile editor.
+
+
+ Agent profiles are available on Factory-hosted deployments. Delegation apps require a paid plan, and creating a custom profile requires a paid plan. [Contact us](mailto:sales@factory.ai) to learn more.
+
+
+---
+
+## Plan your profiles
+
+Because each profile carries its own identity, a profile sets both how work is done and what that work can access. Some ways to set them up:
+
+- **One profile per team.** For example, a backend profile whose Git credentials and connectors cover the backend team's repositories and tools, with access limited to that team's directory group.
+- **One profile per kind of work.** For example, a review profile with a stronger model and review instructions, separate from a profile for routine fixes.
+- **Org Default for everyone else.** Keep Org Default as the general setup, and add custom profiles only where a team needs a different model, environment, or credentials.
+
+Give each profile only the credentials its work needs. Anyone who can use a profile works with its service account's access, including its connectors.
+
+---
+
+## Where agent profiles are used
+
+### Delegation apps
+
+When someone delegates work from Slack, Microsoft Teams, Google Chat, Linear, or Jira, Factory picks a profile from the app's [assignments](#assign-profiles-to-delegation-apps): the first assigned profile the requester has access to, or Org Default if none applies. The work runs as that profile's service account.
+
+People outside a profile's access are skipped without being told, and the next assigned profile or Org Default serves them. Direct messages to Droid in Slack, Microsoft Teams, and Google Chat run as the person who sent them, not as the profile's service account.
+
+---
+
+## Where to find agent profiles
+
+Agent profiles are on the **Identity** settings page, under **Settings** → **Identity** → **Agent Profiles**. The same page holds your **API Keys** and **Service Accounts**. Older links to the API keys and agent profiles settings pages open the Identity page.
+
+| Who | What they see in Agent Profiles |
+| ----------------------------------------- | -------------------------------------------------------------------- |
+| Managers and Owners on a paid plan | Every profile, including **Org Default**. |
+| Users who own a custom profile | Only the custom profiles they own. |
+| Other Users | No Agent Profiles section. |
+
+See [Organization Roles](/enterprise/organization-roles) for the difference between Users, Managers, and Owners.
+
+---
+
+## Org Default
+
+**Org Default** is the built-in profile. It serves every delegation request that no custom profile serves, and it is always available to everyone in the organization.
+
+- It cannot be renamed or deleted, and it has no owners.
+- Only Managers and Owners can edit it.
+- Its access is always **Everyone**.
+- Its service account appears in the Service Accounts list as **Org Default Agent Profile**.
+- Until it is saved for the first time, its row shows **Set Up for Org**.
+
+### Set up Org Default before connecting a delegation app
+
+Delegation apps run as the Org Default profile, so a Manager must set it up before connecting one. While Org Default has never been saved, clicking **Connect** for a delegation app opens a **Set up Org Default Agent Profile** dialog instead of starting the connection. Click **Set Up Org Default Agent Profile** to open the Org Default editor on the Identity page, choose its settings, and save. Then return to **Settings** → **Delegations** and connect the app.
+
+Reconnecting an app that is already connected is not blocked.
+
+---
+
+## Create a custom profile
+
+Custom profiles let you give different teams a different setup, such as a different model, environment, or set of credentials. Managers and Owners on a paid plan can create them from **Settings** → **Identity** → **Agent Profiles**. An organization can have up to 500 custom profiles.
+
+When you create a profile in Settings, you become one of its [owners](#owners). You can remove yourself afterwards.
+
+The profile editor has these tabs:
+
+| Tab | What it configures |
+| ------------------- | ----------------------------------------------------------------------------------------------------------------------- |
+| **General** | Name, default model, default reasoning level, custom instructions, access, owners, and lock. |
+| **Plugins** | Plugins installed for every session that runs on the profile, in addition to plugins enabled org-wide. |
+| **Computers** | The machine type and the environment or computers the profile runs on. |
+| **API Keys** | API keys for the profile's service account. |
+| **Git Credentials** | Git credentials for the profile's service account. |
+| **Secrets** | Environment variables for the profile's managed computers. See [Computer secrets](/enterprise/service-accounts#computer-secrets). |
+| **Connectors** | Connectors that sessions on the profile can use. |
+
+Save the profile once before you add computers, API keys, Git credentials, secrets, or connectors. After the first save, the editor shows the profile's **Service Account ID**.
+
+### Profile settings
+
+| Setting | Details |
+| --------------------------------- | --------------------------------------------------------------------------------------------------------- |
+| Name | 1 to 100 characters. The profile's service account is named "*profile name* Agent Profile" and follows renames. |
+| Default model | The model that sessions on the profile start with. |
+| Default reasoning level | The reasoning level that sessions on the profile start with. |
+| Custom Instructions (optional) | Up to 10,000 characters of instructions for sessions that run on the profile. |
+| Plugins | Up to 20 plugins, written as `plugin-name@marketplace`. The marketplace must be registered under **Enterprise Controls** → **Plugins**. |
+| Machine type | **Dynamic (recommended)** runs on an environment you choose. **Persistent** runs on the profile's computers, with a per machine parallel worker limit from 1 to 50 (default 3). |
+| Environment | A profile runs on one environment. |
+| Access | **Everyone**, or **Specific people and groups**: up to 200 people and 50 directory groups. See [Access](#access). |
+
+Connectors on a profile are shared: anyone who can use the profile can use the connection with the permissions you grant.
+
+---
+
+## Access
+
+Access controls who a profile serves. Choose **Everyone**, or choose specific people and directory groups synced from your identity provider. See [Directory Sync (SCIM)](/enterprise/identity-sso-and-scim#directory-sync-scim-provisioning) for how groups reach Factory.
+
+When a delegation app picks a profile for a request, Managers and owners get no exception: they are served by a profile only if its access includes them.
+
+---
+
+## Owners
+
+Owners are people who manage a specific profile without needing the Manager role. Owners must be active members of the organization. Directory groups cannot be owners. A profile can have up to 50 owners.
+
+Owners of a profile can:
+
+- Edit everything on the profile, including its access, model, and plugins.
+- Manage the profile's service account: its API keys, Git credentials, secrets, connectors, and computers.
+- Change the profile's owners.
+- Lock or unlock the profile.
+- Delete the profile.
+
+Owners who are not Managers cannot create profiles, duplicate profiles, assign profiles to delegation apps, or edit Org Default. Managers can also change a profile's owners while it is unlocked.
+
+---
+
+## Lock
+
+Lock a profile to stop other Managers from changing it. While a profile is locked, only its owners and organization Owners can change it, change who may use it, manage its service account, or delete it. Other Managers see it as read-only.
+
+Only the profile's owners and organization Owners can lock or unlock it. You can lock a profile that has no owners after confirming; until someone adds an owner, only organization Owners can change it.
+
+Org Default can also be locked. Only organization Owners can lock or unlock it.
+
+---
+
+## Assign profiles to delegation apps
+
+By default, every delegation runs on Org Default. To route some people to a custom profile, assign profiles to the app:
+
+
+
+ Go to **Settings** → **Delegations** and open the delegation app, such as Slack or Linear.
+
+
+ Open the **...** menu and choose **Assign agent profiles**. Only Managers and Owners can do this.
+
+
+ Check the custom profiles the app should use and move them into order. You can check up to 50 profiles per app. Org Default is always checked and always last.
+
+
+ Click **Save**.
+
+
+
+---
+
+## Duplicate a profile
+
+Managers and Owners can duplicate any saved profile, including Org Default, by choosing **Duplicate** on its row in the Agent Profiles list. The dialog suggests the name "*profile name* (copy)". After the copy is created, its editor opens.
+
+The copy gets its own new service account. Duplicating copies:
+
+- Custom instructions, default model, and default reasoning level
+- Machine type, parallel worker limit, and environment
+- Plugins
+- Access
+- Owners, plus you as an owner. People who are no longer in the organization are left out, and Factory tells you how many.
+
+Duplicating does not copy:
+
+- The lock. The copy starts unlocked.
+- App assignments.
+- API keys, computers, Git credentials, secrets, or connectors. Set these up again on the copy.
+
+Duplicating is refused when the source profile already has 50 owners and you are not one of them, or when a profile limited to specific people no longer includes anyone in the organization.
+
+---
+
+## Delete a profile
+
+Managers and the profile's owners can delete a custom profile. If the profile is locked, only its owners and organization Owners can delete it. Org Default cannot be deleted.
+
+Deleting a profile also deletes its service account, which revokes the account's API keys and removes its computers, Git credentials, and connectors. This cannot be undone.
+
+---
+
+## Things to know
+
+- Only custom profiles can be assigned to delegation apps. Org Default always serves whoever is left.
+- The service accounts that belong to custom profiles do not appear in the Service Accounts list or in **Run as** pickers. Manage them from the profile editor. Org Default's service account stays in the list.
+- In usage and the [audit log](/enterprise/audit-log), a custom profile's service account is shown by the profile's name.
+- Profiles, owners, lock, and access can also be managed through the Factory API. See the **API Reference** tab.
+
+## Learn more
+
+
+
+ Service accounts, owners, lock, access, and computer secrets.
+
+
+ What Users, Managers, and Owners can do.
+
+
diff --git a/docs/enterprise/audit-log.mdx b/docs/enterprise/audit-log.mdx
index bc882c8e..913eefda 100644
--- a/docs/enterprise/audit-log.mdx
+++ b/docs/enterprise/audit-log.mdx
@@ -6,7 +6,7 @@ description: Organization-level audit events that record who did what in your Fa
The Factory audit log records organization-level events so you can track who did what in your organization. Each event captures **who** acted, **where** the action originated, **what** was affected, and structured details about the change.
- **Enterprise Feature** — The audit log is available to **Enterprise organization owners only**. Owners can view the audit log in the Factory web app under Team Settings, or via the public API.
+ **Enterprise Feature** — The audit log is available to **Enterprise organization owners only** on Factory-hosted deployments. Owners can view the audit log in the Factory web app under **Settings** → **Audit Log**, or via the public API.
---
@@ -21,7 +21,7 @@ Every audit event shares the following fields:
| `actor` | object or null | The user or service principal who initiated the event. `null` when the event was system-initiated (no human or service principal involved). |
| `source` | string | The surface that originated the event (see below). |
| `target` | object | Identifiers for the affected entity (e.g. `userId`, `email`, `serviceAccountId`). |
-| `payload` | object or null | Structured, event-specific details. Contains only IDs and enum values, never secrets. `null` when the event has no structured payload. |
+| `payload` | object or null | Structured, event-specific details, such as IDs, enum values, and resource names. Never contains secrets. `null` when the event has no structured payload. |
| `createdAt` | string | ISO 8601 timestamp of the event. |
### Actor
@@ -51,6 +51,8 @@ The `source` field identifies where the event originated.
| `public_api_v0` | Public REST API (v0). |
| `workos_event` | Directory sync or identity provider webhook event. |
+Events from other Factory surfaces can carry additional `source` values.
+
---
## Event Types
@@ -153,24 +155,25 @@ A member's role, invitation status, or membership in the organization changed.
### `api_key_lifecycle_change`
-A Factory API key was created or deleted.
+A Factory API key was created, rotated, or deleted.
-**Sources:** `web_settings_api_keys`, `web_settings_service_accounts`
+**Sources:** `web_settings_api_keys`, `web_settings_service_accounts`, `public_api_v0`
**Target:**
| Field | Type | Description |
|-------|------|-------------|
-| `userId` | string | The key owner's user ID. |
-| `email` | string or null | The key owner's email. |
+| `userId` | string | The key owner's user ID. Present for user keys. |
+| `serviceAccountId` | string | The service account ID. Present for service account keys. |
**Payload:**
| Field | Type | Description |
|-------|------|-------------|
-| `intent` | string | `"created"` or `"deleted"`. |
-| `apiKeyId` | string | The API key ID. |
+| `intent` | string | `"created"`, `"rotated"`, or `"deleted"`. |
+| `apiKeyId` | string | The API key ID. For `rotated`, the ID of the replacement key. |
| `serviceAccountId` | string or null | Present only for service-account keys. Its presence distinguishes user keys from service-account keys. |
+| `rotatedFromApiKeyId` | string | The ID of the key that was replaced. Present for `rotated` only. |
**Example:**
@@ -184,7 +187,7 @@ A Factory API key was created or deleted.
"email": "dev@corp.com",
"role": "user"
},
- "target": { "userId": "user_abc", "email": "dev@corp.com" },
+ "target": { "userId": "user_abc" },
"payload": { "intent": "created", "apiKeyId": "key_xyz" }
}
```
@@ -193,9 +196,9 @@ A Factory API key was created or deleted.
### `service_account_change`
-A service account was created, modified, deleted, or had its git credentials or act-as grants changed.
+A service account was created, modified, deleted, or had its owners, lock, access, git credentials, connectors, or act-as grants changed.
-**Sources:** `web_settings_service_accounts`
+**Sources:** `web_settings_service_accounts`, `web_settings_org`, `public_api_v0`
**Target:**
@@ -209,9 +212,19 @@ A service account was created, modified, deleted, or had its git credentials or
|-------|------|-------------|
| `intent` | string | The specific service-account action (see below). |
| `serviceAccountId` | string | The service account ID. |
+| `agentProfileId` | string or null | Present when the account belongs to an [agent profile](/enterprise/agent-profiles). |
+| `name` | string or null | Present for `created` and `renamed` of an agent profile's account. |
+| `displayName` | string or null | Present for `created` and `renamed` of an agent profile's account. |
| `toStatus` | string or null | New status. Present for `status_changed` only. |
| `integration` | string or null | Integration name. Present for git-credential intents only. |
| `grantId` | string or null | Act-as grant ID. Present for `act_as_grant_minted` only. Never includes the grant's secret value. |
+| `previousOwnerUserIds` | string[] or null | Owner user IDs before the change. Present for `owners_changed`. |
+| `ownerUserIds` | string[] or null | Owner user IDs after the change. Present for `owners_changed`. |
+| `previousLocked` | boolean or null | Lock state before the change. Present for `lock_changed`. |
+| `locked` | boolean or null | Lock state after the change. Present for `lock_changed`. |
+| `previousAccess` | object or null | Access before the change. `null` means everyone. Present for `access_changed`. |
+| `access` | object or null | Access after the change. `null` means everyone. Present for `access_changed`. |
+| `connector` | string or null | The connector identifier. Present for `connector_link_issued` and `connector_disconnected`. Never includes the link. |
**Intent values:**
@@ -220,9 +233,15 @@ A service account was created, modified, deleted, or had its git credentials or
| `created` | A new service account was created. |
| `status_changed` | The service account's status was changed (e.g. active or disabled). |
| `deleted` | The service account was deleted. |
+| `renamed` | An agent profile's service account was renamed to follow the profile. |
| `git_credential_set` | A git credential was set for the service account. |
| `git_credential_revoked` | A git credential was revoked for the service account. |
| `act_as_grant_minted` | An act-as delegation grant was minted for the service account. |
+| `owners_changed` | The service account's owners were changed. |
+| `lock_changed` | The service account was locked or unlocked. |
+| `access_changed` | Who can use the service account was changed. |
+| `connector_link_issued` | A link to connect a connector to the service account was issued. The connection itself completes at the connector provider and is not recorded here. |
+| `connector_disconnected` | A connector was disconnected from the service account. |
**Example:**
@@ -237,7 +256,100 @@ A service account was created, modified, deleted, or had its git credentials or
"role": "manager"
},
"target": { "serviceAccountId": "sa_xyz" },
- "payload": { "intent": "created", "serviceAccountId": "sa_xyz" }
+ "payload": {
+ "intent": "owners_changed",
+ "serviceAccountId": "sa_xyz",
+ "previousOwnerUserIds": ["user_abc"],
+ "ownerUserIds": ["user_abc", "user_def"]
+ }
+}
+```
+
+---
+
+### `remote_delegation_config_change`
+
+An [agent profile](/enterprise/agent-profiles) was created, changed, duplicated, deleted, or had its delegation app assignments changed. A save that changes nothing records no event.
+
+**Sources:** `web_settings_org`, `public_api_v0`
+
+**Target:**
+
+| Field | Type | Description |
+|-------|------|-------------|
+| `configId` | string | The agent profile ID. |
+
+**Payload:**
+
+| Field | Type | Description |
+|-------|------|-------------|
+| `changes` | object | Map of changed field name to `{ "before": ..., "after": ... }`. When a profile is created, `before` is `null`; when it is deleted, `after` is `null`. |
+| `instructionsChanged` | boolean | Whether the custom instructions changed. The instructions themselves are never recorded. |
+| `duplicatedFromProfileId` | string | Present when the profile was created by duplicating another profile. |
+
+**Fields that can appear in `changes`:** `name`, `serviceAccountId`, `model`, `reasoningEffort`, `parallelWorkerLimit`, `machineType`, `templateId`, `pluginIds`, `access`, `ownerUserIds`, `locked`, and `targets`. `targets` records the profile's delegation app assignments as a list of `{ kind, id, position }` entries.
+
+**Example:**
+
+```json
+{
+ "eventType": "remote_delegation_config_change",
+ "source": "web_settings_org",
+ "actor": {
+ "principalKind": "human",
+ "principalId": "user_abc",
+ "email": "admin@corp.com",
+ "role": "manager"
+ },
+ "target": { "configId": "profile_123" },
+ "payload": {
+ "changes": {
+ "model": { "before": "claude-opus-4-6", "after": "claude-opus-4-7" },
+ "locked": { "before": null, "after": true }
+ },
+ "instructionsChanged": false
+ }
+}
+```
+
+---
+
+### `computer_secrets_change`
+
+Computer secrets were added, replaced, or deleted for the organization or for one service account. Secret names and values are never recorded.
+
+**Sources:** `web_settings_service_accounts`, `public_api_v0`
+
+**Target:**
+
+| Field | Type | Description |
+|-------|------|-------------|
+| `scope` | string | `"organization"` or `"service_account"`. |
+| `serviceAccountId` | string | The service account ID. Present when `scope` is `"service_account"`. |
+
+**Payload:**
+
+| Field | Type | Description |
+|-------|------|-------------|
+| `addedCount` | number | Number of secrets added. |
+| `replacedCount` | number | Number of secrets whose values were replaced. |
+| `usagesChangedCount` | number | Number of existing secrets whose usage settings changed. |
+| `deletedCount` | number | Number of secrets deleted. |
+
+**Example:**
+
+```json
+{
+ "eventType": "computer_secrets_change",
+ "source": "web_settings_service_accounts",
+ "actor": {
+ "principalKind": "human",
+ "principalId": "user_abc",
+ "email": "admin@corp.com",
+ "role": "manager"
+ },
+ "target": { "scope": "service_account", "serviceAccountId": "sa_xyz" },
+ "payload": { "addedCount": 2, "replacedCount": 0, "usagesChangedCount": 0, "deletedCount": 0 }
}
```
diff --git a/docs/enterprise/hierarchical-settings-and-org-control.mdx b/docs/enterprise/hierarchical-settings-and-org-control.mdx
index 657fd336..d4bd7449 100644
--- a/docs/enterprise/hierarchical-settings-and-org-control.mdx
+++ b/docs/enterprise/hierarchical-settings-and-org-control.mdx
@@ -336,6 +336,10 @@ Below is the full schema for org-managed settings. These are configured by org a
Marketplace sources that are strictly enforced. Each entry is a source object directly (e.g. `{ "source": "github", "repo": "owner/repo" }`), not wrapped in a `source` key like `extraKnownMarketplaces` values.
+
+ Maximum lifetime, in days, of new and rotated Factory API keys, including service account keys. An integer from `1` to `365`. Keys created without an expiration date default to this lifetime, and later expirations are refused. Existing keys are not affected. Unset means no limit. See [API key lifetime limit](#api-key-lifetime-limit).
+
+
### Supported model IDs
The following model identifiers can be used in `allowedModelIds` and `blockedModelIds`:
@@ -598,9 +602,21 @@ Beyond the general hierarchy, several features have dedicated org‑level toggle
- **AutoWiki Cloud Sync** (`wikiCloudSync`) – Controls whether Wikis can be generated and stored in the Factory App. When disabled, all AutoWiki API endpoints are blocked and the Droid CLI skips Cloud Sync and GitHub Wiki sync. Enabled by default. See [AutoWiki](/cli/features/wiki/overview#autowiki-cloud-sync).
- **Cloud Session Sync** (`cloudSessionSync`) – Controls whether session data is synced to Factory's cloud.
- **Built-in Tool Autonomy** (`builtInToolAutonomyOverrides`) – Sets the [autonomy level](/cli/user-guides/auto-run) required to run built-in network tools (Web Search, Fetch URL) without a confirmation prompt. Omitted tools default to `low`. Enforced from org settings only, so users and projects cannot weaken it.
+- **API key lifetime limit** (`apiKeyMaxLifetimeDays`) – Sets the longest lifetime new Factory API keys may have. See [API key lifetime limit](#api-key-lifetime-limit).
These controls are managed by org administrators in the **Enterprise Controls** section at [app.factory.ai](https://app.factory.ai).
+### API key lifetime limit
+
+In **Enterprise Controls** → **Security**, turn on **Limit API Key Lifetime** and set a **Maximum lifetime** from 1 to 365 days. While the limit is on:
+
+- New and rotated Factory API keys, including [service account](/enterprise/service-accounts) keys, must expire within the maximum lifetime.
+- Keys created without an expiration date expire at the maximum lifetime.
+- A key requested with a later expiration is refused.
+- Existing keys keep their current expiration.
+
+The limit applies on Factory-hosted and self-hosted deployments.
+
---
## Putting it all together
diff --git a/docs/enterprise/identity-sso-and-scim.mdx b/docs/enterprise/identity-sso-and-scim.mdx
index a5172d51..166d0969 100644
--- a/docs/enterprise/identity-sso-and-scim.mdx
+++ b/docs/enterprise/identity-sso-and-scim.mdx
@@ -413,6 +413,7 @@ With SCIM enabled:
- New employees in relevant IdP groups get access to Factory automatically.
- Users removed from those groups lose access automatically.
- Group membership changes propagate into Factory without manual updates.
+- Synced groups can be used to control who can use [agent profiles](/enterprise/agent-profiles#access) and [service accounts](/enterprise/service-accounts#access).
### Supported Directory Sync Providers
diff --git a/docs/enterprise/organization-roles.mdx b/docs/enterprise/organization-roles.mdx
index 736b1e8d..244dfd00 100644
--- a/docs/enterprise/organization-roles.mdx
+++ b/docs/enterprise/organization-roles.mdx
@@ -24,6 +24,7 @@ Users can:
- View their own analytics and activity.
- Manage their own personal settings and connections.
- View other members when the organization allows member visibility.
+- Manage the [service accounts](/enterprise/service-accounts#owners) and [agent profiles](/enterprise/agent-profiles#owners) they have been made an owner of.
Users cannot manage organization-wide settings, billing, members, or shared administrative controls.
@@ -41,6 +42,7 @@ Managers can:
- Manage usage limits and usage-related controls.
- Manage organization settings and enterprise controls.
- Manage service accounts and shared computer resources.
+- Create, edit, duplicate, and delete [agent profiles](/enterprise/agent-profiles), and assign them to delegation apps.
- Purchase or configure extra usage where available.
Managers cannot manage owner-only billing, payment, or identity-administration actions.
@@ -57,6 +59,24 @@ Owners can:
- Configure SSO, domain verification, and directory sync where available.
- Complete account onboarding or plan setup steps that require account ownership.
- Manage owner-only usage and billing controls.
+- Change locked service accounts and agent profiles, and lock or unlock them, even when they are not one of their owners.
+- Lock or unlock the Org Default agent profile.
+- View the [audit log](/enterprise/audit-log) on Enterprise plans.
+
+## Organization roles and resource owners
+
+Service accounts and agent profiles can also have their own **owners**: individual members who manage that one resource. Being an owner of a resource is separate from the organization **Owner** role.
+
+| Action on a service account or custom agent profile | User | User who owns it | Manager | Owner |
+| ---------------------------------------------------------- | ---- | ---------------- | ------- | ----- |
+| Create | No | No | Yes | Yes |
+| Edit, delete, or change owners and access (unlocked) | No | Yes | Yes | Yes |
+| Edit, delete, or change owners and access (locked) | No | Yes | No | Yes |
+| Lock or unlock | No | Yes | No | Yes |
+| Duplicate an agent profile | No | No | Yes | Yes |
+| Assign agent profiles to delegation apps | No | No | Yes | Yes |
+
+A Manager or Owner who is also an owner of a resource has both sets of permissions. See [Service Accounts](/enterprise/service-accounts#owners) and [Agent Profiles](/enterprise/agent-profiles#owners) for details.
## Notes
@@ -68,6 +88,9 @@ Exact access can vary based on your organization's plan, enabled features, and a
Non-human identities for CI/CD pipelines, scripts, and Droid Computers.
+
+ Set how Droid works, which identity it runs as, and who each profile serves.
+
Configure single sign-on and automated member provisioning.
diff --git a/docs/enterprise/service-accounts.mdx b/docs/enterprise/service-accounts.mdx
index a858a34b..92f0c448 100644
--- a/docs/enterprise/service-accounts.mdx
+++ b/docs/enterprise/service-accounts.mdx
@@ -9,13 +9,15 @@ Service accounts are non-human identities that automate work on behalf of your o
**Enterprise Feature** — Service accounts are available to enterprise customers. [Contact us](mailto:sales@factory.ai) to learn more.
+Every [agent profile](/enterprise/agent-profiles) also has its own service account. The profile decides how Droid works, and its service account decides who Droid is: work that runs on the profile uses that account's Git credentials, connectors, secrets, and computers. A profile's service account is created with the profile and managed from the profile editor. This page covers service accounts you create yourself.
+
---
## Start with the basics
- Add a stable identity from the API keys section in Settings. Give it a clear name and optional description so teammates know what it runs. Only [managers and owners](/enterprise/organization-roles) can create or edit a service account.
+ Add a stable identity from **Settings** → **Identity** → **Service Accounts**. Give it a clear name and optional description so teammates know what it runs. Only Managers and Owners can create a service account. See [Organization Roles](/enterprise/organization-roles).
Create keys for scripts, CI jobs, and other automated workloads. Key values are shown only once, so copy them and store them securely.
@@ -36,13 +38,79 @@ A service account authenticates with a Factory API key and runs as its own princ
Service accounts must be active to authenticate. If you mark one inactive or delete it, new requests using its keys fail, and workloads depending on that identity should be moved or restarted with another account.
+### Who can manage a service account
+
+Managers and Owners can see and manage every service account in the **Service Accounts** section of the Identity page. A User who is an [owner](#owners) of a service account also sees the Service Accounts section and can manage the accounts they own.
+
+| Action | Who can do it |
+| ------------------------------------------------------------- | -------------------------------------------------------------------------- |
+| Create a service account | Managers and Owners |
+| Edit, change status, or delete | Managers, Owners, and the account's owners |
+| Manage API keys, Git credentials, connectors, secrets, and computers | Managers, Owners, and the account's owners |
+| Change owners and access | Managers, Owners, and the account's owners |
+| Lock or unlock | The account's owners and organization Owners |
+
+While an account is [locked](#lock), only its owners and organization Owners can make any of these changes.
+
+You can also manage owners, lock, and access through the Factory API. See the **API Reference** tab.
+
+---
+
+## Owners
+
+Owners are people who manage a specific service account without needing the Manager role. Owners can view and edit the account, including its API keys, Git credentials, connectors, secrets, computers, access, and lock. They can also change its owners and delete it.
+
+- Owners must be active members of the organization. Directory groups cannot be owners.
+- An account can have up to 50 owners.
+- Creating a service account does not make you one of its owners. Add owners from the account's settings.
+- Owners who are not Managers cannot create new service accounts.
+
+The service account of an agent profile has no owner list of its own. The profile's owners manage it. See [Agent Profiles](/enterprise/agent-profiles#owners).
+
+---
+
+## Lock
+
+Lock a service account to stop other Managers from changing it. While an account is locked, only its owners and organization Owners can change its settings, status, owners, or access, manage its API keys, Git credentials, connectors, secrets, or computers, or delete it. Other Managers see it as read-only.
+
+Only the account's owners and organization Owners can lock or unlock it. You can lock an account that has no owners after confirming; until someone adds an owner, only organization Owners can change it.
+
+The service account of an agent profile follows the profile's lock.
+
+---
+
+## Access
+
+Access controls who can use a service account: who can choose it in the **Run as** picker for an [automation](/web/automations), who can act as it from the session composer, and who can use its computers.
+
+- **Everyone**: every member of the organization can use the account.
+- **Specific people and groups**: only the people you list and members of the directory groups you select can use it. Managers and the account's owners can always use it.
+
+People without access do not see the account in **Run as** pickers. Directory groups come from [Directory Sync (SCIM)](/enterprise/identity-sso-and-scim#directory-sync-scim-provisioning).
+
+The access of an agent profile's service account is set in the profile editor. Org Default's account is always open to everyone.
+
+---
+
+## Computer secrets
+
+Computer secrets are environment variables for a service account's managed computers. They are available on Factory-hosted deployments. Open them from **Secrets** in an active service account's actions, or from the **Secrets** tab of an [agent profile](/enterprise/agent-profiles).
+
+- Service account secrets are added to your organization's computer secrets. If a name matches an organization secret, the service account's value is used.
+- Existing computers keep their current environment until they are refreshed and restarted.
+- Values are write-only. You cannot read a value back after saving it.
+- Names can be up to 128 characters, must start with an uppercase letter or underscore, and can contain only uppercase letters, digits, and underscores. Some names are reserved and cannot be used.
+- Values must be 1 to 10,000 characters.
+
+Managers, Owners, and the account's owners can manage secrets. The account's lock applies. Inactive accounts cannot have their secrets changed.
+
---
## Manage access safely
- Set expiration dates for keys that are used in temporary automation. Short-lived keys limit the blast radius if a key is accidentally exposed.
+ Set expiration dates for keys that are used in temporary automation. Short-lived keys limit the blast radius if a key is accidentally exposed. Organizations can also set a maximum lifetime for new keys, including service account keys. See [API key lifetime limit](/enterprise/hierarchical-settings-and-org-control#api-key-lifetime-limit).
@@ -53,6 +121,10 @@ Service accounts must be active to authenticate. If you mark one inactive or del
Service account names are immutable identifiers. Create a new service account if you need a different name.
+
+ Add owners and lock accounts that production workloads depend on, so only the people responsible for them can change them.
+
+
Deleting a service account revokes its access and cleans up owned Factory resources where possible.
diff --git a/docs/integrations/linear.mdx b/docs/integrations/linear.mdx
index 053d6088..cfc1a8d9 100644
--- a/docs/integrations/linear.mdx
+++ b/docs/integrations/linear.mdx
@@ -9,6 +9,7 @@ Connect Factory to Linear so Droid can reference Linear project context during d
- Admin access to your Linear workspace
- A Factory account with admin privileges
+- The Org Default agent profile set up in Factory. See [Set up Org Default](/enterprise/agent-profiles#set-up-org-default-before-connecting-a-delegation-app).
## Integration Steps
@@ -38,6 +39,16 @@ Connect Factory to Linear so Droid can reference Linear project context during d
+## Agent profiles
+
+Work delegated from Linear runs on an [agent profile](/enterprise/agent-profiles) and as that profile's service account. The profile decides how Droid works, and its service account decides who Droid is. By default, every request runs on **Org Default**. To give some people a different model, environment, or credentials, a Manager or Owner can assign custom profiles to Linear:
+
+1. Go to **Settings** → **Delegations** and open **Linear**.
+2. Open the **...** menu and choose **Assign agent profiles**.
+3. Check the profiles to use, put them in order, and click **Save**.
+
+Each request runs on the first checked profile the requester has access to. People who are not included in any checked profile run on Org Default. See [Delegation apps](/enterprise/agent-profiles#delegation-apps).
+
## Verification
To ensure the integration is working correctly:
diff --git a/docs/integrations/slack.mdx b/docs/integrations/slack.mdx
index 49f4de3e..086af959 100644
--- a/docs/integrations/slack.mdx
+++ b/docs/integrations/slack.mdx
@@ -14,6 +14,7 @@ If the Factory Slack app is already installed in your workspace, rerun the Slack
- A Factory account with admin privileges
- Admin access to your Slack workspace
- Ability to install apps in your Slack workspace
+- The Org Default agent profile set up in Factory. See [Set up Org Default](/enterprise/agent-profiles#set-up-org-default-before-connecting-a-delegation-app).
## Integration Steps
@@ -91,6 +92,18 @@ After Slack is connected, click **Manage** from [**Settings** → **Organization
In channel settings, you can enable a channel, expand it, and configure **Run as**, **Incident Response**, **Machine Type**, **Computer** or **Workspace**, **Session Visibility**, **Model**, and **Custom Prompt**. Only channels where the Factory app has been invited appear in this list.
+## Agent profiles
+
+When someone mentions `@Factory` in a channel, the work runs on an [agent profile](/enterprise/agent-profiles) and as that profile's service account. The profile decides how Droid works, and its service account decides who Droid is. By default, every mention runs on **Org Default**. To give some people a different model, environment, or credentials, a Manager or Owner can assign custom profiles to Slack:
+
+1. Go to **Settings** → **Delegations** and open **Slack**.
+2. Open the **...** menu and choose **Assign agent profiles**.
+3. Check the profiles to use, put them in order, and click **Save**.
+
+Each mention runs on the first checked profile the requester has access to. People who are not included in any checked profile run on Org Default. See [Delegation apps](/enterprise/agent-profiles#delegation-apps). Direct messages to Droid run as the person who sends them, not as a profile's service account.
+
+[Slack automations](/web/automations) do not use these assignments. They follow the automation's own run settings.
+
## Service accounts
Use [service accounts](/enterprise/service-accounts) when Slack sessions should run from a shared identity and a preconfigured Droid Computer instead of the Slack user who mentions Factory. This is useful for incident, operations, or release channels that need consistent credentials and tool access.
diff --git a/docs/web/automations.mdx b/docs/web/automations.mdx
index 7d4da75a..023c6915 100644
--- a/docs/web/automations.mdx
+++ b/docs/web/automations.mdx
@@ -97,7 +97,7 @@ Trigger types define what starts an automation and what context Droid receives:
Use run settings to control how Droid executes the automation:
-- **Run as**: the user or service account the automation runs under.
+- **Run as**: the user or service account the automation runs under. The picker lists only the service accounts you have [access](/enterprise/service-accounts#access) to.
- **Run on**: the computer where Droid runs.
- **Model**: the model used for automation runs.