Skip to content

Agent Integrations Overview

Agent integrations store credentials for AI agents (Devin, Cursor) that relay rules can invoke. API keys are encrypted and never returned in API responses.

AI agent for autonomous software engineering tasks. Get your API key (apk_*) from the Devin API settings.

const devinIntegration = await client.integration.create({
name: "Devin Production",
provider: "devin",
apiKey: "devin_api_key_here",
});

AI coding agent that creates PRs with fixes. Requires a repository URL in the agent rule config. Get your API key from the Cursor dashboard.

Prerequisites: Privacy Mode must be enabled in your Cursor account settings for API-based agent access to work. Without it, all API requests will return 403 Forbidden.

const cursorIntegration = await client.integration.create({
name: "Cursor Agent",
provider: "cursor",
apiKey: "cursor_api_key_here",
});

Reference integrations in relay rules by ID:

const integration = await client.integration.create({
name: "Devin Production",
provider: "devin",
apiKey: process.env.DEVIN_API_KEY,
});
await client.relay.rules.create(relayId, {
name: "Try AI agent first",
ruleType: "agent",
config: {
agentType: "devin",
integrationId: integration.id,
pollInterval: 30000,
maxPollAttempts: 120,
},
});

Cursor requires a repository URL in the config:

const cursorIntegration = await client.integration.create({
name: "Cursor Agent",
provider: "cursor",
apiKey: process.env.CURSOR_API_KEY,
});
await client.relay.rules.create(relayId, {
name: "Cursor Auto-Fix",
ruleType: "agent",
config: {
agentType: "cursor",
integrationId: cursorIntegration.id,
repository: "https://github.com/org/repo",
autoCreatePr: true,
pollInterval: 30000,
maxPollAttempts: 120,
},
});

See Best Practices - Agent Integrations for configuration guidelines.

To connect beeps tools in Claude Code or Codex, see MCP Setup for Claude Code and Codex.