Skip to main content

Devin

Devin is Cognition's autonomous AI software engineer. It operates as a remote cloud service, making it a natural fit for AgentXchain's remote_agent adapter.

Which adapter?​

remote_agent — AgentXchain POSTs a turn envelope (prompt, context, assignment) to Devin's HTTP endpoint and receives a turn result back.

Prerequisites​

  • A Devin API account with HTTP endpoint access
  • API key or bearer token for authentication
  • agentxchain CLI installed

Configuration​

{
"runtimes": {
"devin-dev": {
"type": "remote_agent",
"url": "https://api.devin.ai/v1/turn",
"timeout_ms": 600000,
"headers": {
"Authorization": "Bearer YOUR_DEVIN_API_KEY"
}
}
},
"roles": {
"dev": {
"runtime": "devin-dev",
"mandate": "Implement features end-to-end",
"write_authority": "proposed"
}
}
}

Key fields​

FieldValueWhy
urlDevin's turn endpointThe HTTP endpoint that accepts turn envelopes
timeout_ms600000 (10 minutes)Devin may take longer for complex tasks since it runs autonomously
headersAuth bearer tokenRequired for API authentication

How the turn envelope works​

AgentXchain POSTs this JSON to Devin's endpoint:

{
"run_id": "run-abc123",
"turn_id": "turn-001",
"role": "dev",
"phase": "implementation",
"runtime_id": "devin-dev",
"dispatch_dir": ".agentxchain/dispatch/turns/turn-001/",
"prompt": "...",
"context": "..."
}

Devin must return a valid turn result JSON conforming to the AgentXchain protocol schema.

Minimal working example​

agentxchain init --governed --template api-service --goal "Build an API with Devin as the developer" --dir my-project -y
cd my-project
# Replace the scaffolded runtime wiring in agentxchain.json with the Devin config above.
agentxchain doctor
agentxchain connector check
agentxchain connector validate devin-dev
agentxchain run

If you prefer the guided interactive scaffold, run agentxchain init --governed without -y, then update agentxchain.json with the Devin config above before agentxchain connector check and agentxchain connector validate devin-dev.

Verify the connection​

agentxchain connector check
agentxchain connector validate devin-dev

The connector probe performs a GET request to verify the endpoint is reachable.

Gotchas​

  • Devin's API surface: Check Devin's current API documentation for the exact endpoint URL and authentication method. The URL shown above is illustrative.
  • Long timeouts: Devin operates autonomously and may spend significant time on complex tasks. Set timeout_ms high enough to avoid premature timeout.
  • Turn result format: Devin's response must conform to the AgentXchain turn result schema (schema_version, role, status, artifacts, decisions, etc.). If Devin's native output format differs, you may need a thin translation layer between Devin and AgentXchain.
  • Authority: Use "write_authority": "proposed" so AgentXchain validates Devin's output before applying changes. This keeps governance intact even with an autonomous agent.