# --------------------------------------------------------------------------- # Autopilot configuration # Copy to .env and fill in. Every value below has a safe default except the # ones marked REQUIRED, so `DEVIN_MODE=mock` runs with no credentials at all. # --------------------------------------------------------------------------- # --- Server --------------------------------------------------------------- PORT=8080 HOST=0.0.0.0 LOG_LEVEL=info NODE_ENV=development # --- Target repository (the Superset fork we remediate) ------------------- GITHUB_OWNER=watilde GITHUB_REPO=superset # REQUIRED for live mode. Needs `repo` scope so Autopilot can read issues and # post status comments. Devin uses its own GitHub integration to push branches. GITHUB_TOKEN= # Shared secret configured on the GitHub webhook. REQUIRED in live mode: # the server refuses unsigned payloads unless ALLOW_UNSIGNED_WEBHOOKS=true. GITHUB_WEBHOOK_SECRET= # Escape hatch for local demos only. Never enable in a deployed environment. ALLOW_UNSIGNED_WEBHOOKS=false # --- Devin ---------------------------------------------------------------- # live = call the real Devin API. mock = deterministic in-process simulator # that exercises every code path without spending ACUs. DEVIN_MODE=mock # REQUIRED when DEVIN_MODE=live. # cog_* service-user credential -> v3 API (current) # apk_* legacy API key -> v1 API (deprecated) # The API generation is inferred from this prefix; see DEVIN_API_VERSION below. DEVIN_API_KEY= # Host only. The client appends /v1 or /v3 itself. DEVIN_API_BASE_URL=https://api.devin.ai # REQUIRED for v3 (cog_ keys): every v3 path is scoped to an organization. # Find it under Settings -> Service Users. Looks like org-abc123def456. DEVIN_ORG_ID= # Normally inferred from the key prefix. Set to v1 or v3 only to override. DEVIN_API_VERSION= # Ceiling on compute per session. Autopilot will not create a session without # one, so a runaway task cannot silently burn budget. DEVIN_MAX_ACU=10 # Playbook every remediation session runs under: the standing procedure, held # on Devin's side so it can be revised without redeploying this service. # Create it with `npm run devin:setup`, which prints the id. Optional — the # per-session prompt carries the same rules if this is unset. DEVIN_PLAYBOOK_ID= # --- Orchestration policy ------------------------------------------------- # Only issues carrying this label are dispatched to Devin. AUTOPILOT_LABEL=autopilot # Max Devin sessions in flight at once. Backpressure, not a queue depth limit. MAX_CONCURRENT_SESSIONS=3 # How many times a CI failure may be handed back to the same session before # Autopilot stops and labels the issue for a human. An agent that cannot fix # its own build twice is stuck on something the contract did not anticipate. MAX_CI_REWORKS=2 # How many times a reviewer's change request may be handed back to the same # session. Counted apart from MAX_CI_REWORKS: a red build is the contract's own # commands disagreeing, a change request is a reviewer asking for something the # contract never said. Repeated change requests are a contract problem. MAX_REVIEW_REWORKS=2 # Dispatch a second Devin session to review the pull request once CI is green, # instead of waiting for a person. Off by default, and describe it accurately if # you turn it on: a reviewing agent is a SECOND OPINION, not independent # evidence — it comes from the same provider as the session that wrote the code. # What it has is no stake in that session's work, which is enough for what CI # cannot express: scope creep, a duplicated helper, a fix that satisfies every # command while leaving the defect in place. With this on, a merge waits for an # approval as well as a green build. REVIEW_AGENT=false # Branch pull requests are opened against. Empty means the repository's default # branch, which is right everywhere except a demonstration: Devin's tooling # refuses, unconditionally, to merge into main/master. Point this at an # integration branch to see the chain end in an actual merge. PR_BASE_BRANCH= # Merge a pull request once its contract verification job passes, with no human # in the loop. Off by default on purpose: every other action here is reversible # by a reviewer who has not looked yet, and this one is not. Devin performs the # merge — Autopilot asks, then observes the result on GitHub like anyone else. AUTO_MERGE=false # Which categories are eligible. `security` is refused by the orchestrator # whatever this says: a passing test suite is not a substitute for somebody who # understands the threat agreeing the fix addresses it. AUTO_MERGE_CATEGORIES=code-quality # How long a requested merge may stay unperformed before the issue is labelled # `autopilot:needs-human` and the agent's own reason is posted on it. Asking is # not merging and the agent can decline — Devin's tooling refuses to merge into # main/master unconditionally — and a refusal only visible in a session # transcript is the same as no refusal at all. AUTO_MERGE_GRACE_MS=600000 # How often the reconciler polls in-flight sessions, in milliseconds. RECONCILE_INTERVAL_MS=15000 # A session that has not reached a terminal state after this long is failed # and surfaced on the dashboard rather than leaking as "running" forever. SESSION_TIMEOUT_MS=3600000 # Post a status comment back on the GitHub issue at each state transition. POST_ISSUE_COMMENTS=true # --- Storage -------------------------------------------------------------- DATABASE_PATH=./data/autopilot.db