# Billing Source: https://docs.devin.ai/admin/billing Devin has two pricing models: * **Self-serve**: Free, Pro, Max, and Teams plans you can sign up for directly at [app.devin.ai](https://app.devin.ai). Self-serve usage is billed through a mix of included quota and on-demand credits. See [Self-serve plans](/admin/billing/self-serve) for full details. * **Enterprise**: Devin Enterprise customers are billed in Agent Compute Units (ACUs) at the rate set in their order form. See [Enterprise](/admin/billing/enterprise) for how ACU consumption is tracked, or [contact sales](https://cognition.com/contact) for pricing. For how Devin meters work in general (how usage accrues, idle/sleep behavior, and tips for keeping consumption under control), see [Usage](/admin/billing/usage). The tips on that page apply to both pricing models. # Budgets Source: https://docs.devin.ai/admin/billing/budgets Learn how enterprise budgets form an ACU limit tree, set monthly windows and per-budget user tiers, and manage budgets with the API. > [!NOTE] > > Budgets are in beta and require the feature to be enabled for your enterprise. To enable this feature, reach out to your account team. Budgets let you cap ACU usage the way your company is organized: one limit for the account, shared pools for teams or projects, and per-user limits inside each pool. ## Sample use cases ### Departments with delegated admins Acme Corp has 10 departments. Each department head manages the limits of their orgs. Central IT sets each department's total. This example shows two of them. Alice, the enterprise admin, creates a budget for each department under the Account budget. She shares each one with its department admin. Each department admin creates a budget for each of their orgs. ![Account budget of 100,000 ACU with Engineering at 30,000 ACU, with Payments and Search, and Marketing at 5,000 ACU.](https://mintcdn.com/cognitionai/_lCZXv8Jkk2Nq1kL/images/admin/budgets/budget-departments.svg?fit=max\&auto=format\&n=_lCZXv8Jkk2Nq1kL\&q=85\&s=fd65b7ebd17f98f03e694dae32493b69) Department budgets under the Account budget * Bob, the Engineering department admin, can set limits and temporary limits on any budget under Engineering. For example, he can give Payments a temporary 6,000 ACU limit for a busy week. * Bob cannot raise Engineering's 30,000 ACU limit. Only Alice can. * Usage in every Engineering org counts toward the 30,000 ACU limit, even when the org budgets add up to more. ![Budgets page as a department admin](https://mintcdn.com/cognitionai/_lCZXv8Jkk2Nq1kL/images/admin/budgets/dept-admin-tree.png?fit=max\&auto=format\&n=_lCZXv8Jkk2Nq1kL\&q=85\&s=9f921d3d02cf54e6a28792beb1db26b5) The Budgets page as a department admin, with the Account budget locked ![Raising a child budget limit](https://mintcdn.com/cognitionai/_lCZXv8Jkk2Nq1kL/images/admin/budgets/dept-admin-edit-child.png?fit=max\&auto=format\&n=_lCZXv8Jkk2Nq1kL\&q=85\&s=a12442bc7a00464d08283bad62358864) A department admin raising a child budget limit ![Department budget limit is read-only](https://mintcdn.com/cognitionai/_lCZXv8Jkk2Nq1kL/images/admin/budgets/dept-admin-own-limit.png?fit=max\&auto=format\&n=_lCZXv8Jkk2Nq1kL\&q=85\&s=7fc6e5bf029581de28e3290e6beb7554) A department admin cannot change the department budget limit ### A project bucket with higher user limits Every developer gets 200 ACUs a month. For the migration initiative, Acme Corp sets aside 5,000 ACUs and lets people on the project use more. Keep the Developer tools orgs in a Developer tools budget with a 200 ACU default tier. Create a Migration initiative budget with a 5,000 ACU limit. Put the project's org in it, and give it a 1,000 ACU default tier. Both budgets sit under the Account budget. ![Developer tools at 20,000 ACU with a 200 ACU default tier, and Migration initiative at 5,000 ACU with a 1,000 ACU default tier.](https://mintcdn.com/cognitionai/_lCZXv8Jkk2Nq1kL/images/admin/budgets/budget-project.svg?fit=max\&auto=format\&n=_lCZXv8Jkk2Nq1kL\&q=85\&s=a0d7477384a985d998a72ef8ae73f481) Developer tools and Migration initiative budgets with their tiers * Carol, a developer on the project, can use up to 1,000 ACUs in the Migration org. She can use up to 200 ACUs in the Developer tools orgs. * The whole project can never use more than 5,000 ACUs in a month. ![My Analytics budget picker](https://mintcdn.com/cognitionai/_lCZXv8Jkk2Nq1kL/images/admin/budgets/my-analytics-multi-budget.png?fit=max\&auto=format\&n=_lCZXv8Jkk2Nq1kL\&q=85\&s=1b91652d38ed08edbcba1468f074af59) My Analytics budget picker with several budgets ## How budgets work ### Budget tree Each enterprise account has one budget tree. The root is the **Account budget**, and child budgets sit under it. A tree can be up to three levels deep. A budget can hold one organization or several. Each organization belongs to exactly one budget. New organizations go under the Account budget. For example, Acme Corp sets a 100,000 ACU limit on its Account budget. Engineering splits its pool into three child budgets. ![Account budget of 100,000 ACU with Engineering at 40,000 ACU, its three child budgets, and Developer tools at 20,000 ACU with three user limit tiers.](https://mintcdn.com/cognitionai/_lCZXv8Jkk2Nq1kL/images/admin/budgets/budget-tree.svg?fit=max\&auto=format\&n=_lCZXv8Jkk2Nq1kL\&q=85\&s=48dc89ce8cd22e3043b576e5349ce1e0) Budget tree with budgets and user limit tiers Tiers are per-user limits inside one budget, not separate budgets. ![Budget tree with utilization per budget](https://mintcdn.com/cognitionai/_lCZXv8Jkk2Nq1kL/images/admin/budgets/tree.png?fit=max\&auto=format\&n=_lCZXv8Jkk2Nq1kL\&q=85\&s=cc09209e5169718deadade894b7b4802) Budget tree with utilization per budget (mock data) ### Budget limits A budget limit caps the combined ACU usage of the budget's orgs and the orgs in its child budgets, for one monthly window. A `null` limit means unlimited. * **Usage counts toward every ancestor.** Usage in a child budget also counts toward its parent and the Account budget. * **An exhausted ancestor blocks its children.** When any budget on the path runs out, usage in that branch stops. * **Child limits can add up to more than the parent limit.** The parent limit still caps their combined usage. * **A budget with no limit is still capped by its parents.** A budget linked to exactly one organization shares its limit with that organization. The deprecated [organization-level ACU limit endpoints](/admin/billing/org-acu-limits#organization-endpoints) set it too. You can also use the [update endpoint](#update-a-budget) below. ### What happens when a budget runs out When a budget runs out, usage stops for its orgs. Usage also stops when any parent budget runs out. Usage resumes in the next monthly window, or when an admin raises the limit or sets a temporary limit. * **Devin sessions:** new sessions cannot start, and running sessions sleep. Users see "Increase your organization's usage limit." * **Devin CLI and Desktop local agent:** requests are blocked. Users see "Your organization has reached its monthly usage limit. Ask an account admin to raise it, or wait for the limit to reset next month." * **Devin Review:** new reviews are blocked. ![Composer banner: usage limit reached](https://mintcdn.com/cognitionai/_lCZXv8Jkk2Nq1kL/images/admin/budgets/cloud-limit-reached.png?fit=max\&auto=format\&n=_lCZXv8Jkk2Nq1kL\&q=85\&s=419babb34f9e136d7cd10853b3d18074) Composer banner when the budget is used up ### Monthly window Budget limits, user limits, and temporary limits reset at the start of each monthly window. Each window starts on the start day of your billing phase. It is not always the calendar month. For example, if the billing phase starts on the 15th, the windows run from October 15 to November 14, then from November 15 to December 14. A **temporary limit** replaces the budget limit for the rest of the current window. The permanent limit returns in the next window. A temporary user override expires at the end of the current window. ![Marketing budget with a temporary limit](https://mintcdn.com/cognitionai/_lCZXv8Jkk2Nq1kL/images/admin/budgets/limits-temporary.png?fit=max\&auto=format\&n=_lCZXv8Jkk2Nq1kL\&q=85\&s=f5394365ee93dd0a9107ec8d650e8a93) A temporary limit raises Marketing to 6,000 ACUs for this window only ### User limits in a budget User limits cap how much one person can use in a monthly window. Each budget with a linked organization has its own user limits, and they apply within that budget only. * **Tiers.** Each budget has its own tiers and one default tier. A tier sets the monthly ACU limit for its members. * **IdP group mappings.** Map an identity provider group to a tier. Members of the group get that tier. * **Overrides.** Set a permanent or a temporary limit for one user. * **Request policies.** Each tier sets how limit-increase requests are handled. `unconditional` and `conditional` approve requests up to the tier's `max_limit`. `manual` sends requests to an admin for review. * **Scope.** A user limit counts only the user's usage in that budget's orgs. * **Copy and clear.** Copy tiers from another budget or the account. You can also copy IdP group mappings, assignments, and overrides. Clear all tiers in a budget to start over. > [!WARNING] > > A user limit on a parent budget does not cover its child budgets. For example, if Engineering also holds an org, a 300 ACU user limit on Engineering does not cap a user's usage in Payments or Search. ![Copy usage policies dialog](https://mintcdn.com/cognitionai/_lCZXv8Jkk2Nq1kL/images/admin/budgets/copy-policies.png?fit=max\&auto=format\&n=_lCZXv8Jkk2Nq1kL\&q=85\&s=bafda52c62081f5c5d3d71266eff8cad) Copy usage policies dialog with Developer tools as the source ### Who can manage a budget Enterprise admins manage budgets in **Enterprise Settings** under **Budgets**. They manage the whole tree, including the Account budget. * **Delegation.** An enterprise admin can share a budget with a person or group in the Manage access tab. A delegated admin can create budgets under it, and set limits and temporary limits on those child budgets. Delegation requires separate enablement; reach out to your account team. * **A delegated admin cannot raise the shared budget's own limit.** Only an admin who manages the parent budget can change it. * **Members** see their own usage and limit in My Analytics. ![Manage access tab of the Engineering budget](https://mintcdn.com/cognitionai/_lCZXv8Jkk2Nq1kL/images/admin/budgets/dept-admin-access.png?fit=max\&auto=format\&n=_lCZXv8Jkk2Nq1kL\&q=85\&s=a90c02116678e594ff6dfef6511b6724) Manage access tab of the Engineering budget, with Bob as a manager ## Frequently asked questions > [accordion] Can org admins set an org's ACU limit? > > No. Enterprise admins set org ACU limits. To let a team manage its own limits, share a budget with the team's admin. > [accordion] Why does the org-limit endpoint return 409? > > Once budget limits are enforced for your enterprise, the org-limit endpoint returns HTTP `409` when the org shares its budget with other orgs, or when it sits directly in the Account budget. The error reads "This organization has no limit of its own. Set the limit on its budget." For example, if Globex, Initech, and Umbrella share one budget, a limit write for Globex returns `409`. > [accordion] When do limits reset? > > At the start of each monthly window. The window starts on the start day of your billing phase. > [accordion] Can an org be in two budgets? > > No. Each org belongs to exactly one budget. A budget can hold many orgs. ## Manage budgets with the V3 API All requests authenticate with an enterprise **service user token**. Callers need the **ManageAcuLimits** account permission or [delegated access](#who-can-manage-a-budget) to the budget. Use `https://api.devin.ai` as the base URL. See the [V3 API overview](/api-reference/v3/overview) for authentication and service user guidance. Budget-scoped collection endpoints take the budget in the path: `/v3beta1/enterprise/usage-policies/budgets/{budget_id}/...`. Endpoints that address a single tier or request (`/tiers/{tier_id}`, `/requests/{request_id}`) resolve the budget from the tier or request, so they share their paths with the account-wide endpoints. ### PATCH semantics For the `PATCH` endpoints: * An omitted field is unchanged. * A field set to `null` is cleared. * A field set to a value is created or updated. ## Budget endpoints ### List budgets ```http theme={null} GET /v3beta1/enterprise/usage-policies/budgets ``` Returns a paginated list of the account's budgets, active and archived. Each budget looks like: ```json theme={null} { "budget_id": "budget-abc123", "name": "Engineering", "parent_budget_id": "budget-root", "org_ids": ["org-xyz789"], "status": "active", "cycle_acu_limit": 2000, "temporary_cycle_acu_limit": null } ``` * `budget_id`: the identifier to use in budget-scoped paths. * `parent_budget_id`: the parent budget; `null` for the account's root budget. * `org_ids`: the organizations linked to this budget. Their usage counts against it. Empty when no organization is linked. * `status`: `active` or `archived`. * `cycle_acu_limit`: the budget's limit on the ACU consumption charged to it and its descendants per monthly billing window; `null` means unlimited. * `temporary_cycle_acu_limit`: a limit that overrides `cycle_acu_limit` until the end of the current monthly billing window; `null` when none is live. ### Update a budget ```http theme={null} PATCH /v3beta1/enterprise/usage-policies/budgets/{budget_id} ``` Partial update; omitted fields are unchanged and `null` clears a limit. At least one field is required. * `parent_budget_id`: moves the budget, with its sub-budgets, under another active budget. The root budget cannot be moved, and budgets nest at most three levels deep. * `cycle_acu_limit`, `temporary_cycle_acu_limit`: the budget's limits, as in the list response. **Request body — set the limit and a temporary bump for this month** ```json theme={null} { "cycle_acu_limit": 2000, "temporary_cycle_acu_limit": 2500 } ``` **Request body — remove the limits** ```json theme={null} { "cycle_acu_limit": null, "temporary_cycle_acu_limit": null } ``` **Request body — move the budget under another budget** ```json theme={null} { "parent_budget_id": "budget-platform" } ``` Returns the updated budget. Setting `temporary_cycle_acu_limit` again restarts it for the current window. For a budget linked to exactly one organization, `cycle_acu_limit` also becomes the organization's ACU limit. ## Tier endpoints ### List tiers ```http theme={null} GET /v3beta1/enterprise/usage-policies/budgets/{budget_id}/tiers ``` Returns a paginated list of the budget's tiers in precedence order: highest `priority` first, newest tier first within a priority. Each tier looks like: ```json theme={null} { "tier_id": "tier-abc123", "name": "Engineers", "is_default": true, "cycle_acu_limit": 500, "policy": "manual", "max_limit": null, "priority": 0, "member_count": 42, "created_at": 1735689600 } ``` * `is_default`: whether this is the budget's default tier. * `cycle_acu_limit`: the default per-cycle ACU limit for each member; `null` means uncapped. * `policy`: how limit-increase requests against the tier are handled — `unconditional` and `conditional` approve up to `max_limit`, `manual` requires admin review. * `max_limit`: the maximum limit to which increase requests are approved; `null` approves without a ceiling. Always `null` when `cycle_acu_limit` is `null`. * `priority`: ranks the tier among a user's IdP-group-mapped tiers — the highest value wins, ties broken by newest tier. An explicit user assignment overrides the ranking, and the default tier never ranks. * `member_count`: the number of users currently in the tier. For the default tier this counts every budget member not in another tier. ### Create a tier ```http theme={null} POST /v3beta1/enterprise/usage-policies/budgets/{budget_id}/tiers ``` **Request body** ```json theme={null} { "name": "Engineers", "cycle_acu_limit": 500, "policy": "manual" } ``` The budget's first tier automatically becomes its default tier. Returns HTTP `201` with the created tier. ### Get a tier ```http theme={null} GET /v3beta1/enterprise/usage-policies/tiers/{tier_id} ``` ### Update a tier ```http theme={null} PATCH /v3beta1/enterprise/usage-policies/tiers/{tier_id} ``` Partial update; omitted fields are unchanged. ```json theme={null} { "name": "Engineering", "cycle_acu_limit": 750 } ``` ### Delete a tier ```http theme={null} DELETE /v3beta1/enterprise/usage-policies/tiers/{tier_id} ``` Returns HTTP `204` on success. The default tier cannot be deleted (promote another tier first). A tier that still has users must have them moved first, and any IdP group mappings to the tier must be removed first. ## Tier user endpoints ### List a tier's users ```http theme={null} GET /v3beta1/enterprise/usage-policies/tiers/{tier_id}/users ``` Returns a paginated list of the tier's users with their resolved limits. For the default tier, this is every budget member not in another tier: ```json theme={null} { "user_id": "user_abc123", "name": "Ada Lovelace", "email": "ada@example.com", "cycle_acu_limit_override": null, "temporary_cycle_acu_limit": 800, "effective_cycle_acu_limit": 800, "limit_source": "temporary_override", "membership": "explicit" } ``` * `cycle_acu_limit_override`: the user's permanent override, if any. * `temporary_cycle_acu_limit`: the user's temporary override, present only while it is live in the current monthly billing window. * `effective_cycle_acu_limit`: the limit currently enforced for the user; `null` means uncapped. * `limit_source`: where the effective limit comes from — `override` (permanent), `temporary_override`, or `tier`. * `membership`: why the user is in the tier — `explicit` (directly assigned), `idp_group` (via their winning IdP group mapping), or `default` (fallback to the default tier). ### Assign a user to a tier ```http theme={null} PUT /v3beta1/enterprise/usage-policies/tiers/{tier_id}/users/{user_id} ``` Idempotent. Returns HTTP `204` on success. Moving a user from another tier clears any per-user override, so they start out inheriting the destination tier's limit. ### Remove a user from a tier ```http theme={null} DELETE /v3beta1/enterprise/usage-policies/tiers/{tier_id}/users/{user_id} ``` Removes the user's explicit tier assignment (and any override). The user then resolves to their IdP-group-mapped tier, if any, else the default tier. Returns HTTP `204` on success. ## User endpoints ### Get a user's limits ```http theme={null} GET /v3beta1/enterprise/usage-policies/budgets/{budget_id}/users/{user_id} ``` Returns the user's resolved tier, limits, and pending request within the budget. Includes the [tier user fields](#list-a-tiers-users) above plus: ```json theme={null} { "tier_id": "tier-abc123", "tier_name": "Engineers", "tier_cycle_acu_limit": 500, "pending_request_id": null, "pending_request_cycle_acu_limit": null } ``` * `tier_id` / `tier_name`: the tier the user's limit resolves from (explicit assignment, IdP group mapping, or the default tier); `null` when the budget has no tiers. * `tier_cycle_acu_limit`: the tier's own limit before any override; `null` means uncapped. * `pending_request_id` / `pending_request_cycle_acu_limit`: the user's pending limit-increase request and the limit it asks for, if any. ### Set or clear a user's override ```http theme={null} PATCH /v3beta1/enterprise/usage-policies/budgets/{budget_id}/users/{user_id} ``` User-scoped: the target only needs to be a budget member — no tier is involved, and the user's tier assignment is never changed. **Request body — set a temporary override** ```json theme={null} { "cycle_acu_limit": 800, "kind": "temporary" } ``` `kind` is required when setting a value: `permanent` never expires; `temporary` expires at the end of the current monthly billing window. **Request body — clear all overrides** ```json theme={null} { "cycle_acu_limit": null } ``` The endpoint returns HTTP `204` on success. ## IdP group endpoints Map an IdP group to a tier so its members inherit that tier automatically. Mappings are resolved live from group membership and never change a user's explicit tier assignment — an explicit assignment always wins. A user in several mapped groups resolves to the highest-ranked mapped tier (highest tier `priority`, ties broken by newest tier). ### List IdP group mappings ```http theme={null} GET /v3beta1/enterprise/usage-policies/budgets/{budget_id}/idp-groups ``` Returns a paginated list of the budget's group-to-tier mappings, oldest first. Filter with `?tier_id=` to list only groups mapped to one tier: ```json theme={null} { "idp_group_id": "grp_abc123", "idp_group_name": "Engineering", "tier_id": "tier-abc123" } ``` ### Get an IdP group's mapping ```http theme={null} GET /v3beta1/enterprise/usage-policies/budgets/{budget_id}/idp-groups/{idp_group_name} ``` Returns HTTP `404` if the group has no mapping in the budget. ### Map an IdP group to a tier ```http theme={null} PUT /v3beta1/enterprise/usage-policies/budgets/{budget_id}/idp-groups/{idp_group_name} ``` **Request body** ```json theme={null} { "tier_id": "tier-abc123" } ``` Idempotent upsert. The tier must belong to the budget. A group maps to at most one tier per budget, so mapping an already-mapped group moves it to the given tier. ### Unmap an IdP group ```http theme={null} DELETE /v3beta1/enterprise/usage-policies/budgets/{budget_id}/idp-groups/{idp_group_name} ``` Returns HTTP `204` on success. The mapped tier stops applying to the group's members; users with no explicit assignment and no other mapped tier fall back to the default tier. ## Limit-increase request endpoints Users can request a higher per-cycle limit. The requester's tier `policy` decides what happens: `unconditional` and `conditional` auto-approve up to the tier's `max_limit`, while `manual` holds the request for admin review through these endpoints. ### List limit-increase requests ```http theme={null} GET /v3beta1/enterprise/usage-policies/budgets/{budget_id}/requests ``` Returns a paginated list of the budget's requests, filterable with `?status=` (`pending`, `approved`, `denied`, `expired`) and `?user_id=`: ```json theme={null} { "request_id": 42, "user_id": "user_abc123", "name": "Ada Lovelace", "email": "ada@example.com", "tier_id": "tier-abc123", "tier_name": "Engineers", "current_cycle_acu_limit": 500, "requested_cycle_acu_limit": 800, "message": "Wrapping up a large migration this month", "status": "pending", "created_at": 1735689600, "reviewed_at": null, "reviewer": null } ``` * `tier_id` / `tier_name`: the requester's tier within the budget; `null` when the budget has no tiers. * `current_cycle_acu_limit`: the limit currently enforced for the requester; `null` means uncapped. * `status`: `expired` means the request was still pending when its billing cycle ended. * `reviewer`: the admin who reviewed the request; `null` while pending. ### Get a limit-increase request ```http theme={null} GET /v3beta1/enterprise/usage-policies/requests/{request_id} ``` ### Approve a limit-increase request ```http theme={null} POST /v3beta1/enterprise/usage-policies/requests/{request_id}/approve ``` Grants the requested limit as a **temporary override** that expires at the end of the current monthly billing window. Optionally grant a different limit: ```json theme={null} { "cycle_acu_limit": 700 } ``` Returns the updated request. Returns HTTP `409` if the request was already reviewed or the requester is no longer an account member. ### Deny a limit-increase request ```http theme={null} POST /v3beta1/enterprise/usage-policies/requests/{request_id}/deny ``` Returns the updated request, or HTTP `409` if it was already reviewed. ## Example workflows ### Set up a budget's tiers Find the budget, cap it at 2,000 ACUs a month, then create a default tier so every budget member gets a 500 ACU monthly cap: ```bash theme={null} curl "https://api.devin.ai/v3beta1/enterprise/usage-policies/budgets" \ -H "Authorization: Bearer " curl -X PATCH "https://api.devin.ai/v3beta1/enterprise/usage-policies/budgets/budget-abc123" \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"cycle_acu_limit": 2000}' curl -X POST "https://api.devin.ai/v3beta1/enterprise/usage-policies/budgets/budget-abc123/tiers" \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"name": "Standard", "cycle_acu_limit": 500, "policy": "manual"}' ``` Map an IdP group to the tier and give one user a temporary bump for the rest of the month: ```bash theme={null} curl -X PUT "https://api.devin.ai/v3beta1/enterprise/usage-policies/budgets/budget-abc123/idp-groups/Engineering" \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"tier_id": "tier-abc123"}' curl -X PATCH "https://api.devin.ai/v3beta1/enterprise/usage-policies/budgets/budget-abc123/users/user_abc123" \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"cycle_acu_limit": 800, "kind": "temporary"}' ``` # Use your ChatGPT plan in Devin Source: https://docs.devin.ai/admin/billing/chatgpt Link your ChatGPT Go, Plus, or Pro subscription to Devin so GPT model usage in your sessions is billed to your ChatGPT plan instead of your Devin quota. If you have a ChatGPT subscription, you can link it to Devin and have the GPT model portion of your sessions billed to your ChatGPT plan instead of your Devin quota. Devin calls this **token sharing**: once your ChatGPT account is linked and the **Use your ChatGPT plan** switch is on, requests Devin makes to OpenAI models on your behalf draw from your ChatGPT plan's usage, and none of that usage counts against your Devin quota or on-demand credits. ## Eligibility * **ChatGPT plans:** You can share a personal ChatGPT **Go**, **Plus**, or **Pro** plan with Devin. You cannot share a Free plan, or a Business, Team, or Enterprise workspace account. * **Devin plans:** Token sharing is available on the [self-serve](/admin/billing/self-serve) **Pro**, **Max**, and **Teams** plans. It's not available on the Free plan or on Enterprise accounts. If you're on the Free plan, you'll see an **Upgrade your plan to connect ChatGPT** prompt in settings. ## Setup 1. Go to [Settings > Connections](https://app.devin.ai/account/connections) and choose **Continue with ChatGPT** to link your ChatGPT account. You'll be asked to sign in to ChatGPT and grant Devin permission to use your plan. 2. Check that **Use your ChatGPT plan** is on. The switch is on the same settings page, on the mode and model cards in the Devin Cloud picker, in the Devin Desktop model picker, and in Devin CLI (`/billing on`, or `Ctrl+S` in the `/model` picker). It's one switch for your account: changing it in one place changes it everywhere. You can unlink your ChatGPT account or turn the switch off at any time. ## What changes when it's on * **Devin Cloud:** Normal, Fast, Lite, Ultra, and Fusion sessions switch to GPT models so your ChatGPT plan can pay for them. If you pick a specific non-GPT model, the session stays on that model and is billed to your Devin quota. Fast mode isn't available while the switch is on. * **Devin Desktop and CLI:** Your model choice doesn't change. Requests to GPT models are billed to your ChatGPT plan; every other model is billed to your Devin quota. In the CLI, covered models are marked with an asterisk in the model picker. ## Check that it's working * **Devin Cloud:** Open the mode picker. The card shows **You're currently using your ChatGPT subscription** when your plan is in use. * **Devin CLI:** Run `/billing`. It shows **Use your ChatGPT plan: on**. * **Usage:** GPT usage paid by your ChatGPT plan appears in ChatGPT, not in Devin. Open [Settings > Usage & limits](https://app.devin.ai/settings/usage) and follow the **Manage usage** link to ChatGPT. ## What still uses your Devin quota Your ChatGPT plan pays only for GPT model requests in sessions you own. These still use your Devin quota or [on-demand credits](/admin/billing/self-serve#on-demand-credits): * Models other than GPT, including the non-GPT models in Fusion on Desktop and CLI, and any non-GPT model you pick yourself * Fast and priority GPT variants * The machine time of Devin Cloud sessions * Code scans * Sessions that aren't owned by you, such as automations that don't run as you Devin Cloud sessions also still need available Devin quota or on-demand credits to start, even when your ChatGPT plan pays for the models. ## FAQ ### What models can I use my ChatGPT plan with? You can use your ChatGPT plan with all GPT models available in Devin except fast and priority variants. ### How does my ChatGPT plan work with modes like Fusion or Adaptive? When your ChatGPT account is linked and **Use your ChatGPT plan** is on: * **Local Fusion (Devin Desktop and CLI):** When you choose a GPT model for Fusion, that model's usage is billed to your ChatGPT subscription. Usage from the other models is still billed to your Devin quota. * **Adaptive:** Adaptive automatically chooses models, so it only uses your ChatGPT subscription when it routes to a GPT model. Usage from other models is billed to your Devin quota. * **Cloud Fusion:** Cloud Fusion runs both its lead and its sidekick on GPT models, billed to your ChatGPT subscription. ### Is my ChatGPT subscription shared with Devin Cloud and Devin Desktop/CLI? Yes. Your linked ChatGPT subscription can be used across Devin Cloud, Devin Desktop, and Devin CLI. A single **Use your ChatGPT plan** toggle controls whether subscription sharing is active across all three products. Turning it on or off in one product applies everywhere; you don't need to link your ChatGPT account separately for each product. ### How does it work on the Teams plan? ChatGPT plans are linked per user, not per team. Each member of a Teams account can link their own ChatGPT subscription, and the sessions that member owns draw from their ChatGPT plan. There is no shared team-wide ChatGPT plan, and one member's linked plan is never used for another member's sessions. In a shared session, only the session owner can change the switch. ### Will I still consume Devin quota? Partly. GPT model requests are billed **only** to your ChatGPT plan and don't also consume Devin quota or on-demand credits. Everything listed in [What still uses your Devin quota](#what-still-uses-your-devin-quota) is billed to Devin as usual. ### What happens if I hit the limit on my ChatGPT plan? * **Devin Cloud:** The session pauses with the message **You've reached your ChatGPT subscription usage limit**. Devin doesn't move the session onto your Devin quota by itself. Resume the session once your ChatGPT limit resets, or turn off **Use your ChatGPT plan** and resume to continue on Devin usage. * **Devin Desktop and CLI:** A request that can't run on your ChatGPT plan is retried on your Devin quota, then on [on-demand credits](/admin/billing/self-serve#on-demand-credits), and you see a notice that your ChatGPT plan was unavailable. If your Devin quota is also used up, the request fails. ### Why does Devin say my ChatGPT connection has expired? Devin must have an active grant from your ChatGPT account to use your plan. If the grant expires or you revoke it, the Devin Cloud mode picker and [Settings > Connections](https://app.devin.ai/account/connections) show a message. The message is **Your ChatGPT connection has expired. Reconnect to use your plan.** Choose **Reconnect** in the mode picker to open Settings > Connections. Then link your ChatGPT account again. Until you do this, Devin Desktop and Devin CLI bill GPT requests to your Devin quota. # Enterprise Source: https://docs.devin.ai/admin/billing/enterprise How Devin Enterprise contracts are billed, how admins track ACU consumption, and how to set budgets and per-user ACU limits. Devin Enterprise customers are billed in **Agent Compute Units (ACUs)** at the rate set in their order form. [Contact sales](https://cognition.com/contact) for pricing. For how Devin meters work in general (sleep behavior, what counts toward consumption, tips for keeping costs down), see [Usage](/admin/billing/usage). > [!NOTE] > > **Budgets.** Organization-level and user-level ACU limits are unifying under [Budgets](/admin/billing/budgets). Budgets cap ACU usage with one limit for the account, shared pools for teams or projects, and per-user limits inside each pool. ## Tracking ACU consumption Enterprise customers can track ACU consumption at both the Enterprise and Organization level: * **Enterprise admins** view Enterprise ACU consumption at [Settings > Consumption](https://app.devin.ai/settings/consumption) in Enterprise Settings. * **Organization admins** view Organization ACU consumption at [Settings > Consumption Analytics](https://app.devin.ai/settings/analytics?tab=consumption) within Organization Settings. * **Any user** can see the ACU cost of a specific session from [Session Insights](/product-guides/session-insights). ## Setting budgets Enterprise admins set ACU limits with [Budgets](/admin/billing/budgets) in [Enterprise Settings](https://app.devin.ai/settings/usage-policies/budgets). Budget limits apply to cloud Devin sessions, Devin Review, Devin Desktop, Windsurf JetBrains, and Devin CLI usage billed to the budget's organizations, including organizations in its child budgets. ![Budget tree with utilization per budget](https://mintcdn.com/cognitionai/_lCZXv8Jkk2Nq1kL/images/admin/budgets/tree.png?fit=max\&auto=format\&n=_lCZXv8Jkk2Nq1kL\&q=85\&s=cc09209e5169718deadade894b7b4802) Budget tree with utilization per budget (mock data) When a budget reaches its limit, new work billed to those organizations is blocked. An enterprise admin can raise the limit or set a temporary limit, or users can wait until usage resets in the next monthly billing window. User limits remain in effect independently. ![Composer banner: usage limit reached](https://mintcdn.com/cognitionai/_lCZXv8Jkk2Nq1kL/images/admin/budgets/cloud-limit-reached.png?fit=max\&auto=format\&n=_lCZXv8Jkk2Nq1kL\&q=85\&s=419babb34f9e136d7cd10853b3d18074) Composer banner when the budget is used up ## Setting user limits Each budget can also cap each member's monthly ACU consumption with usage tiers, IdP group mappings, and per-member overrides. See [Usage policies](/enterprise/features/usage-policies#user-limits). ## Frequently asked questions > [accordion] When will I be billed? > > Enterprise customers are billed for ACUs as stated in their order form. > [accordion] What are Enterprise ACUs? > > Enterprise ACUs represent the work performed by Devin for customers on the Enterprise plan, which adheres more strictly to task planning and end-to-end testing. They are distinct from self-serve quota and on-demand credits, and are priced per the customer's Enterprise order form. > [accordion] How can I tell which Organization or user consumed the most ACUs? > > Enterprise admins can break consumption down by Organization from the [Consumption](https://app.devin.ai/settings/consumption) page in Enterprise Settings. Org admins can break it down by user from [Consumption Analytics](https://app.devin.ai/settings/analytics?tab=consumption) inside Organization Settings. # Self-serve plans Source: https://docs.devin.ai/admin/billing/self-serve Compare Devin's Free, Pro, Max, and Teams self-serve plans, including seat types, the Teams member limit and minimum, usage quota, and on-demand credits. Devin has four self-serve plans you can sign up for directly at [app.devin.ai](https://app.devin.ai). For authoritative pricing, see the [Devin pricing page](https://devin.ai/pricing). This page explains how the plans relate to each other and how billing mechanics work. ## Plan overview | Plan | For | Price | Members | | - | - | - | - | | **Free** | Individuals trying Devin | Free | 1 | | **Pro** | Individual users | \$20/month | 1 | | **Max** | Power users who need more quota | \$200/month | 1 | | **Teams** | Teams working with Devin together | \$80/month minimum | Up to 100 | > [!NOTE] > > The **Pro** and **Max** plans are individual plans. They cannot be shared across multiple users. If you want multiple people to use Devin under a single subscription, you need the **Teams** plan. ## Free The Free plan lets you try Devin with limited usage. It includes: * Limited Devin usage * Access to [Devin Review](/work-with-devin/devin-review) * Access to [DeepWiki](/work-with-devin/deepwiki) Free users can upgrade to any paid plan at any time from [Settings > Plans](https://app.devin.ai/settings/plans). ## Pro Pro is Devin's entry-level individual plan. It's designed for a single developer who uses Devin regularly. Pro includes: * A daily and weekly usage quota that covers Devin sessions, [Devin CLI](/cli), and [Devin Desktop](https://windsurf.com) * Pay-as-you-go [on-demand credits](#on-demand-credits) for usage past your quota * Slack, Linear, and [MCP](/work-with-devin/mcp) integrations Pro is a single-user plan. Pro subscribers cannot invite additional members to their organization. To work with teammates on a shared subscription, use the [Teams](#teams) plan. ## Max Max is for individual users who consistently exceed the Pro quota. It includes everything in Pro, plus a significantly larger weekly usage quota (with no daily cap), also shared between Devin sessions, [Devin CLI](/cli), and Devin Desktop. Like Pro, Max is a single-user plan and does not support multiple members. ## Teams The Teams plan is Devin's self-serve plan for teams of up to 100 members. Key properties: * **Up to 100 members**: invite teammates until your organization reaches 100 members. Full and flex seats both count toward the limit. Larger teams should [contact sales](https://cognition.com/contact) about Enterprise. * **\$80/month minimum**: every Teams account pays at least \$80/month. * Each member gets either a **full seat** or a **flex seat**, and every seat includes Devin Desktop. * **On-demand credits** are shared across the whole team. * **SAML or OIDC single sign-on** for your team account. See [SSO for Teams](#sso). * **Cost controls with 3 usage tiers** to cap how much each member can use. See [Cost controls](#cost-controls). * **Free mode**: each member can run up to 2 cloud sessions at a time at no cost. See [Free mode](#free-mode). ### Full seats vs. flex seats Every member of a Teams account holds one of two seat types: > [card] Full seat > > **\$40/month per seat**, billed as a fixed recurring line item. > > Best for members who use Devin regularly. Each full seat includes: > > * A daily and weekly usage quota equivalent to the Pro plan > * Access to Devin Desktop, Devin CLI, and Devin cloud sessions > [card] Flex seat > > **Free**. There is no separate limit on flex seats, but every member (full or flex) counts toward the 100-member limit. > > Best for occasional users. Flex seats: > > * Draw entirely from the team's shared pool of on-demand credits > * Include access to Devin Desktop, Devin CLI, and Devin cloud sessions > * Have no fixed monthly charge per seat > [!NOTE] > > Teams accounts that already had more than 100 members keep their current members, but can't add new members until they are below 100. Admins choose the seat type when [inviting a member](/product-guides/invite-team), and can convert a member between seat types later from **Settings > Members**. ### The \$80 Teams minimum Every Teams subscription costs **at least \$80/month**. You can hit this minimum in any combination of full seats (\$40 each) and on-demand credits: | Full seats | On-demand credits included | Monthly total | | -: | -: | -: | | 0 | \$80 | \$80 | | 1 | \$40 | \$80 | | 2 | \$0 | \$80 | | 3 | \$0 | \$120 | | *N* ≥ 2 | \$0 | *N* × \$40 | When you have fewer than two full seats, the remainder of the \$80 minimum is automatically charged as prepaid on-demand credits that the whole team can draw from. Once you have two or more full seats, you've cleared the minimum and no additional on-demand credits are included, but you can still [top up on-demand credits](#on-demand-credits) at any time. > [!TIP] > > Give a full seat to anyone who uses Devin regularly. Full seats include their own Pro-equivalent quota at a predictable fixed cost, making them the best fit for power users. Use flex seats for occasional or trial users: they get the same products, including Devin Desktop, and draw on the team's shared on-demand credits. ### SSO Teams admins can connect a SAML 2.0 or OIDC identity provider (Okta, Microsoft Entra ID, or any compliant IdP) from [Settings > Authentication](https://app.devin.ai/settings/authentication). On a Teams account, SSO signs in existing members only, so invite people before they sign in through SSO. Follow the identity provider setup steps in the [SSO onboarding guide](/enterprise/security-access/sso/guide); its auto-membership, role assignment, and SCIM provisioning steps apply to [Enterprise](/admin/billing/enterprise) only. ### Cost controls Teams admins can cap each member's usage with up to **3 usage tiers** from [Settings > Usage policies](https://app.devin.ai/settings/usage-policies). Each tier sets a usage limit, members are assigned to a tier or fall back to the default tier, and new work is blocked once a member reaches their limit. The [usage tiers](/enterprise/features/usage-policies#usage-tiers) section of the Usage policies guide explains how tiers work; budgets, budget-scoped limits, and the beta enablement described there apply to Enterprise only. ### Free mode On the Teams plan, every member can pick **Free (powered by SWE-2)** in the agent selector to run Devin cloud sessions at no cost. Each member can run up to **2 Free sessions at a time**; to start a third, wait for one to finish or pick another mode. Sessions in other modes are billed as usual. ## How quotas work Each paid plan and full seat includes a usage allowance that refreshes automatically on a calendar basis: * **Pro** and **Teams full seats** have a **daily and weekly** allowance. The daily allowance is more than 1/7 of the weekly, so you can keep working through weekends without giving up overall capacity for the week. * **Max** has a **weekly** allowance only, with no daily cap. When you've used up your allowance, [on-demand credits](#on-demand-credits) keep you working without interruption. If you have an eligible ChatGPT Go, Plus, or Pro subscription, you can also [use your ChatGPT plan](/admin/billing/chatgpt) to pay for GPT model usage so it doesn't count against your Devin allowance. ## On-demand credits On-demand credits are prepaid usage credit that fund any work past your plan's included quota: * **Roll over** month-to-month. Purchased credits never expire. * Can be topped up at any time from [Settings > Plans](https://app.devin.ai/settings/plans), and optionally refilled automatically via auto-reload. * Admins can set auto-reload thresholds and default session spending limits from [Settings > Usage & limits](https://app.devin.ai/settings/usage). * On the **Teams** plan, credits are **shared across all members**, with no per-member balance. Any teammate can draw from the shared pool. * On the **Teams** plan, credits fund all usage on **flex seats** and any **full seat** usage past its included quota, and cover any portion of the [\$80/month minimum](#the-80-teams-minimum) not already covered by full seats. ## Devin Review and Automations Pricing [Automations](/product-guides/automations) and [Devin Review](/work-with-devin/devin-review) are available on self-serve plans. * **Teams use shared on-demand credits.** On the Teams plan, Automations and Devin Review draw directly from the team's shared [on-demand credit](#on-demand-credits) pool and do not consume full-seat quota. * **What happens when you run out of credits.** If you run out of credits, Automations stop running and Devin Review switches to its diff viewer. Top up [on-demand credits](#on-demand-credits) to start Automations again and re-enable AI-powered review. * **Public PRs are free.** Anyone can review a public GitHub PR at [devinreview.com](https://devinreview.com) — or by replacing `github.com` with `devinreview.com` in any PR URL — without a Devin account, and no on-demand credits are consumed. > [!TIP] > > Review managers can keep usage predictable with auto-review rules in [Settings > Review](https://app.devin.ai/settings/review). Choose when a rule starts (**PR is created** or **PR is ready**) and its cadence (**Only once** or **Every push**), then narrow its scope with repository or author conditions. See [Trigger Modes](/work-with-devin/devin-review#trigger-modes) in the Devin Review docs for details. ## Managing your plan Admins can view and change the account's plan from [Settings > Plans](https://app.devin.ai/settings/plans). From there you can: * Upgrade or downgrade between Free, Pro, Max, and Teams * Add or cancel Teams full seats * Purchase on-demand credits or configure auto-reload to replenish them automatically Past invoices are available to download from [Settings > Invoices](https://app.devin.ai/settings/invoices). For accepted payment methods and how to update your billing details, see [Plans and Usage](/desktop/accounts/usage). For tips on keeping consumption under control across all plans, see [Usage](/admin/billing/usage). # Usage Source: https://docs.devin.ai/admin/billing/usage How Devin meters work, what counts toward consumption, and how to keep usage under control This page explains how Devin's work is metered. The mechanics are the same regardless of pricing model. The only difference is the unit: * **Enterprise** customers consume **Agent Compute Units (ACUs)** against the volume in their order form. * **Self-serve** customers consume their plan's included quota first, then draw from prepaid **on-demand credits**. Throughout this page, "usage" refers to whichever unit applies to your account. ## What counts toward usage Usage accrues based on the work Devin actually performs in a session, including: * Number and complexity of actions Devin takes (planning, context gathering, task execution, browser actions, code execution, and so on) * Virtual machine time (typically a small fraction of total usage) ### Windows sessions Windows sessions consume approximately **9% more** usage than equivalent Linux (Ubuntu) sessions. ### macOS sessions [macOS sessions](/onboard-devin/environment/macos-support) currently consume the **same** usage as equivalent Linux (Ubuntu) sessions — there is no macOS surcharge. > [!NOTE] > > This is **promotional launch pricing** and is subject to change. Aside from the few units required to keep the Devin VM running, Devin will not consume usage when: * Waiting for your response * Waiting for a test suite to run * Setting up and cloning repositories ## Sleep and idle behavior When a session is idle, Devin goes to sleep. While sleeping, Devin does not consume usage. You can wake the session up at any time by sending another message. Devin sleeps automatically after 5 minutes of inactivity by default. Some sessions, such as those on Windows or GPU machines, may sleep after 30 minutes of inactivity instead. Enterprise customers can ask their Cognition account team to set a different timeout (between 5 and 120 minutes), which then applies to every session type. ## Managing usage effectively A number of variables affect how much Devin consumes: * Task complexity * Prompt quality (or specificity) * Size of context or codebase * Number of files being touched or modified * Session runtime * Length of conversation * Frequency of back-and-forth messaging A few tips to keep usage under control: * Delegate clearly scoped tasks with a well-defined end goal * Keep prompts and sessions short * Avoid asking Devin to do a lot of different tasks in the same session * Split big projects into sub-tasks across sessions and run them in parallel. The number of sessions you can run at once depends on your plan * On self-serve Pro, Max, or Teams plans, link an eligible ChatGPT Go, Plus, or Pro subscription and [use your ChatGPT plan](/admin/billing/chatgpt) so GPT model usage is billed there instead of your Devin quota These tips also tend to improve the quality of Devin's work, so it's a win-win. [Devin Coach](/enterprise/features/devin-coach) reinforces them automatically by flagging inefficient prompts in the input box before they're sent. Enterprise admins can additionally cap each member's monthly consumption with [usage policies](/enterprise/features/usage-policies). ## Frequently asked questions > [accordion] Does Devin consume usage while sleeping? > > No, Devin does not consume any usage while sleeping. > [accordion] Will Devin keep consuming while awake but idling? > > Devin sleeps automatically after 5 minutes of inactivity by default, so awake-but-idle time generally adds up to very little. > [accordion] How do I see how much I've consumed in a specific session? > > Any user can see per-session usage from [Session Insights](/product-guides/session-insights), regardless of pricing model. > [accordion] Where do I see my account's overall usage? > > * **Self-serve**: Current month's usage, quota remaining, and on-demand credit balance live at [Settings > Usage & limits](https://app.devin.ai/settings/usage). > * **Enterprise**: Enterprise and per-Organization ACU consumption are available from the [Consumption](https://app.devin.ai/settings/consumption) and [Consumption Analytics](https://app.devin.ai/settings/analytics?tab=consumption) pages in Enterprise and Organization Settings respectively. > [accordion] Can individual users see their own usage across the enterprise? > > Yes. If your enterprise enables [Personal Analytics](/enterprise/security-access/personal-analytics), users with the **View Personal Analytics** permission can see their own ACU consumption across every organization from the **My analytics** page in their settings. # Common Issues Source: https://docs.devin.ai/admin/common-issues Fix common Devin setup issues: disconnect existing GitHub or Slack connections from another Devin account, and allowlist Devin IP addresses. ## I'm unable to connect my GitHub.com organization If you're unable to set up your integration or seeing "Configure" next to the organization you want to connect, you or one of your teammates has likely already connected your GitHub organization to another Devin account. **You will need to disconnect the existing integration before you can connect to your Devin account.** ![GitHub error](https://mintcdn.com/cognitionai/ifLkKLaMB-vvINwf/images/gh-configure-blurred.png?fit=max\&auto=format\&n=ifLkKLaMB-vvINwf\&q=85\&s=e30f9d8a0c8e710665f6952c425c7ab0) You can disconnect the existing integration by following these steps: 1. Navigate to the Devin Enterprise or Organization with the active integration 2. Navigate to the Connections page at [https://app.devin.ai/settings/connections](https://app.devin.ai/settings/connections) 3. Select **GitHub** and click the connection to open its detail panel 4. Click "Disconnect connection" under **Danger zone** Alternatively, you can disconnect the integration via GitHub: 1. Go to the [GitHub Integration settings](https://github.com/settings/installations) 2. Navigate to Devin.ai Integration and click "Configure" 3. Scroll to the "Danger zone" section to uninstall the integration ![Devin](https://mintcdn.com/cognitionai/ifLkKLaMB-vvINwf/images/github5.png?fit=max\&auto=format\&n=ifLkKLaMB-vvINwf\&q=85\&s=fb11b5df393ff88878024ad076710493) ## I'm unable to connect my Slack organization If you're seeing an "Unable to proceed with request" error, it means that you or one of your teammates has already connected your Slack organization to another Devin organization. **You will need to disconnect the existing integration before you can connect your new organization.** ![Slack error](https://mintcdn.com/cognitionai/4bS8zUS864bCAPVt/images/slack-integration-error.png?fit=max\&auto=format\&n=4bS8zUS864bCAPVt\&q=85\&s=03e0526a1d2cf96b29c4aed8f7591bcc) You can disconnect the existing integration by following these steps: 1. Navigate to the Devin Enterprise or Organization with the active integration 2. Navigate to the Connections page at [https://app.devin.ai/settings/connections](https://app.devin.ai/settings/connections) 3. Select **Slack** 4. Open the **Manage** menu on the connection and click "Disconnect" If you're unable to disconnect or find the existing organization, please reach out to [support@cognition.ai](mailto:support@cognition.ai) ## IP Allowlisting If you need to allowlist Devin's services, please add the following IP addresses: * 100.20.50.251 * 44.238.19.62 * 52.10.84.81 * 52.183.72.253 * 20.172.46.235 * 52.159.232.99 * 4.204.199.103 * 140.232.64.0/26 (Please note: While we intend to keep this list static, it is possible these IPs may change in future updates.) ## Session Expiration Devin sessions can't be continued after 30 days. If you need to resume work after that window, start a new session and re-share any relevant context (for example: goals, requirements, key decisions, and any important files or links) so Devin can continue effectively. # Security at Cognition Source: https://docs.devin.ai/admin/security We want Devin to be a core contributor in your organization, and have prioritized security, data privacy and compliance to make it possible ## Security > [accordion] Secure Transmission and Encryption > > All data transmission is encrypted in transit and at rest. Production software is also routinely monitored via logging, error handling and monitoring dashboards of live metrics. Unusual application states (i.e. unusually high error rates, slowness, failures) trigger alerts which are quickly investigated by our team. > > Access to our cloud environment in AWS is granted on an as-required basis based on business roles and only a small number of employees or contractors are granted direct access to production systems. > [accordion] General Security Practices > > All employees and contractors are required to use multi-factor authentication on all main work applications. All employees and contractors also receive annual training about security best practices, including good password management and how to identify social engineering and phishing scams. > [accordion] Third-party audits and certification > > Cognition has been SOC 2 Type II certified since September 2024. As part of the SOC 2 audit, Cognition's auditors reviewed all of Cognition's security policies, procedures, internal and third party controls related to data security, privacy, processing integrity, confidentiality and availability. > > For more details about our security please visit our [Trust Center](https://trust.cognition.ai/). > [accordion] Vulnerability Disclosure Program > > If you have identified a potential security issue, we encourage you to share your findings with us. Please send your vulnerability reports to our security team at [security@cognition.ai](mailto:security@cognition.ai). ## Privacy & Intellectual Property > [accordion] How does Cognition use and process data run through and/or accessed by Devin? > > Cognition processes data based on the application Customers use to interact with Devin. Devin can be accessed via web application, integration with GitHub, or integration with Slack. For the web application, Cognition only processes data actively provided by the authorized user prompting Devin; for the GitHub and Slack integrations, the administrator installing the integration can review and manage all permissions granted to Devin. > > Cognition uses Customer data to: > > * Deliver, maintain and update services provided to the Customer per their configuration and type of Devin access (e.g. web application, integration with GitHub, or integration with Slack) to make sure the software is up-to-date and operational. > * Troubleshoot, prevent and resolve issues such as product-related issues, software bugs or security incidents to maintain service functionality and reliability. > [accordion] What data retention policy does Cognition maintain? > > Cognition only retains data processed through Devin for the duration of the relationship with a given Customer, unless otherwise specified by the Customers. > > Any Feedback Data and User Interaction Data are retained as long as needed and as determined by Cognition. > [accordion] How is your data used to improve Devin? > > By default, we may use your data for model training purposes to improve and enhance the Services. If you're on a paid plan, you can opt out at any time on the Data Controls settings page. After you opt out, your data will not be used for training and Zero Data Retention will be enabled with our model providers. On the Teams plan, only an administrator can exercise the opt-out. Devin can still learn to fit into your unique workflow via the [Skills](/product-guides/skills) feature. When you share Skills, Devin can become more reliable at working on your specific projects over time. > > If you are an Enterprise customer, we will never train on your data without your express prior written consent. Please refer to the terms in your agreement with Cognition for details. > [accordion] What are the main IP considerations regarding the output produced by Devin? > > The output — code, work product, or other — produced by Devin is considered the user’s intellectual property and can be used for the Customer’s commercial purposes, with the exception of using the output to train models that would attempt to reverse engineer and/or build a competing product to Devin. > [accordion] Integrating with GitHub > > When setting up the GitHub integration, users can select which repositories Devin can access, with permissions adjustable through GitHub's App Settings during and post-installation. > > For more details on the requested permissions and security considerations go to [GitHub Integration Guide](/integrations/gh). > [accordion] Integrating with Slack > > In Slack, Devin doesn’t read, process or store any data in your Slack instance other than the information provided when @Devin is tagged, initially prompted and when any additional information is provided within the Slack thread while the session is ongoing. > > For more details on the requested permissions and security considerations go to [Integration with Slack Guide](/integrations/slack). ## User Best Practices > [accordion] Devin Limitations > > While Devin’s performance is improving daily, it can still experience hallucinations, introduce bugs into code, or suggest insecure code or procedures. Like with any coding best practices, we recommend taking the appropriate precautions with the code written by Devin such as code reviews, enabling branch protections to ensure checks are enforced before Devin can merge any changes, and any practices currently adopted in your organization to review engineers’ work. > [accordion] Secrets > > You may need to provide Devin with credentials and keys such as passwords, API keys, cookies or other for authentication. In all cases we advise users to leverage our Secrets feature under the Settings page to share and store those credentials securely. > [accordion] Share Feedback > > We’re still learning and developing Devin to be a great AI software engineer, and our customers’ feedback is crucial for Devin’s development. We strongly encourage sharing feedback and feature requests directly with your Cognition account team or by emailing [support@cognition.ai](mailto:support@cognition.ai), and reporting incidents by emailing [security@cognition.ai](mailto:security@cognition.ai). # Essential Commands Source: https://docs.devin.ai/cli/essential-commands The must-know Devin CLI commands: starting and resuming sessions, cloud sessions, slash commands, and keyboard shortcuts. New to Devin CLI? Watch [Introducing Devin CLI](/cli/introducing-devin-cli) for a two-minute tour, then come back here for the commands you'll use every day. ## Starting Devin CLI By default, sessions happen in a REPL, a graphical terminal interface where you can chat back and forth and observe Devin's actions. ```bash theme={null} devin # Start interactive REPL (no prompt) devin -- your prompt here # Start REPL with initial prompt devin -p "prompt" # Single-turn, no REPL: print response to stdout and exit devin -p -- prompt words here # Same, using -- separator (still works) ``` > [!NOTE] > > Use `--` before your prompt so it is interpreted as a prompt and not a subcommand. > [!TIP] > > Single-turn mode (`-p`) is great for scripts and automations. > [!NOTE] > > Type `@` in the prompt input to open autocomplete for local files/directories. Selecting one adds it as context for your message. > [!TIP] > > You can paste images from your clipboard with **Ctrl+V**. Attached images appear in the input area and can be managed with **Left/Right** to navigate and **Backspace** to remove. ## Running shell commands Devin may run shell commands while working. If a command is still running after the default wait period, Devin moves it to the background and shows how long it waited along with the background shell ID. Devin can then continue working and check the command's output later. *** ## Modes Devin CLI has 5 built-in permission modes: **Normal**, **Accept Edits**, **Smart**, **Bypass**, and **Autonomous**, and 3 agent-modes: **Normal**, **Plan**, and **Ask**. For plan and ask, use `/plan` and `/ask`. > [accordion] Normal > > Auto-approves read-only tools within the current directory, and asks for permission for write/execute operations. > > ```bash theme={null} > /normal > # or > /mode normal > ``` > > This is the default mode. > [accordion] Accept Edits > > Auto-approves file edits within the workspace while still prompting for shell commands and other actions. We expect people to spend most of their time here. > > ```bash theme={null} > /accept-edits > # or > /mode accept-edits > ``` > [accordion] Smart > > Auto-approves file edits within the workspace like Accept Edits, and for every other action — shell commands, web fetches, MCP tools — a fast model decides whether it is safe to run without asking. Anything it does not judge clearly safe still prompts, and high-risk categories (package installs, mutating `git`, `rm`, `sudo`, destructive cloud CLI operations, sensitive files) always prompt. > > ```bash theme={null} > /smart > # or > /mode smart > ``` > > You can also start in smart mode: > > ```bash theme={null} > devin --permission-mode smart > ``` > > > [!NOTE] > > > > Smart mode is rolling out gradually, so it may not be available on your account yet. See [Smart Mode](/cli/reference/permissions#smart-mode) for the full behavior. > [accordion] Bypass > > > [!WARNING] > > > > Auto-approves **all** tool calls, including writes and shell commands. > > ```bash theme={null} > /bypass > # or > /mode bypass > ``` > > You can also start in bypass mode: > > ```bash theme={null} > devin --permission-mode bypass > ``` > > Aliases: `/yolo`, `/dangerous` > > > [!NOTE] > > > > Bypass mode **never** overrides organization-level permissions configured by your admin via [Team Settings](/cli/enterprise/team-settings). Admin-enforced deny and ask rules **always** take priority. > [accordion] Autonomous > > Roughly equivalent to Accept Edits in the current workspace, with the additional ability to run any shell command within an [OS-level sandbox](/cli/reference/configuration/config-file#sandbox) (to contain what those commands can actually touch). > > ```bash theme={null} > devin --sandbox --permission-mode autonomous > ``` > > Autonomous is the **only** permission mode available when running with `--sandbox`, and it is selected automatically — Normal, Accept Edits, Smart, and Bypass are hidden in sandbox sessions. > > In Autonomous mode... > > * You are prompted for **capabilities rather than commands**. > * Commands respect `Write` scopes and `Read(...)` deny rules via a filesystem sandbox. > * Commands prompt you when they try to connect to network resources. > > * Read-only operations within the current directory auto-approve. > > > [!NOTE] > > > > Autonomous relies on the sandbox for safety. Without `--sandbox`, the mode is unavailable — use Bypass if you want unattended execution without OS-level isolation. See [Bypass vs Autonomous](#bypass-vs-autonomous) below for a direct comparison. ### Bypass vs Autonomous Bypass and Autonomous both reduce approval prompts, but they rely on different safety mechanisms: | | Bypass | Autonomous | | - | - | - | | Requires `--sandbox` | No | Yes (only available in sandbox sessions) | | Shell commands | Auto-approved, unrestricted | Auto-approved, contained by the sandbox | | File writes via `edit`/`write` tools | Auto-approved anywhere | Still prompt (granting a scope expands the sandbox) | | Network access | Unrestricted | Filtered by the sandbox's [domain allow/deny lists](/cli/reference/configuration/config-file#sandbox) | | Respects admin [Team Settings](/cli/enterprise/team-settings) | Yes | Yes | Pick Bypass when you trust the agent with your whole machine. Pick `--sandbox` (which selects Autonomous) when you want unattended execution with OS-enforced limits on what files and domains the agent can touch. If you like the feel of bypass but want the agent to have its own computer, try cloud Devin! ## Session History Your conversation history is saved so you can resume a session later. ```bash theme={null} devin -c # Continue the most recent session in the current directory devin --continue devin -r # Pick from recent sessions devin --resume devin -r brisk-otter # Resume a specific session by ID ``` ## Devin Cloud Run Devin in the cloud instead of on your machine, and steer it from the same terminal. See [Cloud CLI](/cli/cloud) and [SSH](/cli/ssh). ```bash theme={null} devin --cloud # Start a cloud session devin --cloud -r https://app.devin.ai/sessions/… # Resume a cloud session by URL devin ssh # SSH into the session's VM ``` Inside a session, `/cloud` switches a fresh local session to the cloud, `/open` opens the cloud session in the web app (`/open desktop` for Devin Desktop), `/handoff` moves work between local and cloud, and `/archive` archives it. *** ## Slash Commands You can use these commands while in an active session. ### Navigation & Control | Command | Description | | - | - | | `/help` | See all available commands | | `/exit` or `/quit` | Exit the application | | `/clear` or `/new` | Clear conversation history (start fresh) | > [!TIP] > > You can also type `exit` or `quit` as plain text (without the `/` prefix) to exit. ### Mode Switching | Command | Description | | - | - | | `/mode` | Show current mode | | `/mode ` | Switch mode (`normal`, `accept-edits`, `smart`, `plan`, `bypass`; `autonomous` in sandbox sessions) | | `/normal` | Switch to Normal mode (default) | | `/accept-edits` | Switch to Accept Edits mode | | `/smart` | Switch to Smart mode | | `/plan` | Switch to Plan mode | | `/ask ` | Ask a question without making code changes (oneshot) | | `/bypass` | Switch to Bypass mode (aliases: `/yolo`, `/dangerous`) | ### Model Switching | Command | Description | | - | - | | `/model` | Show model selector | | `/billing` | Choose whether a provider plan, such as [your ChatGPT plan](/admin/billing/chatgpt), pays for its models (`/billing on`, `/billing off`) | ### Session Management | Command | Description | | - | - | | `/resume` | Open the interactive session picker: all sessions, newest first, with the project directory and age of each. `Alt+G` narrows the list to the current directory | | `/resume ` | Resume session by ID | | `/ls` | List recent sessions in current directory (alias: `/list-sessions`) | | `/ls --all` | List all sessions across all directories | | `/continue` | Resume most recent session | | `/continue ` | Resume session by ID | | `/rm-session ` | Irreversibly delete a session by ID | ### Workspace | Command | Description | | - | - | | `/workspace` | List workspace directories (alias: `/workspaces`) | | `/add-dir [path]` | Add an additional workspace directory. With no path, list the directories you have added | | `/undo-add-dir ` | Remove a workspace directory | ### Extensibility | Command | Description | | - | - | | `/hooks` | List all loaded hooks with their IDs, event types, and source paths | ### Account & System | Command | Description | | - | - | | `/login` | Authenticate with Devin | | `/logout` | Clear stored credentials and exit | | `/update` | Check for and install updates | | `/upgrade` | Upgrade your subscription plan | | `/bug` | Report a bug to the Devin CLI developers | | `/compact` | Force conversation compaction | > [!NOTE] > > If you installed Devin for Terminal via Homebrew, `/update` will direct you to use `brew upgrade devin` instead of performing a self-update. *** ## Keyboard Shortcuts Here are the most important keyboard shortcuts. See [Keyboard Shortcuts](/cli/reference/keyboard-shortcuts) for more shortcuts. | Shortcut | Description | | - | - | | `Shift+Tab` | Cycle between modes (Normal, Accept Edits, Smart, Bypass, Autonomous) | | `Ctrl+C` | Clear the draft (text and attachments); cancel the running agent when the draft is empty | | `Esc` | Cancel the running agent | | `Shift+Enter` | Insert a newline (multi-line input) | | `Ctrl+V` or `Shift+Insert` | Paste from clipboard | | `Ctrl+G` | Open external editor | | `Ctrl+O` | Open full-screen viewer for the thinking trace and full tool cards | | `@` | Mention files to add as context | # Quickstart Source: https://docs.devin.ai/cli/index Get up and running in 2 minutes with Devin CLI, a local command-line coding agent with deep Devin Cloud integration. **1. Install Devin CLI** > [tab] macOS / Linux / WSL > > ```bash theme={null} > curl -fsSL https://cli.devin.ai/install.sh | bash > ``` > [tab] Homebrew > > On macOS, install Devin CLI with [Homebrew](https://brew.sh): > > ```bash theme={null} > brew install --cask devin-cli > ``` > > To upgrade to the latest version later, run: > > ```bash theme={null} > brew upgrade --cask devin-cli > ``` > [tab] Windows > > Download and run the installer: > > * [x86\_64 (most Windows PCs)](https://static.devin.ai/cli/devin-updater-x86_64-pc-windows.exe) > * [ARM64 (Windows on ARM)](https://static.devin.ai/cli/devin-updater-aarch64-pc-windows.exe) > > Alternatively, open **PowerShell** and run: > > ```powershell theme={null} > irm https://static.devin.ai/cli/setup.ps1 | iex > ``` > > > [!WARNING] > > > > `irm` and `iex` are PowerShell commands. Do not run this in Git Bash or CMD — it will fail with "command not found". Use PowerShell for installation only. > > After installing, you can use Devin CLI from **PowerShell**, **Windows Terminal**, or **Git Bash**. > [tab] Devin Desktop > > Devin CLI is bundled with **Devin Desktop**. This installation method is available for **Legacy Windsurf Enterprise** and **Devin Enterprise** plans. > > **Admin setup:** For the Devin Desktop-bundled install, an admin must first enable the install option in Devin CLI team settings by toggling on **Install Devin CLI in Devin Desktop**. > > **User installation:** > > 1. Open Devin Desktop > 2. Open the Command Palette with `Cmd+Shift+P` > (macOS) or `Ctrl+Shift+P` > (Windows/Linux) > 3. Search for and run **Install Devin CLI** > > This adds the `devin` binary to your PATH so you can use it from any terminal. **2. Start coding** That's it! After you restart your terminal, enter a project directory and type `devin` to activate Devin CLI. Also try preloading the session with a prompt for automation: ```bash theme={null} devin -- check out this code and suggest a feasible, helpful feature ``` > [!TIP] > > You're ready to go. For must-know tips, see [Essential Commands](/cli/essential-commands), or watch [Introducing Devin CLI](/cli/introducing-devin-cli) for a quick tour. ## What's next? Devin CLI can implement new features, fix bugs, review code, answer questions, automate tasks, and more. > [card] [Essential Commands](/cli/essential-commands) > > Must-know commands and slash commands > [card] [Cloud CLI](/cli/cloud) > > Create, steer, and resume Devin Cloud sessions from your terminal > [card] [SSH](/cli/ssh) > > Open a shell on a cloud session's VM and forward ports > [card] [Models](/cli/models) > > Choose the right model for your task > [card] [Extensibility](/cli/extensibility/index) > > Connect MCP servers and skills > [card] [Command Reference](/cli/reference/commands) > > Explore all commands and flags *** ## Devin CLI vs. Devin Devin CLI and [Devin](/get-started/devin-intro) are separate tools designed for different workflows. **Devin CLI** is a local coding agent that runs directly in your terminal. It works with your local files and environment, giving you fast, interactive assistance right where you code. **Devin** is our cloud-based AI software engineer that runs in a virtual machine. It includes features like Playbooks, Secrets, Knowledge, and other capabilities that are not available in Devin CLI. > [!NOTE] > > Devin CLI does not yet support Knowledge, Playbooks, or Secrets from your Devin account. We're actively working on adding support for each of these and plan to roll them out soon. ![Devin CLI overview](https://mintcdn.com/cognitionai/aB0LGhNhil-hGeEB/images/cli/d4toverview.png?fit=max\&auto=format\&n=aB0LGhNhil-hGeEB\&q=85\&s=d7b5993614bc9d8f296d1f529b8f0393) # Introducing Devin CLI Source: https://docs.devin.ai/cli/introducing-devin-cli A two-minute video tour of Devin CLI: start a local coding agent in your terminal, hand work to Devin Cloud, and pick up PRs locally. Devin CLI is a local coding agent that runs in your terminal and connects to Devin Cloud. This short video shows what a typical session looks like. Introducing Devin CLI Ready to try it? Install in two minutes with the [Quickstart](/cli), then learn the [Essential Commands](/cli/essential-commands). # Subagents Source: https://docs.devin.ai/cli/subagents Delegate tasks to independent subagents in the Devin CLI that run in the foreground or background with their own profiles and permissions Subagents let the main agent spawn independent workers to handle subtasks. A subagent shares tools and codebase context with the parent, but operates in its own conversation chain -- it does not inherit the parent's conversation history. This is useful for tasks that benefit from focused, independent work -- like exploring a codebase, running tests, or implementing a feature in parallel. You can ask the agent to use subagents explicitly (e.g. "research how auth works in a subagent"), or the agent may decide to delegate on its own when it determines a task would benefit from independent work. In our measurements, **subagents** **both** **improve overall coding performance** **and** **reduce cost**. *** ## How Subagents Work When the agent spawns a subagent, it selects one of the available **subagent profiles** and chooses whether the subagent should run in the foreground or background. Subagents can run in two modes: > [card] Foreground > > Runs inline in your session. The parent agent pauses and waits for the subagent to finish before continuing. You can approve or deny tool calls as they come up. > [card] Background > > Runs in parallel while the parent agent continues working. The parent is automatically notified when the subagent completes. Unapproved tools are automatically denied. > [!NOTE] > > You do not see the subagent's raw output directly. When a subagent finishes, the parent agent reads the result and summarizes the key findings and actions for you. ### Subagent Cost Subagents run as their own agent sessions, each with its own context window and inference calls, so they consume cost independently of the parent. The parent's spend covers its own work; every subagent it spawns adds its own usage on top of that. > [!NOTE] > > On prompt-based plans, each subagent consumes additional credits, just like a user message does. The number of credits depends on the model the subagent uses, so tasks that spawn multiple subagents (or [nest](/cli/subagents#nesting-depth) them) consume more credits. Because cost scales with the number of subagents, tasks that fan out into many subagents (or [nest](#nesting-depth) them) cost more. Use subagents deliberately when the parallelism or focused context is worth the additional spend. *** ## Which Model Does a Subagent Use? Subagents do not all run on the model you picked in the model picker. Each profile decides where its model comes from: | Profile | Model used | Effect on quota / credits | | - | - | - | | `subagent_explore` | The **default subagent model** — chosen by the subagent router at spawn time unless an admin pins a model; not your model picker selection | Depends on the default subagent model, not your primary model's rate | | `subagent_general` | **The same model as the parent agent** — whatever you selected in the model picker (e.g. Claude Opus, GPT-5) | Same rate as the parent: a general subagent costs like a full extra session on your selected model | | Custom subagents | The `model` field in the definition file if set, otherwise the **default subagent model** | Depends on the model you pin | > [!WARNING] > > `subagent_general` inherits the parent's model. If you are running a premium model, every general subagent runs on that premium model too, with its own context window and inference calls — so a task that fans out into several general subagents multiplies your spend. Ask for an explore subagent (or a [custom subagent](#custom-subagents) with a cheaper `model:` pinned) when the work is research rather than code changes. The **default subagent model** is not a fixed model name — it resolves through a server-side router at spawn time, and an admin can override it (see below). With the default **Subagent router** setting, the router picks the first eligible model from an ordered list, so the resulting model can vary with your plan tier, model availability, and your organization's model policy. The routing list can change over time, so don't rely on a subagent always landing on a particular model. > [!NOTE] > > The CLI does not currently label which model a running subagent is using in the subagent panel. ### Influencing the Model There is no way to name a model for a subagent in a prompt — the `run_subagent` tool takes a *profile*, not a model. You have three levers: 1. **Ask for a profile in natural language.** Requesting an explore subagent ("research how auth works in an explore subagent") keeps the work on the default subagent model rather than your selected model. Asking for code changes gets you `subagent_general`, which runs on your selected model. 2. **Pin a model in a [custom subagent](#custom-subagents) profile.** `model:` in the definition file is the only way to run a *write-capable* subagent on a model other than the parent's. A [skill](/cli/extensibility/skills) that runs in a subagent can also set `model:` in its frontmatter to override the profile's model. 3. **Set your own default subagent model.** `agent.subagent_model` in your [config file](/cli/reference/configuration/config-file#agent) replaces the default subagent model for your sessions. It takes precedence over both the subagent router and a model an admin pinned as the team default; it does not re-enable subagents when the admin setting is **None**: ```json theme={null} // ~/.config/devin/config.json { "agent": { "subagent_model": "swe-1-6-fast" } } ``` It applies to `subagent_explore` and to custom subagents that don't pin a `model:`; `subagent_general` still follows the parent agent's model. The model must be one your organization allows, otherwise the setting is ignored and the team default is used. It applies to new sessions. ### Enterprise Controls Administrators can govern which model subagents use — and whether subagents run at all — through the **Default subagent model** setting in the org/enterprise settings. This setting controls the model for `subagent_explore` and for custom subagents that don't pin a `model:` — it does not change `subagent_general`, which always follows the parent agent's model. ![Default subagent model setting](https://mintcdn.com/cognitionai/d7_AE5155dfGCsnK/images/cli/default-subagent-model-setting.png?fit=max\&auto=format\&n=d7_AE5155dfGCsnK\&q=85\&s=e924249f64bf6ac6e0ffcf59b289aeb3) It has three choices: | Option | Behavior | | - | - | | **Subagent router (default)** | The default subagent model is chosen by a server-side router at spawn time. The selected model depends on your plan tier, model availability, and the models your organization permits. | | **A specific model** | Pins the default subagent model to the selected model, for every subagent that doesn't run on the parent's model. | | **None** | Disables subagents entirely — Devin will not spawn any subagents. | *** ## Enabling and Disabling Subagents Subagents are on by default. Set `subagents_enabled` to `false` in your [config file](/cli/reference/configuration/config-file#subagents_enabled) to remove the `run_subagent` and `read_subagent` tools so the agent does everything itself: ```json theme={null} // ~/.config/devin/config.json { "subagents_enabled": false } ``` The change applies live — a running session picks it up without restarting. In Devin Desktop, the same capability is the **Subagents (Preview)** toggle in settings. > [!NOTE] > > Organization policy wins: if an admin has set **Default subagent model** to **None**, subagents stay disabled no matter what this setting says. *** ## Subagent Profiles Each subagent runs with a specific profile that determines its capabilities. There are two built-in profiles: | Profile | Description | Tool Access | Model | | - | - | - | - | | `subagent_explore` | Read-only codebase exploration and research | Read-only codebase tools plus web search; cannot edit files or fetch arbitrary URLs (regardless of foreground or background) | Default subagent model (router-selected unless an admin pins one) | | `subagent_general` | General-purpose tasks including code changes | Full tool access (foreground) or pre-approved tools only (background) | Same model as the parent agent | > [!NOTE] > > The agent automatically chooses the appropriate profile based on the task. Explore subagents are ideal for research and understanding, while general subagents can make changes. See [Which Model Does a Subagent Use?](#which-model-does-a-subagent-use) for how each profile picks its model — the two profiles do **not** run on the same model. You can also define your own custom subagent profiles — see [Custom Subagents](#custom-subagents) below. *** ## Tool Permissions How tool permissions work depends on whether the subagent is running in the foreground or background: * **Foreground subagents** behave like the main agent -- you are prompted to approve or deny tool calls as usual. The prompt names the subagent that requested the action, so you know who is asking. * **Background subagents** inherit any tool permissions you have already granted during the current session. Any tool that has not been pre-approved is automatically denied. Background subagents cannot prompt you for new permissions. > [!TIP] > > If a background subagent fails because a required tool was denied, you can resume it in the foreground to approve the necessary permissions. See [Resuming Subagents](#resuming-subagents) below. *** ## Monitoring Subagents ### Subagent Indicator When background subagents are running, an indicator appears below the input area showing their status. You can navigate to the indicator by pressing ↓ from the input area, then press Enter to open the subagent panel. When a foreground subagent is running, the spinner displays **"Subagent running · Ctrl+B to run in background"**. ### Subagent Panel The subagent panel lets you view and manage all active and completed subagents. It shows each subagent's profile, title, status, elapsed time, and tool call count. Subagent activity survives a session reload, so the panel still reflects your subagents after resuming. *** ## Foreground / Background Switching You can move subagents between foreground and background while they're running: * **Background a foreground subagent:** Press Ctrl+B while a foreground subagent is running. The subagent continues working in the background, and the parent agent resumes. * **Foreground a background subagent:** Open the subagent panel and press f on a running background subagent. The subagent's output will display inline. > [!NOTE] > > When you move a subagent to the background, the parent agent's tool call has already returned, so the parent continues independently. The subagent's result won't feed back into the parent's current pipeline, but you'll be notified when it completes. *** ## Interrupting a Turn Interrupting the agent does not kill its subagents. Running subagents **park** with their state intact and resume on your next message, so an interruption to redirect the parent agent doesn't throw away work in flight. *** ## Cancelling Subagents You can cancel a running subagent in two ways: 1. **From the subagent panel:** Open the panel and press x on a running subagent. 2. **Foreground subagent:** Press Ctrl+C with an empty input, or Esc twice, to cancel the currently running foreground subagent. With a non-empty draft, Ctrl+C clears the draft first. *** ## Resuming Subagents Cancelled, failed, or completed subagents can be resumed with a new prompt. You can ask the agent to resume a subagent, and it will continue where it left off. Resumed subagents always run in the **foreground**, so you can approve any tool calls that were previously denied. This is especially useful when: * A background subagent failed because a required tool was denied -- resume it in the foreground to grant the necessary permissions. * A subagent completed but you want it to do additional follow-up work based on its findings. * A subagent was cancelled prematurely and you want it to continue. *** ## Nesting Depth By default, subagents cannot spawn their own subagents — only the root agent can. Subagent tools (`run_subagent` and `read_subagent`) are disabled inside a subagent to prevent unbounded nesting. However, **custom subagent profiles** can opt in to nested spawning by setting the `max-nesting` field in their frontmatter. This value overrides the default maximum depth, allowing subagents to spawn children as long as the tree stays within that limit. For example, `max-nesting: 3` allows the following chain: ``` Root agent (depth 0) └── Custom subagent (depth 1) — can spawn children └── Child subagent (depth 2) — can spawn children └── Grandchild subagent (depth 3) — cannot spawn (depth limit reached) ``` > [!WARNING] > > Nested subagents can increase cost significantly. Each level of nesting spawns additional agents with their own context windows and inference calls. Use this feature deliberately. *** ## Custom Subagents > [!WARNING] > > Custom subagents are **experimental**. The format, behavior, and configuration options may change in future releases. Beyond the built-in `subagent_explore` and `subagent_general` profiles, you can define your own custom subagent profiles. Custom subagents let you create specialized workers with their own system prompts, tool restrictions, and model overrides — tailored to specific tasks in your workflow. This is also the way to get a write-capable subagent that does **not** run on your (possibly expensive) primary model: give it a `model:` and the tools it needs. ### Creating a Custom Subagent Custom subagents are defined as markdown files under `agents/`, using either layout: * **Flat file** — `agents/.md` (the same convention used by Claude Code, Cursor, and other tools). The file name (without `.md`) becomes the profile's identifier. * **Directory** — `agents//AGENT.md`. The directory name becomes the profile's identifier. `AGENTS.md`, `agent.md`, and `agents.md` are also accepted as the file name (if multiple are present, `AGENT.md` takes precedence, then `AGENTS.md`, `agent.md`, `agents.md`). In both layouts, a `name:` in the frontmatter overrides the identifier derived from the path. > [tab] Project-specific > > ```text theme={null} > .devin/agents/ > ├── reviewer.md > └── researcher/ > └── AGENT.md > ``` > > Also supported: > > ```text theme={null} > .agents/agents/ > ├── reviewer.md > └── researcher/ > └── AGENT.md > ``` > [tab] Global > > ```text theme={null} > # Linux/macOS > ~/.config/devin/agents/ > ├── reviewer.md > └── researcher/ > └── AGENT.md > > # Windows > %APPDATA%\devin\agents\ > ├── reviewer.md > └── researcher\ > └── AGENT.md > ``` ### Definition File Format A subagent definition file uses the same YAML frontmatter as skills, followed by the subagent's system prompt: ```markdown theme={null} --- name: reviewer description: Reviews code changes for correctness and style model: sonnet allowed-tools: - read - grep - glob - exec --- You are a code review subagent. Your job is to review code changes thoroughly and report findings back to the parent agent. Focus on: 1. Correctness — logic errors, edge cases, off-by-one mistakes 2. Security — potential vulnerabilities 3. Style — consistency with the rest of the codebase 4. Performance — obvious inefficiencies Always cite specific file paths and line numbers in your findings. ``` ### Frontmatter Fields | Field | Type | Default | Description | | - | - | - | - | | `name` | string | file or directory name | Identifier for the profile (must not conflict with built-in profiles) | | `description` | string | none | Shown to the agent when selecting a profile | | `model` | string | default subagent model (router-selected unless an admin pins one) — **not** the parent's model | Override the model used by this subagent | | `allowed-tools` | list | all tools | Restrict which tools the subagent can use. Cannot grant `ask_user_question`, which is always withheld from subagents. The alias `tools` is also accepted. | | `max-nesting` | integer | none | Override the maximum nesting depth, allowing this subagent to spawn its own subagents | ### How Custom Subagents Are Used Once defined, custom subagent profiles appear alongside the built-in ones. The agent sees a description of each available profile and chooses the most appropriate one when spawning a subagent. You can also ask the agent to use a specific profile by name (e.g., "review this code using the reviewer subagent"). Custom subagent profiles that conflict with a built-in profile name (e.g., `subagent_explore`, `subagent_general`) are skipped with a warning. ### Examples #### Read-Only Research Agent ```markdown theme={null} --- name: researcher description: Deep codebase research and architecture analysis model: sonnet allowed-tools: - read - grep - glob --- You are a research subagent specializing in codebase exploration. Your job is to thoroughly investigate a topic and report back with: - Relevant files and their purposes - Architecture patterns and dependencies - Code flow traces with specific line references Be exhaustive — search broadly and follow references. ``` #### Test Runner Agent ```markdown theme={null} --- name: test-runner description: Runs tests and reports results allowed-tools: - read - grep - glob - exec --- You are a test runner subagent. Run the relevant test suites and report: - Which tests passed and failed - Failure messages and stack traces - Suggestions for fixing failures ``` # Devin Outposts orchestration guide Source: https://docs.devin.ai/cloud/outposts/orchestration Build a Devin Outposts orchestrator for your own infrastructure: watch the queue, claim sessions, provision machines, and run workers automatically. An orchestrator watches the outposts API for sessions waiting on an outpost, provisions a VM or container for each one, and starts the worker inside it. This page describes the orchestration loop: polling the queue, claiming sessions, running workers, and tearing machines down. If you just want to serve sessions from a machine you already have, start with the [quickstart](/cloud/outposts/quickstart) — no orchestrator is required. If you run on a supported platform, an [integration](/cloud/outposts/overview#integrations) may already implement this loop for you. For the full API and CLI surface, see the [reference](/cloud/outposts/reference). > [!NOTE] > > Running on Kubernetes? [devin-outpost-k8s](https://github.com/CognitionAI/devin-outpost-k8s) > is an open-source operator that implements this loop for you: it watches the > queue, claims pending sessions, and runs each one as a worker pod on any > certified cluster (GKE, EKS, ...). Install it with its Helm chart instead of > building your own orchestrator. ## The core flow ### 1. Register an outpost An outpost is a named queue of sessions served by many workers on your infrastructure (for example, `rhel`, `gpu-h200`, or `my-outpost`). Create one with `devin worker outpost create`: ```bash theme={null} devin worker outpost create --platform --description "..." ``` Once registered, the outpost appears as a machine option in Devin Cloud (alongside Ubuntu, Windows, etc.) when starting a session. Sessions targeting it wait in its queue until a worker claims them. > [!NOTE] > > In the fleet API, outposts are represented as `outposts` resources, scoped to > your account (shared across all of its organizations). See the > [outposts endpoints](/cloud/outposts/reference#outposts). ### 2. Watch the fleet API for waiting sessions Your orchestrator lists pending sessions for the outposts it serves: ```bash theme={null} curl -H "Authorization: Bearer $DEVIN_API_TOKEN" \ "https://api.devin.ai/opbeta/outposts/devins?outpost=&phase=pending" ``` Then it keeps its view current with a Server-Sent Events (SSE) watch, resuming from the list's final cursor: ```bash theme={null} curl -N -H "Authorization: Bearer $DEVIN_API_TOKEN" \ "https://api.devin.ai/opbeta/outposts/devins?outpost=&watch=true&cursor=" ``` This is the standard Kubernetes-style list-then-watch pattern: page through the list with the response cursor, then start a watch from where the list left off, persisting each event's cursor so you can reconnect without missing changes. Delivery is at-least-once, so upsert by `metadata.session_id` and tolerate duplicates. See [List queued sessions](/cloud/outposts/reference#list-queued-sessions) and [Watch for changes](/cloud/outposts/reference#watch-for-changes) for query parameters, response shapes, and full pagination semantics. ### 3. Claim before provisioning Before starting a machine for a session, atomically claim it so no other worker picks it up. Pass an `acceptor_id` — a self-reported identity for your worker: ```bash theme={null} curl -X POST -H "Authorization: Bearer $DEVIN_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{"acceptor_id": "worker-1"}' \ "https://api.devin.ai/opbeta/outposts/devins/{session_id}/claim" ``` Claims are atomic: if another worker claimed the session first, you get a `409`. Claiming promises that a worker will be ready within the server-assigned claim deadline (`status.claim_deadline`); expired claims return to the queue automatically. If provisioning fails, [release the claim](/cloud/outposts/reference#release-a-claim) so the session returns to the queue immediately. ### 4. Spawn a machine and run the worker For each claimed session, provision a VM or container from your image. Inside it, run the worker from the directory you want the session to work in — its repositories live in that directory's `repos` subdirectory, i.e. `$(pwd)/repos/`: ```bash theme={null} cd /path/to/worker/directory devin worker start --session= --outpost= --acceptor-id= ``` Pass the same `--acceptor-id` you used for the API claim, and provide the token via `--token` or `DEVIN_OUTPOSTS_TOKEN` (see the [full flag list](/cloud/outposts/reference#devin-worker-start)). The worker connects out to Devin's cloud, marks the session ready, and begins executing tool calls. ### 5. Terminate the machine when the worker exits When `devin worker start` exits, the session is over (or has been suspended). Terminate the VM or container. If your outpost is resumable, snapshot the machine before terminating so you can restore it if the session resumes. #### Directories to persist A suspended session can resume later, and it expects to find its files where it left them. Restore these directories before you start the worker for a resumed session: | Directory | Default location | Contents | | - | - | - | | Worker working directory | The directory `devin worker start` runs in | The `repos/` checkouts and any files the session created | | Worker data directory | `~/.devin/worker`. If you set `--cache-dir`, it is that directory's parent instead (`/mnt/devin` for `--cache-dir=/mnt/devin/cache`) | Per-session state under `sessions/` and the worker identity | Snapshotting the whole machine covers both. If you persist only part of the filesystem (for example a home-directory volume), make sure both directories are on it, and start the worker in the same working directory on resume. When a session starts, Devin writes a small stamp file for it in each of these directories: `.devin-outpost-stamps/` in the working directory and `outpost_stamp` in the session's state directory. If a stamp is missing when the session resumes, the directory was not persisted, and Devin posts a warning in the session naming it. A resume that starts from an empty machine is not suitable for production: the session loses its checkouts, uncommitted work, and installed dependencies. Your orchestrator can track its claimed sessions and their states: ```bash theme={null} curl -H "Authorization: Bearer $DEVIN_API_TOKEN" \ "https://api.devin.ai/opbeta/outposts/devins?phase=claimed&acceptor_id=worker-1" ``` Each entry reports a `status.session_status` of `pending`, `running`, `suspended`, or `terminated`. ## Centralization-free scheduling > [!NOTE] > > Planning to run more than \~16 coordinators (workers or orchestrators > watching and claiming from an outpost)? Contact your account team first — larger > fleets amplify claim contention and queue read load, and we want to make > sure the outpost is provisioned for it. You don't need a central scheduler to run a fleet. The queue API is designed so that many independent workers can serve the same outpost without talking to each other: * **Claims are the only coordination primitive.** Every worker independently watches the queue and races to claim pending sessions. The claim is an atomic compare-and-swap on the server: exactly one worker wins, and every loser gets a `409` and simply moves on to the next pending session. Losing a claim race is normal operation, not an error. * **Each worker has its own identity.** The `acceptor_id` scopes a worker's claims, renewals, and restart recovery to that worker alone. `devin worker start` generates and persists one automatically per machine, so a fleet needs no identity configuration. Never share an acceptor ID (or a copied worker data directory) across machines — colliding workers will steal each other's claims. * **Failures self-heal.** If a worker dies after claiming, its claim expires at the claim deadline and the session returns to the queue for another worker to pick up. No fleet-level health tracking is required. This means scaling out is just running the worker on more machines pointed at the same outpost: N machines serve N concurrent sessions, and the rest wait as pending. ## Building a custom orchestrator Everything `devin worker start` does is available directly through the fleet API, so you can replace the CLI entirely: fetch the `devin-remote` binary from Devin's static distribution and launch it yourself with the documented environment. See [Remote binary distribution](/cloud/outposts/reference#remote-binary-distribution) and the [spawn contract](/cloud/outposts/reference#spawn-contract) in the reference. # Devin Outposts: self-hosted infrastructure Source: https://docs.devin.ai/cloud/outposts/overview Learn how Devin Outposts runs sessions on your own infrastructure, including self-hosted workers, networking, machine setup, and partner integrations. Outposts lets you run Devin sessions inside infrastructure you control — your own VMs, containers, Kubernetes clusters, or even a Mac Mini on your desk. Devin's agent loop (inference and planning) continues to run in Devin's cloud, while all command execution, file edits, and repository access happen on machines you operate. Use Outposts when you need: * Sessions to run inside your network, next to internal services, registries, and secrets * Custom hardware profiles (e.g. GPUs, large memory machines, specific OS images) * Existing dev box, VM, or Kubernetes infrastructure to host Devin workloads * Enterprise controls over network access, build outputs, and monitoring ![Devin's agent loop and the outpost queue run in Devin Cloud; your machines — a GPU box in your lab, a VM in your VPC, or a Mac mini on your desk — serve sessions over an outbound-only connection](https://mintcdn.com/cognitionai/xlfcZs3jVVOLjL3w/images/onboard-devin/outposts/outposts-diagram.png?fit=max\&auto=format\&n=xlfcZs3jVVOLjL3w\&q=85\&s=798dd3f1d9ce57eb530b1c6d7d9e5b4b) ## How it works An **outpost** is a named queue of Devin sessions to be served on your own machines. Once you register an outpost (e.g. `gpu-h200` or `dev-boxes`), it appears as a machine option in Devin Cloud alongside Ubuntu, Windows, etc. — Cloud sessions started on an outpost wait in its queue until one of your machines picks them up. Every machine that serves sessions from an outpost is a **worker**. To turn a machine into a worker, install the [Devin CLI](/work-with-devin/devin-cli) and run: ```bash theme={null} devin worker start --outpost= ``` The worker opens an outbound connection to Devin's cloud and watches the outpost's queue. When a session is waiting, the worker claims it and executes its tool calls locally — every command, file edit, and repository operation runs on your machine. When the session ends, the worker goes back to watching the queue for the next session. Scaling out is just running the worker on more machines: N workers serve N concurrent sessions, and any further sessions wait in the queue until a worker becomes available. Workers only need **outbound** HTTPS access. No inbound ports, public IPs, or VPN tunnels are required. ### Starting sessions on an outpost Pick the outpost under **Configuration → Virtual environment** when starting a session in Devin Cloud (see the [Quickstart](/cloud/outposts/quickstart)), or from [Slack](/integrations/slack) with the `!outpost` bang command: ``` @Devin !outpost gpu-h200 profile the training loop and fix the slowest kernel ``` `!outpost ` accepts the outpost's exact name, a unique prefix of it (`!outpost gpu` when `gpu-h200` is the only match), or its ID. Send `!outpost` on its own to get the list of outposts you can use. To run new sessions on a shared outpost by default, an admin can make it the organization default under **Settings → Devin → Default platform**, or with the [Set Organization Default Platform](/api-reference/v3/organization-settings/put-organization-default-platform) API. [Get Organization Default Platform](/api-reference/v3/organization-settings/get-organization-default-platform) returns the current default. ### Orchestration Long-lived worker machines are the simplest setup, but with the Outposts API you can also write an **orchestrator**: software that watches the outpost's queue and, for each waiting session, spins up a fresh VM or container, starts the worker inside it, and tears the machine down when the session ends. See [Orchestration](/cloud/outposts/orchestration) to learn how, deploy [devin-outpost-k8s](https://github.com/CognitionAI/devin-outpost-k8s) — our open-source operator that runs the loop on any Kubernetes cluster — or run on a partner platform that already implements it for you (see [Integrations](#integrations)). ## Machine dependencies Sessions execute directly on your machines, so the worker relies on tools you install there. | Dependency | Required | Used for | | - | - | - | | `git` (on `PATH`) | Yes | Cloning and all repository operations | | `ffmpeg` (on `PATH`) | No | Devin's screen-recording features. Without it, sessions cannot record the screen. | | Chrome or Chromium | No | Browser and computer-use features. The worker looks for Chrome in standard install locations by default; set `DEVIN_CHROME_PATH` in the worker's environment to the absolute path of the binary to override (e.g. `DEVIN_CHROME_PATH=/usr/bin/google-chrome`). Without it, browser tools are unavailable. | | Graphical desktop / display | No | [Computer Use](/work-with-devin/computer-use#computer-use-on-outposts) (mouse, keyboard, screenshots). Linux machines need a running X session (`DISPLAY` set for the worker, e.g. Xvfb); macOS machines use the existing desktop session and need the **Screen Recording** (screenshots) and **Accessibility** (input) permissions granted to the worker. Without a display, computer actions return a clear error. | | Passwordless `sudo` | No | Lets Devin install software it needs during a session (e.g. missing build tools or system packages). Only grant this when the machine is dedicated to Devin and recycled after each session — never on shared or long-lived machines. | ## Get started > [card] [Quickstart](/cloud/outposts/quickstart) > > Create an outpost and serve sessions from a single machine with `devin worker start` — no orchestrator required. > [card] [Orchestration](/cloud/outposts/orchestration) > > Scale to a fleet: poll the queue, claim sessions, provision machines, and run workers automatically. > [card] [Reference](/cloud/outposts/reference) > > The full surface area: CLI commands and flags, fleet API endpoints, binary distribution, and the spawn contract. ## Integrations Partner platforms implement the orchestration loop for you — sessions run on their infrastructure with no worker to run and no orchestrator to build. Each partner documents its own setup: | Platform | What you get | Docs | | - | - | - | | ![](https://mintcdn.com/cognitionai/xlfcZs3jVVOLjL3w/images/onboard-devin/outposts/logos/namespace.svg?fit=max\&auto=format\&n=xlfcZs3jVVOLjL3w\&q=85\&s=68efa1dc7c7fd54050b64dd78cac12eb) Namespace | First-class macOS environments on Apple silicon — with computer use, Devin builds, runs, and tests iOS apps end to end | [Devin Outposts on Namespace](https://namespace.so/docs/devbox/devin) | | ![](https://mintcdn.com/cognitionai/xlfcZs3jVVOLjL3w/images/onboard-devin/outposts/logos/modal.svg?fit=max\&auto=format\&n=xlfcZs3jVVOLjL3w\&q=85\&s=c4d687cff2da6b23ea3981b1265a07d0) Modal | The same infrastructure you train and serve models on — reproduce failures and profile fixes on production hardware, scaling back to zero. See [Post-train custom models with Devin and Modal](/tutorial-library/post-training-modal) | [Devin Outposts on Modal](https://modal.com/docs/devin) | | ![](https://mintcdn.com/cognitionai/xlfcZs3jVVOLjL3w/images/onboard-devin/outposts/logos/nvidia.svg?fit=max\&auto=format\&n=xlfcZs3jVVOLjL3w\&q=85\&s=d8c579390aae20eaca2df6e54be32418) OpenShell | A sandbox for every session via the OpenShell runtime — from a single VM to a GPU cluster, built for secure and government environments | [Devin Outposts on NVIDIA OpenShell](https://github.com/NVIDIA/OpenShell#supported-agents) | | ![](https://mintcdn.com/cognitionai/xlfcZs3jVVOLjL3w/images/onboard-devin/outposts/logos/nvidia.svg?fit=max\&auto=format\&n=xlfcZs3jVVOLjL3w\&q=85\&s=d8c579390aae20eaca2df6e54be32418) Brev | GPU instances on NVIDIA Brev, deployed as a one-click Launchable | [Devin Outposts on NVIDIA Brev](https://brev.nvidia.com/launchable/deploy?launchableID=env-3Ge1ZXazlZQuJHfQed2od9IT8R5) | | ![](https://mintcdn.com/cognitionai/xlfcZs3jVVOLjL3w/images/onboard-devin/outposts/logos/daytona.svg?fit=max\&auto=format\&n=xlfcZs3jVVOLjL3w\&q=85\&s=67c487847268e21d4b4c75fe01814d0f) Daytona | Linux and Windows sandboxes that start in under 90 ms from snapshots — repos, dependencies, and toolchains already in place | [Devin Outposts on Daytona](https://www.daytona.io/docs/en/guides/devin/devin-outposts/) | | ![](https://mintcdn.com/cognitionai/xlfcZs3jVVOLjL3w/images/onboard-devin/outposts/logos/e2b.svg?fit=max\&auto=format\&n=xlfcZs3jVVOLjL3w\&q=85\&s=aee41e9fcae325e8f0fb06217f8d4f3b) E2B | Agent machines at any CPU/RAM configuration with sub-second starts — including access to your private cloud | [Devin Outposts on E2B](https://e2b.dev/docs/agents/devin-outposts) | | ![](https://mintcdn.com/cognitionai/xlfcZs3jVVOLjL3w/images/onboard-devin/outposts/logos/cloudflare.svg?fit=max\&auto=format\&n=xlfcZs3jVVOLjL3w\&q=85\&s=621bf440c8f74760d0a4ee40d5fc432c) Cloudflare | An isolated sandbox per session, with traffic flowing through customizable proxies and private connectivity to internal services — no VPN or public exposure | [Devin Outposts on Cloudflare](https://developers.cloudflare.com/sandbox/tutorials/devin-outposts/) | ## Limitations * Devin Outposts is available on all Pro, Max, and Teams accounts. * Devin Outposts is also available on [Dedicated Tenant deployments](/enterprise/deployment/overview) but is off by default, since a few Devin features behave differently when agents run on customer-managed infrastructure. Your account team can go over the details and enable it. * Outposts shifts significant infrastructure and operational responsibility to the customer. Teams must secure and operate their remote development VMs at scale, including provisioning, isolation, access controls, capacity management, monitoring, and recovery. For security-conscious customers, we recommend [Dedicated Tenant (Dedicated SaaS)](/enterprise/deployment/overview), which provides a customer-isolated environment with security and orchestration managed by Cognition. # Devin Outposts partner integrations Source: https://docs.devin.ai/cloud/outposts/partners Connect Devin Outposts to your own infrastructure through a partner integration using PKCE, admin authorization, and secure server-to-server tokens. > [!NOTE] > > Rough notes — this flow is in early development and the details below may > change. Partner platforms (e.g. compute providers) can connect an outpost on behalf of a customer. The customer's Devin admin authorizes the connection in the browser; Devin then creates an outpost and a service user and hands the partner a token to run workers against the outpost. The flow is an OAuth-light authorization-code exchange with [PKCE](https://datatracker.ietf.org/doc/html/rfc7636). The browser only ever carries a short-lived, single-use **code** — the service-user token is exchanged server-to-server and never transits the browser. ## Prerequisites * **Callback allowlist.** Every `callback_url` you use must be on Devin's allowlist for your integration. This is configured by Cognition — send us the exact URLs ahead of time. A URL that is not on the list is rejected. * **Outposts enabled.** The customer's account must have Outposts enabled. * **Admin authorization.** Authorizing a connection requires a Devin admin with both enterprise-settings and service-user management rights. The partner never needs a Devin token — the admin authorizes it in their own browser session. ## Flow overview ``` Partner backend Admin's browser Devin │ │ │ │ 1. gen code_verifier, │ │ │ derive code_challenge │ │ │ 2. redirect to app.devin.ai/outposts/connect?…code_challenge│ │───────────────────────────────> │ │ │ 3. admin confirms, "Connect"│ │ │──────confirm connection──────> │ │ 4. redirect callback_url?code=… │ │<─────────────────────────────── │ │ 5. POST /outposts/connection-token (code + code_verifier) │ │────────────────────────────────────────────────────────────> │ 6. { access_token, api_base_url, … } │ │<──────────────────────────────────────────────────────────── │ 7. run outpost workers with access_token │ ``` ### 1. Generate a PKCE verifier and challenge On your backend, per connection attempt: * Generate a high-entropy, random **`code_verifier`**: 43–128 characters from the unreserved alphabet `[A-Za-z0-9-._~]` (e.g. `base64url(random 32 bytes)` with padding stripped). * Derive the **`code_challenge`** as the unpadded base64url of the SHA-256 of the verifier (PKCE "S256"): ```python theme={null} import base64, hashlib, secrets code_verifier = secrets.token_urlsafe(32) # 43+ chars, unreserved alphabet code_challenge = ( base64.urlsafe_b64encode(hashlib.sha256(code_verifier.encode()).digest()) .rstrip(b"=") .decode() ) ``` Store the `code_verifier` server-side (keyed to whatever state you use to correlate the eventual callback). Never send the verifier to the browser — only the challenge leaves your backend. ### 2. Redirect the admin to the connect page Send the customer's admin to Devin's connect page with the challenge and your callback: ``` https://app.devin.ai/outposts/connect ?callback_url=https://partner.example.com/devin/outpost-callback &outpost_name=my-outpost &outpost_image=https://partner.example.com/logo.png &platform=linux &code_challenge= ``` | Param | Required | Notes | | - | - | - | | `callback_url` | yes | Where Devin relays the one-time code. Must be on your allowlist. | | `code_challenge` | yes | The PKCE S256 challenge from step 1. | | `outpost_name` | no | Suggested outpost name. The admin can edit it before confirming. | | `outpost_image` | no | URL of a PNG icon used to represent the outpost, such as your company logo. | | `platform` | no | Preselected outpost platform: `macos`, `linux`, or `windows`. The admin can change it. | If the admin isn't signed in, the connect page stashes these params and prompts them to sign in first, then resumes. ### 3. Admin confirms The connect page shows a confirmation with an editable outpost name and platform (and your `outpost_image` if provided). When the admin clicks **Connect**, Devin validates permissions, the callback allowlist, and that the outpost name is free, stores an encrypted, single-use code (10-minute TTL), and redirects back to your app with the one-time code. No outpost or service user exists yet — they are created only when the code is redeemed (step 5). An unredeemed code simply expires. ### 4. Devin redirects the code to your callback The browser is redirected to your `callback_url` with the code appended: ``` https://partner.example.com/devin/outpost-callback?code= ``` ### 5. Exchange the code server-to-server From your backend, look up the `code_verifier` you stored in step 1 and redeem the code at the token endpoint. This is a form-encoded, OAuth-style token request: ```bash theme={null} curl -X POST "https://api.devin.ai/outposts/connection-token" \ -H "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "grant_type=authorization_code" \ --data-urlencode "code=" \ --data-urlencode "code_verifier=" ``` This endpoint needs no Devin auth — possession of the code plus the matching PKCE verifier is the proof. It is unauthenticated on purpose: the code is single-use (atomically consumed), short-lived, and bound to your challenge. ### 6. Receive the credentials On success Devin creates the outpost and a service user scoped to run the outpost worker, and returns: ```json theme={null} { "outpost_id": "...", "account_id": "...", "outpost_name": "my-outpost", "service_user_id": "...", "api_base_url": "https://api.devin.ai", "access_token": "cog_...", "token_type": "bearer" } ``` Responses carry `Cache-Control: no-store` — do not cache them. ### 7. Run outpost workers Store `access_token` and `api_base_url` securely and use the token as a bearer credential to run outpost workers against the outpost. ## Error handling The token endpoint follows [RFC 6749 §5.2](https://datatracker.ietf.org/doc/html/rfc6749#section-5.2). An unknown, expired, already-redeemed (replayed), or PKCE-mismatched code returns `400`: ```json theme={null} { "error": "invalid_grant", "error_description": "Invalid or expired connection code" } ``` Because codes are single-use and expire after 10 minutes, treat any `invalid_grant` as terminal: discard the stored `code_verifier` and restart the flow from step 1. ## Security notes * **The token never touches the browser.** Only the single-use code is relayed via redirect; the service-user token is returned solely from the server-to-server exchange. * **PKCE binds the code to you.** The code is useless without the `code_verifier` held only on your backend, so intercepting the redirect (or the code) is not enough to redeem it. * **Codes are single-use and short-lived.** Redemption atomically consumes the code; it also expires after 10 minutes. * **Callback URLs are allowlisted.** Devin only relays a code to a `callback_url` Cognition has pre-approved for your integration. * **Verify the code is for the requesting user.** Confirm that the code returned to your callback belongs to the same user who originally requested the connection. This prevents an attacker from tricking a user into unsuspectingly binding Devin to a sandbox the attacker controls. * **Keep `outpost_name` sensible.** The admin may override it; the name you pass is only a suggestion. # Devin Outposts quickstart Source: https://docs.devin.ai/cloud/outposts/quickstart Set up Devin Outposts on your own machines with a self-hosted worker, API token, and repository access to run sessions from one machine. > [accordion] Prerequisites > > * An organization with Outposts enabled > * A [v3 API token](/api-reference/v3/overview) with the appropriate Outposts scopes: > * `account.outposts.write` ("Outposts write") for workers claiming/releasing sessions and orchestrators creating/deleting outposts (implies the read scope) > * `account.outposts.read` ("Outposts read") for listing outposts and reading the session queue > * A machine (VM or container) with: > * The Devin CLI installed > * The [machine dependencies](/cloud/outposts/overview#machine-dependencies) > * Your repositories cloned, with configured remotes > * Access to the build tools, package registries, secrets, and internal services your sessions need > [tab] Your Machine > > > [!NOTE] > > > > Sessions execute directly on the machine with your user's permissions. We > > recommend running the worker under a dedicated directory you're comfortable > > letting an agent work in freely — or better yet, on a machine reserved for > > long-running agentic work, like a Mac Mini on your desk. > > **1. Install the Devin CLI** > > Download and install the [Devin CLI](/cli): > > ```bash theme={null} > curl -fsSL https://cli.devin.ai/install.sh | bash > ``` > > **2. Create an outpost** > > On [Devin Cloud](https://app.devin.ai) go to Settings → Environment → Outposts, and click on the "Create Outpost" button. > >