feat(devin): add devin integration for autonomous coding sessions (#3352)

* feat(devin): add devin integration for autonomous coding sessions

* lint

* improvement(devin): update tool names and add manual docs description

* improvement(devin): rename tool files to snake_case and regenerate docs

* regen docs

* fix(devin): remove redundant Number() conversions in tool request bodies
This commit is contained in:
Waleed
2026-02-26 11:57:50 -08:00
committed by GitHub
parent dde098e8e5
commit 25c59e3e2e
17 changed files with 924 additions and 6 deletions
+19
View File
@@ -939,6 +939,25 @@ export function GoogleIcon(props: SVGProps<SVGSVGElement>) {
)
}
export function DevinIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg {...props} viewBox='0 0 500 500' fill='none' xmlns='http://www.w3.org/2000/svg'>
<path
d='M59.29,209.39l48.87,28.21c1.75,1.01,3.71,1.51,5.67,1.51c1.95,0,3.92-0.52,5.67-1.51l48.87-28.21c0,0,0.14-0.11,0.2-0.16c0.74-0.45,1.44-0.99,2.07-1.6c0.09-0.09,0.18-0.2,0.27-0.29c0.54-0.58,1.03-1.21,1.44-1.89c0.06-0.11,0.16-0.2,0.2-0.32c0.43-0.74,0.74-1.53,0.99-2.37c0.05-0.18,0.09-0.36,0.14-0.54c0.2-0.86,0.36-1.74,0.36-2.66v-28.21c0-10.89,5.87-21.03,15.3-26.48c9.42-5.45,21.15-5.44,30.59,0l24.43,14.11c0.79,0.45,1.62,0.77,2.47,1.01c0.18,0.05,0.37,0.11,0.54,0.16c0.83,0.2,1.69,0.32,2.54,0.34c0.05,0,0.09,0,0.11,0c0.09,0,0.18-0.05,0.26-0.05c0.79,0,1.58-0.11,2.34-0.32c0.14-0.03,0.27-0.05,0.4-0.09c0.83-0.23,1.64-0.57,2.41-0.99c0.06-0.05,0.16-0.05,0.23-0.09l48.87-28.21c3.51-2.03,5.67-5.76,5.67-9.81V64.52c0-4.05-2.16-7.78-5.67-9.81l-48.91-28.19c-3.51-2.03-7.81-2.03-11.32,0l-48.87,28.21c0,0-0.14,0.11-0.2,0.16c-0.74,0.45-1.44,0.99-2.07,1.6c-0.09,0.09-0.18,0.2-0.27,0.29c-0.54,0.58-1.03,1.21-1.44,1.89c-0.06,0.11-0.16,0.2-0.2,0.31c-0.43,0.74-0.74,1.53-0.99,2.37c-0.05,0.18-0.09,0.36-0.14,0.54c-0.2,0.86-0.36,1.74-0.36,2.66v28.21c0,10.89-5.87,21.03-15.3,26.5c-9.42,5.44-21.15,5.44-30.59,0l-24.42-14.1c-0.79-0.45-1.63-0.77-2.47-1.01c-0.18-0.05-0.36-0.11-0.54-0.16c-0.84-0.2-1.69-0.31-2.55-0.34c-0.14,0-0.25,0-0.38,0c-0.81,0-1.6,0.11-2.37,0.31c-0.14,0.02-0.25,0.05-0.38,0.09c-0.82,0.23-1.63,0.57-2.4,1c-0.06,0.05-0.16,0.05-0.23,0.09l-48.84,28.24c-3.51,2.03-5.67,5.76-5.67,9.81v56.42c0,4.05,2.16,7.78,5.67,9.81C59.29,209.41,59.29,209.39,59.29,209.39z'
fill='#2A6DCE'
/>
<path
d='M325.46,223.49c9.42-5.44,21.15-5.44,30.59,0l24.43,14.11c0.79,0.45,1.62,0.77,2.47,1.01c0.18,0.05,0.36,0.11,0.54,0.16c0.83,0.2,1.69,0.31,2.54,0.34c0.05,0,0.09,0,0.11,0c0.09,0,0.18-0.03,0.26-0.05c0.79,0,1.58-0.11,2.34-0.31c0.14-0.03,0.27-0.05,0.4-0.09c0.83-0.23,1.62-0.57,2.41-0.99c0.06-0.05,0.16-0.05,0.25-0.09l48.87-28.21c3.51-2.03,5.67-5.76,5.67-9.81v-56.43c0-4.05-2.16-7.78-5.67-9.81l-48.84-28.22c-3.51-2.03-7.81-2.03-11.32,0l-48.87,28.21c0,0-0.14,0.11-0.2,0.16c-0.74,0.45-1.44,0.99-2.07,1.6c-0.09,0.09-0.18,0.2-0.26,0.29c-0.54,0.58-1.03,1.21-1.44,1.89c-0.06,0.11-0.16,0.2-0.2,0.32c-0.43,0.74-0.74,1.53-0.99,2.37c-0.05,0.18-0.09,0.36-0.14,0.54c-0.2,0.86-0.36,1.74-0.36,2.66v28.21c0,10.89-5.87,21.03-15.3,26.5c-9.42,5.44-21.15,5.44-30.59,0l-24.43-14.11c-0.79-0.45-1.62-0.77-2.47-1.01c-0.18-0.05-0.36-0.11-0.54-0.16c-0.83-0.2-1.69-0.32-2.54-0.34c-0.14,0-0.25,0-0.38,0c-0.81,0-1.6,0.11-2.37,0.32c-0.14,0.03-0.25,0.05-0.38,0.09c-0.83,0.23-1.64,0.57-2.41,0.99c-0.06,0.05-0.16,0.05-0.23,0.09l-48.87,28.21c-3.51,2.03-5.67,5.76-5.67,9.81v56.43c0,4.05,2.16,7.78,5.67,9.81l48.87,28.21c0,0,0.16,0.05,0.23,0.09c0.77,0.43,1.58,0.77,2.41,0.99c0.14,0.05,0.27,0.05,0.4,0.09c0.77,0.18,1.55,0.29,2.34,0.32c0.09,0,0.18,0.05,0.27,0.05c0.05,0,0.09,0,0.11,0c0.86,0,1.69-0.14,2.54-0.34c0.18-0.05,0.36-0.09,0.54-0.16c0.86-0.25,1.69-0.57,2.47-1.01l24.43-14.11c9.42-5.44,21.15-5.44,30.59,0c9.42,5.44,15.3,15.59,15.3,26.48v28.21c0,0.92,0.14,1.8,0.36,2.66c0.05,0.18,0.09,0.36,0.14,0.54c0.25,0.83,0.56,1.62,0.99,2.37c0.06,0.11,0.14,0.2,0.2,0.31c0.4,0.68,0.9,1.31,1.44,1.89c0.09,0.09,0.18,0.2,0.26,0.29c0.61,0.6,1.31,1.12,2.07,1.6c0.06,0.05,0.11,0.11,0.2,0.16l48.87,28.21c1.75,1.01,3.72,1.51,5.67,1.51s3.92-0.52,5.67-1.51l48.87-28.21c3.51-2.03,5.67-5.76,5.67-9.81v-56.43c0-4.05-2.16-7.78-5.67-9.81l-48.87-28.21c0,0-0.16-0.05-0.23-0.09c-0.77-0.43-1.58-0.77-2.41-0.99c-0.14-0.05-0.25-0.05-0.38-0.09c-0.79-0.18-1.57-0.29-2.38-0.32c-0.11,0-0.25,0-0.36,0c-0.86,0-1.71,0.14-2.54,0.34c-0.18,0.05-0.34,0.09-0.52,0.16c-0.86,0.25-1.69,0.57-2.47,1.01l-24.43,14.11c-9.42,5.44-21.15,5.44-30.58,0c-9.42-5.44-15.3-15.59-15.3-26.5c0-10.91,5.87-21.03,15.3-26.48C325.55,223.49,325.46,223.49,325.46,223.49z'
fill='#1DC19C'
/>
<path
d='M304.5,369.22l-48.87-28.21c0,0-0.16-0.05-0.23-0.09c-0.77-0.43-1.57-0.77-2.41-0.99c-0.14-0.05-0.27-0.05-0.4-0.09c-0.79-0.18-1.57-0.29-2.37-0.32c-0.14,0-0.25,0-0.38,0c-0.86,0-1.71,0.14-2.54,0.34c-0.18,0.05-0.34,0.09-0.52,0.16c-0.86,0.25-1.69,0.57-2.47,1.01l-24.43,14.11c-9.42,5.44-21.15,5.44-30.58,0c-9.42-5.44-15.3-15.59-15.3-26.5v-28.22c0-0.92-0.14-1.8-0.36-2.66c-0.05-0.18-0.09-0.36-0.14-0.54c-0.25-0.83-0.57-1.62-0.99-2.37c-0.06-0.11-0.14-0.2-0.2-0.32c-0.4-0.68-0.9-1.31-1.44-1.89c-0.09-0.09-0.18-0.2-0.27-0.29c-0.6-0.6-1.31-1.12-2.07-1.6c-0.06-0.05-0.11-0.11-0.2-0.16l-48.87-28.21c-3.51-2.03-7.81-2.03-11.32,0L59.28,290.6c-3.51,2.03-5.67,5.76-5.67,9.81v56.43c0,4.05,2.16,7.78,5.67,9.81l48.87,28.21c0,0,0.16,0.06,0.23,0.09c0.77,0.43,1.55,0.77,2.38,0.99c0.14,0.05,0.27,0.06,0.4,0.09c0.77,0.18,1.55,0.29,2.34,0.32c0.09,0,0.18,0.05,0.29,0.05c0.05,0,0.09,0,0.14,0c0.86,0,1.69-0.14,2.52-0.34c0.18-0.05,0.36-0.09,0.54-0.16c0.86-0.25,1.69-0.57,2.47-1.01l24.43-14.11c9.42-5.44,21.15-5.44,30.59,0c9.42,5.44,15.3,15.59,15.3,26.48v28.21c0,0.92,0.14,1.8,0.36,2.66c0.05,0.18,0.09,0.36,0.14,0.54c0.25,0.83,0.57,1.62,0.99,2.37c0.06,0.11,0.14,0.2,0.2,0.32c0.4,0.68,0.9,1.31,1.44,1.89c0.09,0.09,0.18,0.2,0.27,0.29c0.61,0.61,1.31,1.12,2.07,1.6c0.06,0.05,0.11,0.11,0.2,0.16l48.87,28.21c1.75,1.01,3.71,1.51,5.67,1.51c1.96,0,3.92-0.52,5.67-1.51l48.87-28.21c3.51-2.03,5.67-5.76,5.67-9.81v-56.43c0-4.05-2.16-7.78-5.67-9.81L304.5,369.22z'
fill='#1796E2'
/>
</svg>
)
}
export function DiscordIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg
+2
View File
@@ -25,6 +25,7 @@ import {
ConfluenceIcon,
CursorIcon,
DatadogIcon,
DevinIcon,
DiscordIcon,
DocumentIcon,
DropboxIcon,
@@ -174,6 +175,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
confluence_v2: ConfluenceIcon,
cursor_v2: CursorIcon,
datadog: DatadogIcon,
devin: DevinIcon,
discord: DiscordIcon,
dropbox: DropboxIcon,
dspy: DsPyIcon,
+157
View File
@@ -0,0 +1,157 @@
---
title: Devin
description: Autonomous AI software engineer
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="devin"
color="#12141A"
/>
{/* MANUAL-CONTENT-START:intro */}
[Devin](https://devin.ai/) is an autonomous AI software engineer by Cognition that can independently write, run, debug, and deploy code.
With Devin, you can:
- **Automate coding tasks**: Assign software engineering tasks and let Devin autonomously write, test, and iterate on code
- **Manage sessions**: Create, monitor, and interact with Devin sessions to track progress on assigned tasks
- **Guide active work**: Send messages to running sessions to provide additional context, redirect efforts, or answer questions
- **Retrieve structured output**: Poll completed sessions for pull requests, structured results, and detailed status
- **Control costs**: Set ACU (Autonomous Compute Unit) limits to cap spending on long-running tasks
- **Standardize workflows**: Use playbook IDs to apply repeatable task patterns across sessions
In Sim, the Devin integration enables your agents to programmatically manage Devin sessions as part of their workflows:
- **Create sessions**: Kick off new Devin sessions with a prompt describing the task, optional playbook, ACU limits, and tags
- **Get session details**: Retrieve the full state of a session including status, pull requests, structured output, and resource consumption
- **List sessions**: Query all sessions in your organization with optional pagination
- **Send messages**: Communicate with active or suspended sessions to provide guidance, and automatically resume suspended sessions
This allows for powerful automation scenarios such as triggering code generation from upstream events, polling for completion before consuming results, orchestrating multi-step development pipelines, and integrating Devin's output into broader agent workflows.
{/* MANUAL-CONTENT-END */}
## 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`
Create a new Devin session with a prompt. Devin will autonomously work on the task described in the prompt.
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Devin API key \(service user credential starting with cog_\) |
| `prompt` | string | Yes | The task prompt for Devin to work on |
| `playbookId` | string | No | Optional playbook ID to guide the session |
| `maxAcuLimit` | number | No | Maximum ACU limit for the session |
| `tags` | string | No | Comma-separated tags for the session |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `sessionId` | string | Unique identifier for the session |
| `url` | string | URL to view the session in the Devin UI |
| `status` | string | Session status \(new, claimed, running, exit, error, suspended, resuming\) |
| `statusDetail` | string | Detailed status \(working, waiting_for_user, waiting_for_approval, finished, inactivity, etc.\) |
| `title` | string | Session title |
| `createdAt` | number | Unix timestamp when the session was created |
| `updatedAt` | number | Unix timestamp when the session was last updated |
| `acusConsumed` | number | ACUs consumed by the session |
| `tags` | json | Tags associated with the session |
| `pullRequests` | json | Pull requests created during the session |
| `structuredOutput` | json | Structured output from the session |
| `playbookId` | string | Associated playbook ID |
### `devin_get_session`
Retrieve details of an existing Devin session including status, tags, pull requests, and structured output.
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Devin API key \(service user credential starting with cog_\) |
| `sessionId` | string | Yes | The session ID to retrieve |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `sessionId` | string | Unique identifier for the session |
| `url` | string | URL to view the session in the Devin UI |
| `status` | string | Session status \(new, claimed, running, exit, error, suspended, resuming\) |
| `statusDetail` | string | Detailed status \(working, waiting_for_user, waiting_for_approval, finished, inactivity, etc.\) |
| `title` | string | Session title |
| `createdAt` | number | Unix timestamp when the session was created |
| `updatedAt` | number | Unix timestamp when the session was last updated |
| `acusConsumed` | number | ACUs consumed by the session |
| `tags` | json | Tags associated with the session |
| `pullRequests` | json | Pull requests created during the session |
| `structuredOutput` | json | Structured output from the session |
| `playbookId` | string | Associated playbook ID |
### `devin_list_sessions`
List Devin sessions in the organization. Returns up to 100 sessions by default.
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Devin API key \(service user credential starting with cog_\) |
| `limit` | number | No | Maximum number of sessions to return \(1-200, default: 100\) |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `sessions` | array | List of Devin sessions |
| ↳ `sessionId` | string | Unique identifier for the session |
| ↳ `url` | string | URL to view the session |
| ↳ `status` | string | Session status |
| ↳ `statusDetail` | string | Detailed status |
| ↳ `title` | string | Session title |
| ↳ `createdAt` | number | Creation timestamp \(Unix\) |
| ↳ `updatedAt` | number | Last updated timestamp \(Unix\) |
| ↳ `tags` | json | Session tags |
### `devin_send_message`
Send a message to a Devin session. If the session is suspended, it will be automatically resumed. Returns the updated session state.
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Devin API key \(service user credential starting with cog_\) |
| `sessionId` | string | Yes | The session ID to send the message to |
| `message` | string | Yes | The message to send to Devin |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `sessionId` | string | Unique identifier for the session |
| `url` | string | URL to view the session in the Devin UI |
| `status` | string | Session status \(new, claimed, running, exit, error, suspended, resuming\) |
| `statusDetail` | string | Detailed status \(working, waiting_for_user, waiting_for_approval, finished, inactivity, etc.\) |
| `title` | string | Session title |
| `createdAt` | number | Unix timestamp when the session was created |
| `updatedAt` | number | Unix timestamp when the session was last updated |
| `acusConsumed` | number | ACUs consumed by the session |
| `tags` | json | Tags associated with the session |
| `pullRequests` | json | Pull requests created during the session |
| `structuredOutput` | json | Structured output from the session |
| `playbookId` | string | Associated playbook ID |
@@ -5,7 +5,7 @@ description: Query, list, and insert data in Google BigQuery
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
<BlockInfoCard
type="google_bigquery"
color="#E0E0E0"
/>
@@ -16,6 +16,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
In Sim, the Google BigQuery integration allows your agents to query datasets, list tables, inspect schemas, and insert rows as part of automated workflows. This enables use cases such as automated reporting, data pipeline orchestration, real-time data ingestion, and analytics-driven decision making. By connecting Sim with BigQuery, your agents can pull insights from petabytes of data, write results back to tables, and keep your analytics workflows running without manual intervention.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Connect to Google BigQuery to run SQL queries, list datasets and tables, get table metadata, and insert rows.
@@ -5,7 +5,7 @@ description: Search and retrieve book information
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
<BlockInfoCard
type="google_books"
color="#E0E0E0"
/>
@@ -16,6 +16,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
In Sim, the Google Books integration allows your agents to search for books and retrieve volume details as part of automated workflows. This enables use cases such as content research, reading list curation, bibliographic data enrichment, ISBN lookups, and knowledge gathering from published works. By connecting Sim with Google Books, your agents can discover and analyze book metadata, filter by availability or format, and incorporate literary references into their outputs—all without manual research.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Search for books using the Google Books API. Find volumes by title, author, ISBN, or keywords, and retrieve detailed information about specific books including descriptions, ratings, and publication details.
@@ -5,7 +5,7 @@ description: Manage Google Tasks
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
<BlockInfoCard
type="google_tasks"
color="#E0E0E0"
/>
@@ -16,6 +16,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
In Sim, the Google Tasks integration allows your agents to create, read, update, delete, and list tasks and task lists as part of automated workflows. This enables use cases such as automated task creation from incoming data, to-do list management based on workflow triggers, task status tracking, and deadline monitoring. By connecting Sim with Google Tasks, your agents can manage action items programmatically, keep teams organized, and ensure nothing falls through the cracks.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Integrate Google Tasks into your workflow. Create, read, update, delete, and list tasks and task lists.
@@ -81,7 +82,24 @@ List all tasks in a Google Tasks list
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `tasks` | json | Array of tasks with id, title, notes, status, due, updated, and more |
| `tasks` | array | List of tasks |
| ↳ `id` | string | Task identifier |
| ↳ `title` | string | Title of the task |
| ↳ `notes` | string | Notes/description for the task |
| ↳ `status` | string | Task status: "needsAction" or "completed" |
| ↳ `due` | string | Due date \(RFC 3339 timestamp\) |
| ↳ `completed` | string | Completion date \(RFC 3339 timestamp\) |
| ↳ `updated` | string | Last modification time \(RFC 3339 timestamp\) |
| ↳ `selfLink` | string | URL pointing to this task |
| ↳ `webViewLink` | string | Link to task in Google Tasks UI |
| ↳ `parent` | string | Parent task identifier |
| ↳ `position` | string | Position among sibling tasks \(string-based ordering\) |
| ↳ `hidden` | boolean | Whether the task is hidden |
| ↳ `deleted` | boolean | Whether the task is deleted |
| ↳ `links` | array | Collection of links associated with the task |
| ↳ `type` | string | Link type \(e.g., "email", "generic", "chat_message"\) |
| ↳ `description` | string | Link description |
| ↳ `link` | string | The URL |
| `nextPageToken` | string | Token for retrieving the next page of results |
### `google_tasks_get`
@@ -170,14 +188,18 @@ Retrieve all task lists for the authenticated user
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `maxResults` | number | No | Maximum number of task lists to return \(default 1000, max 1000\) |
| `maxResults` | number | No | Maximum number of task lists to return \(default 20, max 100\) |
| `pageToken` | string | No | Token for pagination |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `taskLists` | json | Array of task lists with id, title, updated, and selfLink |
| `taskLists` | array | List of task lists |
| ↳ `id` | string | Task list identifier |
| ↳ `title` | string | Title of the task list |
| ↳ `updated` | string | Last modification time \(RFC 3339 timestamp\) |
| ↳ `selfLink` | string | URL pointing to this task list |
| `nextPageToken` | string | Token for retrieving the next page of results |
@@ -21,6 +21,7 @@
"confluence",
"cursor",
"datadog",
"devin",
"discord",
"dropbox",
"dspy",
+187
View File
@@ -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' },
},
},
}
+2
View File
@@ -23,6 +23,7 @@ import { ConditionBlock } from '@/blocks/blocks/condition'
import { ConfluenceBlock, ConfluenceV2Block } from '@/blocks/blocks/confluence'
import { CursorBlock, CursorV2Block } from '@/blocks/blocks/cursor'
import { DatadogBlock } from '@/blocks/blocks/datadog'
import { DevinBlock } from '@/blocks/blocks/devin'
import { DiscordBlock } from '@/blocks/blocks/discord'
import { DropboxBlock } from '@/blocks/blocks/dropbox'
import { DSPyBlock } from '@/blocks/blocks/dspy'
@@ -206,6 +207,7 @@ export const registry: Record<string, BlockConfig> = {
cursor: CursorBlock,
cursor_v2: CursorV2Block,
datadog: DatadogBlock,
devin: DevinBlock,
discord: DiscordBlock,
dropbox: DropboxBlock,
dspy: DSPyBlock,
+19
View File
@@ -939,6 +939,25 @@ export function GoogleIcon(props: SVGProps<SVGSVGElement>) {
)
}
export function DevinIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg {...props} viewBox='0 0 500 500' fill='none' xmlns='http://www.w3.org/2000/svg'>
<path
d='M59.29,209.39l48.87,28.21c1.75,1.01,3.71,1.51,5.67,1.51c1.95,0,3.92-0.52,5.67-1.51l48.87-28.21c0,0,0.14-0.11,0.2-0.16c0.74-0.45,1.44-0.99,2.07-1.6c0.09-0.09,0.18-0.2,0.27-0.29c0.54-0.58,1.03-1.21,1.44-1.89c0.06-0.11,0.16-0.2,0.2-0.32c0.43-0.74,0.74-1.53,0.99-2.37c0.05-0.18,0.09-0.36,0.14-0.54c0.2-0.86,0.36-1.74,0.36-2.66v-28.21c0-10.89,5.87-21.03,15.3-26.48c9.42-5.45,21.15-5.44,30.59,0l24.43,14.11c0.79,0.45,1.62,0.77,2.47,1.01c0.18,0.05,0.37,0.11,0.54,0.16c0.83,0.2,1.69,0.32,2.54,0.34c0.05,0,0.09,0,0.11,0c0.09,0,0.18-0.05,0.26-0.05c0.79,0,1.58-0.11,2.34-0.32c0.14-0.03,0.27-0.05,0.4-0.09c0.83-0.23,1.64-0.57,2.41-0.99c0.06-0.05,0.16-0.05,0.23-0.09l48.87-28.21c3.51-2.03,5.67-5.76,5.67-9.81V64.52c0-4.05-2.16-7.78-5.67-9.81l-48.91-28.19c-3.51-2.03-7.81-2.03-11.32,0l-48.87,28.21c0,0-0.14,0.11-0.2,0.16c-0.74,0.45-1.44,0.99-2.07,1.6c-0.09,0.09-0.18,0.2-0.27,0.29c-0.54,0.58-1.03,1.21-1.44,1.89c-0.06,0.11-0.16,0.2-0.2,0.31c-0.43,0.74-0.74,1.53-0.99,2.37c-0.05,0.18-0.09,0.36-0.14,0.54c-0.2,0.86-0.36,1.74-0.36,2.66v28.21c0,10.89-5.87,21.03-15.3,26.5c-9.42,5.44-21.15,5.44-30.59,0l-24.42-14.1c-0.79-0.45-1.63-0.77-2.47-1.01c-0.18-0.05-0.36-0.11-0.54-0.16c-0.84-0.2-1.69-0.31-2.55-0.34c-0.14,0-0.25,0-0.38,0c-0.81,0-1.6,0.11-2.37,0.31c-0.14,0.02-0.25,0.05-0.38,0.09c-0.82,0.23-1.63,0.57-2.4,1c-0.06,0.05-0.16,0.05-0.23,0.09l-48.84,28.24c-3.51,2.03-5.67,5.76-5.67,9.81v56.42c0,4.05,2.16,7.78,5.67,9.81C59.29,209.41,59.29,209.39,59.29,209.39z'
fill='#2A6DCE'
/>
<path
d='M325.46,223.49c9.42-5.44,21.15-5.44,30.59,0l24.43,14.11c0.79,0.45,1.62,0.77,2.47,1.01c0.18,0.05,0.36,0.11,0.54,0.16c0.83,0.2,1.69,0.31,2.54,0.34c0.05,0,0.09,0,0.11,0c0.09,0,0.18-0.03,0.26-0.05c0.79,0,1.58-0.11,2.34-0.31c0.14-0.03,0.27-0.05,0.4-0.09c0.83-0.23,1.62-0.57,2.41-0.99c0.06-0.05,0.16-0.05,0.25-0.09l48.87-28.21c3.51-2.03,5.67-5.76,5.67-9.81v-56.43c0-4.05-2.16-7.78-5.67-9.81l-48.84-28.22c-3.51-2.03-7.81-2.03-11.32,0l-48.87,28.21c0,0-0.14,0.11-0.2,0.16c-0.74,0.45-1.44,0.99-2.07,1.6c-0.09,0.09-0.18,0.2-0.26,0.29c-0.54,0.58-1.03,1.21-1.44,1.89c-0.06,0.11-0.16,0.2-0.2,0.32c-0.43,0.74-0.74,1.53-0.99,2.37c-0.05,0.18-0.09,0.36-0.14,0.54c-0.2,0.86-0.36,1.74-0.36,2.66v28.21c0,10.89-5.87,21.03-15.3,26.5c-9.42,5.44-21.15,5.44-30.59,0l-24.43-14.11c-0.79-0.45-1.62-0.77-2.47-1.01c-0.18-0.05-0.36-0.11-0.54-0.16c-0.83-0.2-1.69-0.32-2.54-0.34c-0.14,0-0.25,0-0.38,0c-0.81,0-1.6,0.11-2.37,0.32c-0.14,0.03-0.25,0.05-0.38,0.09c-0.83,0.23-1.64,0.57-2.41,0.99c-0.06,0.05-0.16,0.05-0.23,0.09l-48.87,28.21c-3.51,2.03-5.67,5.76-5.67,9.81v56.43c0,4.05,2.16,7.78,5.67,9.81l48.87,28.21c0,0,0.16,0.05,0.23,0.09c0.77,0.43,1.58,0.77,2.41,0.99c0.14,0.05,0.27,0.05,0.4,0.09c0.77,0.18,1.55,0.29,2.34,0.32c0.09,0,0.18,0.05,0.27,0.05c0.05,0,0.09,0,0.11,0c0.86,0,1.69-0.14,2.54-0.34c0.18-0.05,0.36-0.09,0.54-0.16c0.86-0.25,1.69-0.57,2.47-1.01l24.43-14.11c9.42-5.44,21.15-5.44,30.59,0c9.42,5.44,15.3,15.59,15.3,26.48v28.21c0,0.92,0.14,1.8,0.36,2.66c0.05,0.18,0.09,0.36,0.14,0.54c0.25,0.83,0.56,1.62,0.99,2.37c0.06,0.11,0.14,0.2,0.2,0.31c0.4,0.68,0.9,1.31,1.44,1.89c0.09,0.09,0.18,0.2,0.26,0.29c0.61,0.6,1.31,1.12,2.07,1.6c0.06,0.05,0.11,0.11,0.2,0.16l48.87,28.21c1.75,1.01,3.72,1.51,5.67,1.51s3.92-0.52,5.67-1.51l48.87-28.21c3.51-2.03,5.67-5.76,5.67-9.81v-56.43c0-4.05-2.16-7.78-5.67-9.81l-48.87-28.21c0,0-0.16-0.05-0.23-0.09c-0.77-0.43-1.58-0.77-2.41-0.99c-0.14-0.05-0.25-0.05-0.38-0.09c-0.79-0.18-1.57-0.29-2.38-0.32c-0.11,0-0.25,0-0.36,0c-0.86,0-1.71,0.14-2.54,0.34c-0.18,0.05-0.34,0.09-0.52,0.16c-0.86,0.25-1.69,0.57-2.47,1.01l-24.43,14.11c-9.42,5.44-21.15,5.44-30.58,0c-9.42-5.44-15.3-15.59-15.3-26.5c0-10.91,5.87-21.03,15.3-26.48C325.55,223.49,325.46,223.49,325.46,223.49z'
fill='#1DC19C'
/>
<path
d='M304.5,369.22l-48.87-28.21c0,0-0.16-0.05-0.23-0.09c-0.77-0.43-1.57-0.77-2.41-0.99c-0.14-0.05-0.27-0.05-0.4-0.09c-0.79-0.18-1.57-0.29-2.37-0.32c-0.14,0-0.25,0-0.38,0c-0.86,0-1.71,0.14-2.54,0.34c-0.18,0.05-0.34,0.09-0.52,0.16c-0.86,0.25-1.69,0.57-2.47,1.01l-24.43,14.11c-9.42,5.44-21.15,5.44-30.58,0c-9.42-5.44-15.3-15.59-15.3-26.5v-28.22c0-0.92-0.14-1.8-0.36-2.66c-0.05-0.18-0.09-0.36-0.14-0.54c-0.25-0.83-0.57-1.62-0.99-2.37c-0.06-0.11-0.14-0.2-0.2-0.32c-0.4-0.68-0.9-1.31-1.44-1.89c-0.09-0.09-0.18-0.2-0.27-0.29c-0.6-0.6-1.31-1.12-2.07-1.6c-0.06-0.05-0.11-0.11-0.2-0.16l-48.87-28.21c-3.51-2.03-7.81-2.03-11.32,0L59.28,290.6c-3.51,2.03-5.67,5.76-5.67,9.81v56.43c0,4.05,2.16,7.78,5.67,9.81l48.87,28.21c0,0,0.16,0.06,0.23,0.09c0.77,0.43,1.55,0.77,2.38,0.99c0.14,0.05,0.27,0.06,0.4,0.09c0.77,0.18,1.55,0.29,2.34,0.32c0.09,0,0.18,0.05,0.29,0.05c0.05,0,0.09,0,0.14,0c0.86,0,1.69-0.14,2.52-0.34c0.18-0.05,0.36-0.09,0.54-0.16c0.86-0.25,1.69-0.57,2.47-1.01l24.43-14.11c9.42-5.44,21.15-5.44,30.59,0c9.42,5.44,15.3,15.59,15.3,26.48v28.21c0,0.92,0.14,1.8,0.36,2.66c0.05,0.18,0.09,0.36,0.14,0.54c0.25,0.83,0.57,1.62,0.99,2.37c0.06,0.11,0.14,0.2,0.2,0.32c0.4,0.68,0.9,1.31,1.44,1.89c0.09,0.09,0.18,0.2,0.27,0.29c0.61,0.61,1.31,1.12,2.07,1.6c0.06,0.05,0.11,0.11,0.2,0.16l48.87,28.21c1.75,1.01,3.71,1.51,5.67,1.51c1.96,0,3.92-0.52,5.67-1.51l48.87-28.21c3.51-2.03,5.67-5.76,5.67-9.81v-56.43c0-4.05-2.16-7.78-5.67-9.81L304.5,369.22z'
fill='#1796E2'
/>
</svg>
)
}
export function DiscordIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg
+105
View File
@@ -0,0 +1,105 @@
import type { ToolConfig } from '@/tools/types'
import type { DevinCreateSessionParams, DevinCreateSessionResponse } from './types'
import { DEVIN_SESSION_OUTPUT_PROPERTIES } from './types'
export const devinCreateSessionTool: ToolConfig<
DevinCreateSessionParams,
DevinCreateSessionResponse
> = {
id: 'devin_create_session',
name: 'create_session',
description:
'Create a new Devin session with a prompt. Devin will autonomously work on the task described in the prompt.',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Devin API key (service user credential starting with cog_)',
},
prompt: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The task prompt for Devin to work on',
},
playbookId: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Optional playbook ID to guide the session',
},
maxAcuLimit: {
type: 'number',
required: false,
visibility: 'user-or-llm',
description: 'Maximum ACU limit for the session',
},
tags: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Comma-separated tags for the session',
},
},
request: {
url: 'https://api.devin.ai/v3/organizations/sessions',
method: 'POST',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = {
prompt: params.prompt,
}
if (params.playbookId) body.playbook_id = params.playbookId
if (params.maxAcuLimit != null) {
body.max_acu_limit = params.maxAcuLimit
}
if (params.tags) {
body.tags = params.tags.split(',').map((t: string) => t.trim())
}
return body
},
},
transformResponse: async (response: Response) => {
const data = await response.json()
return {
success: true,
output: {
sessionId: data.session_id ?? null,
url: data.url ?? null,
status: data.status ?? null,
statusDetail: data.status_detail ?? null,
title: data.title ?? null,
createdAt: data.created_at ?? null,
updatedAt: data.updated_at ?? null,
acusConsumed: data.acus_consumed ?? null,
tags: data.tags ?? null,
pullRequests: data.pull_requests ?? null,
structuredOutput: data.structured_output ?? null,
playbookId: data.playbook_id ?? null,
},
}
},
outputs: {
sessionId: DEVIN_SESSION_OUTPUT_PROPERTIES.sessionId,
url: DEVIN_SESSION_OUTPUT_PROPERTIES.url,
status: DEVIN_SESSION_OUTPUT_PROPERTIES.status,
statusDetail: DEVIN_SESSION_OUTPUT_PROPERTIES.statusDetail,
title: DEVIN_SESSION_OUTPUT_PROPERTIES.title,
createdAt: DEVIN_SESSION_OUTPUT_PROPERTIES.createdAt,
updatedAt: DEVIN_SESSION_OUTPUT_PROPERTIES.updatedAt,
acusConsumed: DEVIN_SESSION_OUTPUT_PROPERTIES.acusConsumed,
tags: DEVIN_SESSION_OUTPUT_PROPERTIES.tags,
pullRequests: DEVIN_SESSION_OUTPUT_PROPERTIES.pullRequests,
structuredOutput: DEVIN_SESSION_OUTPUT_PROPERTIES.structuredOutput,
playbookId: DEVIN_SESSION_OUTPUT_PROPERTIES.playbookId,
},
}
+70
View File
@@ -0,0 +1,70 @@
import type { ToolConfig } from '@/tools/types'
import type { DevinGetSessionParams, DevinGetSessionResponse } from './types'
import { DEVIN_SESSION_OUTPUT_PROPERTIES } from './types'
export const devinGetSessionTool: ToolConfig<DevinGetSessionParams, DevinGetSessionResponse> = {
id: 'devin_get_session',
name: 'get_session',
description:
'Retrieve details of an existing Devin session including status, tags, pull requests, and structured output.',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Devin API key (service user credential starting with cog_)',
},
sessionId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The session ID to retrieve',
},
},
request: {
url: (params) => `https://api.devin.ai/v3/organizations/sessions/${params.sessionId}`,
method: 'GET',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
}),
},
transformResponse: async (response: Response) => {
const data = await response.json()
return {
success: true,
output: {
sessionId: data.session_id ?? null,
url: data.url ?? null,
status: data.status ?? null,
statusDetail: data.status_detail ?? null,
title: data.title ?? null,
createdAt: data.created_at ?? null,
updatedAt: data.updated_at ?? null,
acusConsumed: data.acus_consumed ?? null,
tags: data.tags ?? null,
pullRequests: data.pull_requests ?? null,
structuredOutput: data.structured_output ?? null,
playbookId: data.playbook_id ?? null,
},
}
},
outputs: {
sessionId: DEVIN_SESSION_OUTPUT_PROPERTIES.sessionId,
url: DEVIN_SESSION_OUTPUT_PROPERTIES.url,
status: DEVIN_SESSION_OUTPUT_PROPERTIES.status,
statusDetail: DEVIN_SESSION_OUTPUT_PROPERTIES.statusDetail,
title: DEVIN_SESSION_OUTPUT_PROPERTIES.title,
createdAt: DEVIN_SESSION_OUTPUT_PROPERTIES.createdAt,
updatedAt: DEVIN_SESSION_OUTPUT_PROPERTIES.updatedAt,
acusConsumed: DEVIN_SESSION_OUTPUT_PROPERTIES.acusConsumed,
tags: DEVIN_SESSION_OUTPUT_PROPERTIES.tags,
pullRequests: DEVIN_SESSION_OUTPUT_PROPERTIES.pullRequests,
structuredOutput: DEVIN_SESSION_OUTPUT_PROPERTIES.structuredOutput,
playbookId: DEVIN_SESSION_OUTPUT_PROPERTIES.playbookId,
},
}
+4
View File
@@ -0,0 +1,4 @@
export { devinCreateSessionTool } from './create_session'
export { devinGetSessionTool } from './get_session'
export { devinListSessionsTool } from './list_sessions'
export { devinSendMessageTool } from './send_message'
+70
View File
@@ -0,0 +1,70 @@
import type { ToolConfig } from '@/tools/types'
import type { DevinListSessionsParams, DevinListSessionsResponse } from './types'
import { DEVIN_SESSION_LIST_ITEM_PROPERTIES } from './types'
export const devinListSessionsTool: ToolConfig<DevinListSessionsParams, DevinListSessionsResponse> =
{
id: 'devin_list_sessions',
name: 'list_sessions',
description: 'List Devin sessions in the organization. Returns up to 100 sessions by default.',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Devin API key (service user credential starting with cog_)',
},
limit: {
type: 'number',
required: false,
visibility: 'user-or-llm',
description: 'Maximum number of sessions to return (1-200, default: 100)',
},
},
request: {
url: (params) => {
const searchParams = new URLSearchParams()
if (params.limit) searchParams.set('first', String(params.limit))
const qs = searchParams.toString()
return `https://api.devin.ai/v3/organizations/sessions${qs ? `?${qs}` : ''}`
},
method: 'GET',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
}),
},
transformResponse: async (response: Response) => {
const data = await response.json()
const items = data.items ?? []
return {
success: true,
output: {
sessions: items.map((item: Record<string, unknown>) => ({
sessionId: item.session_id ?? null,
url: item.url ?? null,
status: item.status ?? null,
statusDetail: item.status_detail ?? null,
title: item.title ?? null,
createdAt: item.created_at ?? null,
updatedAt: item.updated_at ?? null,
tags: item.tags ?? null,
})),
},
}
},
outputs: {
sessions: {
type: 'array',
description: 'List of Devin sessions',
items: {
type: 'object',
properties: DEVIN_SESSION_LIST_ITEM_PROPERTIES,
},
},
},
}
+80
View File
@@ -0,0 +1,80 @@
import type { ToolConfig } from '@/tools/types'
import type { DevinSendMessageParams, DevinSendMessageResponse } from './types'
import { DEVIN_SESSION_OUTPUT_PROPERTIES } from './types'
export const devinSendMessageTool: ToolConfig<DevinSendMessageParams, DevinSendMessageResponse> = {
id: 'devin_send_message',
name: 'send_message',
description:
'Send a message to a Devin session. If the session is suspended, it will be automatically resumed. Returns the updated session state.',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Devin API key (service user credential starting with cog_)',
},
sessionId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The session ID to send the message to',
},
message: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The message to send to Devin',
},
},
request: {
url: (params) => `https://api.devin.ai/v3/organizations/sessions/${params.sessionId}/messages`,
method: 'POST',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
}),
body: (params) => ({
message: params.message,
}),
},
transformResponse: async (response: Response) => {
const data = await response.json()
return {
success: true,
output: {
sessionId: data.session_id ?? null,
url: data.url ?? null,
status: data.status ?? null,
statusDetail: data.status_detail ?? null,
title: data.title ?? null,
createdAt: data.created_at ?? null,
updatedAt: data.updated_at ?? null,
acusConsumed: data.acus_consumed ?? null,
tags: data.tags ?? null,
pullRequests: data.pull_requests ?? null,
structuredOutput: data.structured_output ?? null,
playbookId: data.playbook_id ?? null,
},
}
},
outputs: {
sessionId: DEVIN_SESSION_OUTPUT_PROPERTIES.sessionId,
url: DEVIN_SESSION_OUTPUT_PROPERTIES.url,
status: DEVIN_SESSION_OUTPUT_PROPERTIES.status,
statusDetail: DEVIN_SESSION_OUTPUT_PROPERTIES.statusDetail,
title: DEVIN_SESSION_OUTPUT_PROPERTIES.title,
createdAt: DEVIN_SESSION_OUTPUT_PROPERTIES.createdAt,
updatedAt: DEVIN_SESSION_OUTPUT_PROPERTIES.updatedAt,
acusConsumed: DEVIN_SESSION_OUTPUT_PROPERTIES.acusConsumed,
tags: DEVIN_SESSION_OUTPUT_PROPERTIES.tags,
pullRequests: DEVIN_SESSION_OUTPUT_PROPERTIES.pullRequests,
structuredOutput: DEVIN_SESSION_OUTPUT_PROPERTIES.structuredOutput,
playbookId: DEVIN_SESSION_OUTPUT_PROPERTIES.playbookId,
},
}
+168
View File
@@ -0,0 +1,168 @@
import type { OutputProperty, ToolResponse } from '@/tools/types'
export interface DevinCreateSessionParams {
apiKey: string
prompt: string
playbookId?: string
maxAcuLimit?: number
tags?: string
}
export interface DevinGetSessionParams {
apiKey: string
sessionId: string
}
export interface DevinListSessionsParams {
apiKey: string
limit?: number
}
export interface DevinSendMessageParams {
apiKey: string
sessionId: string
message: string
}
export const DEVIN_SESSION_OUTPUT_PROPERTIES = {
sessionId: {
type: 'string',
description: 'Unique identifier for the session',
},
url: {
type: 'string',
description: 'URL to view the session in the 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, waiting_for_approval, finished, inactivity, etc.)',
optional: true,
},
title: {
type: 'string',
description: 'Session title',
optional: true,
},
createdAt: {
type: 'number',
description: 'Unix timestamp when the session was created',
optional: true,
},
updatedAt: {
type: 'number',
description: 'Unix timestamp when the session was last updated',
optional: true,
},
acusConsumed: {
type: 'number',
description: 'ACUs consumed by the session',
optional: true,
},
tags: {
type: 'json',
description: 'Tags associated with the session',
optional: true,
},
pullRequests: {
type: 'json',
description: 'Pull requests created during the session',
optional: true,
},
structuredOutput: {
type: 'json',
description: 'Structured output from the session',
optional: true,
},
playbookId: {
type: 'string',
description: 'Associated playbook ID',
optional: true,
},
} as const satisfies Record<string, OutputProperty>
export const DEVIN_SESSION_LIST_ITEM_PROPERTIES = {
sessionId: {
type: 'string',
description: 'Unique identifier for the session',
},
url: {
type: 'string',
description: 'URL to view the session',
},
status: {
type: 'string',
description: 'Session status',
},
statusDetail: {
type: 'string',
description: 'Detailed status',
optional: true,
},
title: {
type: 'string',
description: 'Session title',
optional: true,
},
createdAt: {
type: 'number',
description: 'Creation timestamp (Unix)',
optional: true,
},
updatedAt: {
type: 'number',
description: 'Last updated timestamp (Unix)',
optional: true,
},
tags: {
type: 'json',
description: 'Session tags',
optional: true,
},
} as const satisfies Record<string, OutputProperty>
export interface DevinSessionOutput {
sessionId: string
url: string
status: string
statusDetail: string | null
title: string | null
createdAt: number | null
updatedAt: number | null
acusConsumed: number | null
tags: string[] | null
pullRequests: Array<{ pr_url: string; pr_state: string | null }> | null
structuredOutput: Record<string, unknown> | null
playbookId: string | null
}
export interface DevinCreateSessionResponse extends ToolResponse {
output: DevinSessionOutput
}
export interface DevinGetSessionResponse extends ToolResponse {
output: DevinSessionOutput
}
export interface DevinListSessionsResponse extends ToolResponse {
output: {
sessions: Array<{
sessionId: string
url: string
status: string
statusDetail: string | null
title: string | null
createdAt: number | null
updatedAt: number | null
tags: string[] | null
}>
}
}
export interface DevinSendMessageResponse extends ToolResponse {
output: DevinSessionOutput
}
+10
View File
@@ -262,6 +262,12 @@ import {
datadogSendLogsTool,
datadogSubmitMetricsTool,
} from '@/tools/datadog'
import {
devinCreateSessionTool,
devinGetSessionTool,
devinListSessionsTool,
devinSendMessageTool,
} from '@/tools/devin'
import {
discordAddReactionTool,
discordArchiveThreadTool,
@@ -2585,6 +2591,10 @@ export const tools: Record<string, ToolConfig> = {
dropbox_get_metadata: dropboxGetMetadataTool,
dropbox_create_shared_link: dropboxCreateSharedLinkTool,
dropbox_search: dropboxSearchTool,
devin_create_session: devinCreateSessionTool,
devin_get_session: devinGetSessionTool,
devin_list_sessions: devinListSessionsTool,
devin_send_message: devinSendMessageTool,
duckduckgo_search: duckduckgoSearchTool,
dspy_predict: predictTool,
dspy_chain_of_thought: chainOfThoughtTool,