-
Notifications
You must be signed in to change notification settings - Fork 3.5k
feat(devin): add devin integration for autonomous coding sessions #3352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
8702503
feat(devin): add devin integration for autonomous coding sessions
waleedlatif1 3b80072
lint
waleedlatif1 f789d79
improvement(devin): update tool names and add manual docs description
waleedlatif1 c5f652e
improvement(devin): rename tool files to snake_case and regenerate docs
waleedlatif1 ef296c4
regen docs
waleedlatif1 fda98f5
fix(devin): remove redundant Number() conversions in tool request bodies
waleedlatif1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| --- | ||
| title: Devin | ||
| description: Autonomous AI software engineer | ||
| --- | ||
|
|
||
| import { BlockInfoCard } from "@/components/ui/block-info-card" | ||
|
|
||
| <BlockInfoCard | ||
| type="devin" | ||
| color="#12141A" | ||
| /> | ||
|
|
||
| ## Usage Instructions | ||
|
|
||
| Integrate Devin into your workflow. Create sessions to assign coding tasks, send messages to guide active sessions, and retrieve session status and results. Devin autonomously writes, runs, and tests code. | ||
|
|
||
|
|
||
|
|
||
| ## Tools | ||
|
|
||
| ### `devin_create_session` | ||
|
|
||
| #### Input | ||
|
|
||
| | Parameter | Type | Required | Description | | ||
| | --------- | ---- | -------- | ----------- | | ||
|
|
||
| #### Output | ||
|
|
||
| | Parameter | Type | Description | | ||
| | --------- | ---- | ----------- | | ||
| | `sessionId` | string | Session identifier | | ||
| | `url` | string | URL to view the session in Devin UI | | ||
| | `status` | string | Session status \(new, claimed, running, exit, error, suspended, resuming\) | | ||
| | `statusDetail` | string | Detailed status \(working, waiting_for_user, finished, etc.\) | | ||
| | `title` | string | Session title | | ||
| | `createdAt` | number | Creation timestamp \(Unix\) | | ||
| | `updatedAt` | number | Last updated timestamp \(Unix\) | | ||
| | `acusConsumed` | number | ACUs consumed | | ||
| | `tags` | json | Session tags | | ||
| | `pullRequests` | json | Pull requests created during the session | | ||
| | `structuredOutput` | json | Structured output from the session | | ||
| | `sessions` | json | List of sessions | | ||
|
|
||
| ### `devin_get_session` | ||
|
|
||
| #### Input | ||
|
|
||
| | Parameter | Type | Required | Description | | ||
| | --------- | ---- | -------- | ----------- | | ||
|
|
||
| #### Output | ||
|
|
||
| | Parameter | Type | Description | | ||
| | --------- | ---- | ----------- | | ||
| | `sessionId` | string | Session identifier | | ||
| | `url` | string | URL to view the session in Devin UI | | ||
| | `status` | string | Session status \(new, claimed, running, exit, error, suspended, resuming\) | | ||
| | `statusDetail` | string | Detailed status \(working, waiting_for_user, finished, etc.\) | | ||
| | `title` | string | Session title | | ||
| | `createdAt` | number | Creation timestamp \(Unix\) | | ||
| | `updatedAt` | number | Last updated timestamp \(Unix\) | | ||
| | `acusConsumed` | number | ACUs consumed | | ||
| | `tags` | json | Session tags | | ||
| | `pullRequests` | json | Pull requests created during the session | | ||
| | `structuredOutput` | json | Structured output from the session | | ||
| | `sessions` | json | List of sessions | | ||
|
|
||
| ### `devin_list_sessions` | ||
|
|
||
| #### Input | ||
|
|
||
| | Parameter | Type | Required | Description | | ||
| | --------- | ---- | -------- | ----------- | | ||
|
|
||
| #### Output | ||
|
|
||
| | Parameter | Type | Description | | ||
| | --------- | ---- | ----------- | | ||
| | `sessionId` | string | Session identifier | | ||
| | `url` | string | URL to view the session in Devin UI | | ||
| | `status` | string | Session status \(new, claimed, running, exit, error, suspended, resuming\) | | ||
| | `statusDetail` | string | Detailed status \(working, waiting_for_user, finished, etc.\) | | ||
| | `title` | string | Session title | | ||
| | `createdAt` | number | Creation timestamp \(Unix\) | | ||
| | `updatedAt` | number | Last updated timestamp \(Unix\) | | ||
| | `acusConsumed` | number | ACUs consumed | | ||
| | `tags` | json | Session tags | | ||
| | `pullRequests` | json | Pull requests created during the session | | ||
| | `structuredOutput` | json | Structured output from the session | | ||
| | `sessions` | json | List of sessions | | ||
|
|
||
| ### `devin_send_message` | ||
|
|
||
| #### Input | ||
|
|
||
| | Parameter | Type | Required | Description | | ||
| | --------- | ---- | -------- | ----------- | | ||
|
|
||
| #### Output | ||
|
|
||
| | Parameter | Type | Description | | ||
| | --------- | ---- | ----------- | | ||
| | `sessionId` | string | Session identifier | | ||
| | `url` | string | URL to view the session in Devin UI | | ||
| | `status` | string | Session status \(new, claimed, running, exit, error, suspended, resuming\) | | ||
| | `statusDetail` | string | Detailed status \(working, waiting_for_user, finished, etc.\) | | ||
| | `title` | string | Session title | | ||
| | `createdAt` | number | Creation timestamp \(Unix\) | | ||
| | `updatedAt` | number | Last updated timestamp \(Unix\) | | ||
| | `acusConsumed` | number | ACUs consumed | | ||
| | `tags` | json | Session tags | | ||
| | `pullRequests` | json | Pull requests created during the session | | ||
| | `structuredOutput` | json | Structured output from the session | | ||
| | `sessions` | json | List of sessions | | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,7 @@ | |
| "confluence", | ||
| "cursor", | ||
| "datadog", | ||
| "devin", | ||
| "discord", | ||
| "dropbox", | ||
| "dspy", | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,187 @@ | ||
| import { DevinIcon } from '@/components/icons' | ||
| import type { BlockConfig } from '@/blocks/types' | ||
| import { AuthMode } from '@/blocks/types' | ||
|
|
||
| export const DevinBlock: BlockConfig = { | ||
| type: 'devin', | ||
| name: 'Devin', | ||
| description: 'Autonomous AI software engineer', | ||
| longDescription: | ||
| 'Integrate Devin into your workflow. Create sessions to assign coding tasks, send messages to guide active sessions, and retrieve session status and results. Devin autonomously writes, runs, and tests code.', | ||
| bestPractices: ` | ||
| - Write clear, specific prompts describing the task, expected outcome, and any constraints. | ||
| - Use playbook IDs to standardize recurring task patterns across sessions. | ||
| - Set ACU limits to control cost for long-running tasks. | ||
| - Use Get Session to poll for completion status before consuming structured output. | ||
| - Send Message auto-resumes suspended sessions — no need to resume separately. | ||
| `, | ||
| docsLink: 'https://docs.sim.ai/tools/devin', | ||
| category: 'tools', | ||
| bgColor: '#12141A', | ||
| icon: DevinIcon, | ||
| authMode: AuthMode.ApiKey, | ||
| subBlocks: [ | ||
| { | ||
| id: 'operation', | ||
| title: 'Operation', | ||
| type: 'dropdown', | ||
| options: [ | ||
| { label: 'Create Session', id: 'create_session' }, | ||
| { label: 'Get Session', id: 'get_session' }, | ||
| { label: 'List Sessions', id: 'list_sessions' }, | ||
| { label: 'Send Message', id: 'send_message' }, | ||
| ], | ||
| value: () => 'create_session', | ||
| }, | ||
| { | ||
| id: 'apiKey', | ||
| title: 'API Key', | ||
| type: 'short-input', | ||
| placeholder: 'Enter your Devin API key (cog_...)', | ||
| password: true, | ||
| required: true, | ||
| }, | ||
| { | ||
| id: 'prompt', | ||
| title: 'Prompt', | ||
| type: 'long-input', | ||
| placeholder: 'Describe the task for Devin...', | ||
| required: { field: 'operation', value: 'create_session' }, | ||
| condition: { field: 'operation', value: 'create_session' }, | ||
| wandConfig: { | ||
| enabled: true, | ||
| prompt: `You are an expert at writing clear, actionable prompts for Devin, an autonomous AI software engineer. Generate or refine a task prompt based on the user's request. | ||
|
|
||
| Current prompt: {context} | ||
|
|
||
| RULES: | ||
| 1. Be specific about the expected outcome and deliverables | ||
| 2. Include relevant technical context (languages, frameworks, repos) | ||
| 3. Specify any constraints (don't modify certain files, follow certain patterns) | ||
| 4. Break complex tasks into clear steps when helpful | ||
| 5. Return ONLY the prompt text, no markdown formatting or explanations`, | ||
| placeholder: 'Describe what you want Devin to do...', | ||
| }, | ||
| }, | ||
| { | ||
| id: 'playbookId', | ||
| title: 'Playbook ID', | ||
| type: 'short-input', | ||
| placeholder: 'Optional playbook ID to guide the session', | ||
| condition: { field: 'operation', value: 'create_session' }, | ||
| mode: 'advanced', | ||
| }, | ||
| { | ||
| id: 'maxAcuLimit', | ||
| title: 'Max ACU Limit', | ||
| type: 'short-input', | ||
| placeholder: 'Maximum ACU budget for this session', | ||
| condition: { field: 'operation', value: 'create_session' }, | ||
| mode: 'advanced', | ||
| }, | ||
| { | ||
| id: 'tags', | ||
| title: 'Tags', | ||
| type: 'short-input', | ||
| placeholder: 'Comma-separated tags', | ||
| condition: { field: 'operation', value: 'create_session' }, | ||
| mode: 'advanced', | ||
| }, | ||
| { | ||
| id: 'sessionId', | ||
| title: 'Session ID', | ||
| type: 'short-input', | ||
| placeholder: 'Enter session ID', | ||
| required: { field: 'operation', value: ['get_session', 'send_message'] }, | ||
| condition: { field: 'operation', value: ['get_session', 'send_message'] }, | ||
| }, | ||
| { | ||
| id: 'message', | ||
| title: 'Message', | ||
| type: 'long-input', | ||
| placeholder: 'Enter message to send to Devin...', | ||
| required: { field: 'operation', value: 'send_message' }, | ||
| condition: { field: 'operation', value: 'send_message' }, | ||
| }, | ||
| { | ||
| id: 'limit', | ||
| title: 'Limit', | ||
| type: 'short-input', | ||
| placeholder: 'Number of sessions (1-200, default: 100)', | ||
| condition: { field: 'operation', value: 'list_sessions' }, | ||
| mode: 'advanced', | ||
| }, | ||
| ], | ||
| tools: { | ||
| access: [ | ||
| 'devin_create_session', | ||
| 'devin_get_session', | ||
| 'devin_list_sessions', | ||
| 'devin_send_message', | ||
| ], | ||
| config: { | ||
| tool: (params) => `devin_${params.operation}`, | ||
| params: (params) => { | ||
| if (params.maxAcuLimit != null && params.maxAcuLimit !== '') { | ||
| params.maxAcuLimit = Number(params.maxAcuLimit) | ||
| } | ||
| if (params.limit != null && params.limit !== '') { | ||
| params.limit = Number(params.limit) | ||
| } | ||
| return params | ||
| }, | ||
| }, | ||
| }, | ||
| inputs: { | ||
| prompt: { type: 'string', description: 'Task prompt for Devin' }, | ||
| sessionId: { type: 'string', description: 'Session ID' }, | ||
| message: { type: 'string', description: 'Message to send to the session' }, | ||
| apiKey: { type: 'string', description: 'Devin API key' }, | ||
| playbookId: { type: 'string', description: 'Playbook ID to guide the session' }, | ||
| maxAcuLimit: { type: 'number', description: 'Maximum ACU limit' }, | ||
| tags: { type: 'string', description: 'Comma-separated tags' }, | ||
| limit: { type: 'number', description: 'Number of sessions to return' }, | ||
| }, | ||
| outputs: { | ||
| sessionId: { type: 'string', description: 'Session identifier' }, | ||
| url: { type: 'string', description: 'URL to view the session in Devin UI' }, | ||
| status: { | ||
| type: 'string', | ||
| description: 'Session status (new, claimed, running, exit, error, suspended, resuming)', | ||
| }, | ||
| statusDetail: { | ||
| type: 'string', | ||
| description: 'Detailed status (working, waiting_for_user, finished, etc.)', | ||
| condition: { field: 'operation', value: 'list_sessions', not: true }, | ||
| }, | ||
| title: { type: 'string', description: 'Session title' }, | ||
| createdAt: { type: 'number', description: 'Creation timestamp (Unix)' }, | ||
| updatedAt: { type: 'number', description: 'Last updated timestamp (Unix)' }, | ||
| acusConsumed: { | ||
| type: 'number', | ||
| description: 'ACUs consumed', | ||
| condition: { field: 'operation', value: 'list_sessions', not: true }, | ||
| }, | ||
| tags: { type: 'json', description: 'Session tags' }, | ||
| pullRequests: { | ||
| type: 'json', | ||
| description: 'Pull requests created during the session', | ||
| condition: { field: 'operation', value: 'list_sessions', not: true }, | ||
| }, | ||
| structuredOutput: { | ||
| type: 'json', | ||
| description: 'Structured output from the session', | ||
| condition: { field: 'operation', value: 'list_sessions', not: true }, | ||
| }, | ||
| playbookId: { | ||
| type: 'string', | ||
| description: 'Associated playbook ID', | ||
| condition: { field: 'operation', value: 'list_sessions', not: true }, | ||
| }, | ||
| sessions: { | ||
| type: 'json', | ||
| description: 'List of sessions', | ||
| condition: { field: 'operation', value: 'list_sessions' }, | ||
| }, | ||
| }, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.