API referenceConsole
code agent
Polylane investigates the issue and hands the fix to Devin, which implements it and opens the pull request on your GitHub. Bring your own Devin API key.

Connect

Connect Devin from the terminal. Pass --help for the flags Devin accepts.

Terminal
polylane integration connect --type devin

How it works

Polylane hands the fix to Devin

When a fix run confirms the root cause of an issue, Polylane writes a brief for Devin: the root cause, the change to make, and how to check it. Every brief tells Devin to run the typecheck, the lint and the tests of the repository, and to list each check in the pull request description. A fix from a chat thread also gives Devin the change that Polylane wrote in its sandbox.

Before Devin starts, Polylane applies the same gates as for its own fixes: the autofix switch, the autofix quota, a fix already in progress, and an open pull request for the same fix. Then Polylane starts one Devin session on the repository, with the brief as the prompt.

Code hosts

Devin works only with GitHub repositories. For a repository on GitLab, Polylane writes the fix in its own sandbox.

The pull request comes back

Polylane reads the session every five minutes, for a maximum of six hours. When Devin asks a question, Polylane tells it to continue on its best judgment. Polylane does this two times. If Devin asks a third time, the run stops.

When Devin opens a pull request, Polylane records it on the autofix. Polylane also adds a section to the description with its evidence and the history of the fix. Devin creates the pull request itself, so the workspace setting for draft pull requests does not apply. If the session ends without a pull request, Polylane records the autofix as skipped.

When a run fails

If the session fails, stops, or does not finish in six hours, Polylane's own agent takes the fix and writes it. A run that opened a pull request always counts as a success.

If Devin refuses the token, Polylane sends one notice and gives new fixes to its own agent. Reconnect or verify the integration to give fixes to Devin again.

Give Devin Polylane's MCP tools

A Devin session can read Polylane while it writes a fix: issues, investigations, the infrastructure graph and observability data. Add the Polylane MCP server to Devin:

  1. In Polylane, open Settings → Coding agents and create an API key. The key gets every read scope that the MCP tools check, plus edits to Polylane's own data. It cannot act on your cloud or on connected providers.
  2. In Devin, go to Settings → Connections → MCP servers and click Add a custom MCP. This needs the Manage MCP Servers permission.
  3. Choose the Streamable HTTP transport and set the server URL to https://mcp.polylane.com/mcp.
  4. Set the bearer token to the API key from step 1. Devin sends it as Authorization: Bearer <key>.

Troubleshooting

When a Devin run fails, Polylane's own agent writes the fix. To let Devin do the next fix, correct the cause:

What Polylane reportsWhat to do
Devin reached its usage limitExamine your Devin plan or usage.
Devin needed more input than the task gaveMake the instructions of the fix more specific.
Devin did not finish in the time limitGive Devin a smaller task.
Devin refused the tokenCreate a new service user token and reconnect Devin.

Disconnecting

Disconnect Devin in Polylane, then revoke the service user token in Devin. After you disconnect, Polylane's own agent writes new fixes.

Disconnect

Disconnecting stops every sync and check and deletes the credentials Polylane held. Everything Polylane set up in Devin is removed as well; nothing is left behind.

Terminal
polylane integration disconnect <id>