Skip to content

Commit f789d79

Browse files
committed
improvement(devin): update tool names and add manual docs description
1 parent 3b80072 commit f789d79

File tree

5 files changed

+89
-61
lines changed

5 files changed

+89
-61
lines changed

apps/docs/content/docs/en/tools/devin.mdx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,28 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
1010
color="#12141A"
1111
/>
1212

13+
{/* MANUAL-CONTENT-START:intro */}
14+
[Devin](https://devin.ai/) is an autonomous AI software engineer by Cognition that can independently write, run, debug, and deploy code.
15+
16+
With Devin, you can:
17+
18+
- **Automate coding tasks**: Assign software engineering tasks and let Devin autonomously write, test, and iterate on code
19+
- **Manage sessions**: Create, monitor, and interact with Devin sessions to track progress on assigned tasks
20+
- **Guide active work**: Send messages to running sessions to provide additional context, redirect efforts, or answer questions
21+
- **Retrieve structured output**: Poll completed sessions for pull requests, structured results, and detailed status
22+
- **Control costs**: Set ACU (Autonomous Compute Unit) limits to cap spending on long-running tasks
23+
- **Standardize workflows**: Use playbook IDs to apply repeatable task patterns across sessions
24+
25+
In Sim, the Devin integration enables your agents to programmatically manage Devin sessions as part of their workflows:
26+
27+
- **Create sessions**: Kick off new Devin sessions with a prompt describing the task, optional playbook, ACU limits, and tags
28+
- **Get session details**: Retrieve the full state of a session including status, pull requests, structured output, and resource consumption
29+
- **List sessions**: Query all sessions in your organization with optional pagination
30+
- **Send messages**: Communicate with active or suspended sessions to provide guidance, and automatically resume suspended sessions
31+
32+
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.
33+
{/* MANUAL-CONTENT-END */}
34+
1335
## Usage Instructions
1436

1537
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.
@@ -40,6 +62,7 @@ Integrate Devin into your workflow. Create sessions to assign coding tasks, send
4062
| `tags` | json | Session tags |
4163
| `pullRequests` | json | Pull requests created during the session |
4264
| `structuredOutput` | json | Structured output from the session |
65+
| `playbookId` | string | Associated playbook ID |
4366
| `sessions` | json | List of sessions |
4467

4568
### `devin_get_session`
@@ -64,6 +87,7 @@ Integrate Devin into your workflow. Create sessions to assign coding tasks, send
6487
| `tags` | json | Session tags |
6588
| `pullRequests` | json | Pull requests created during the session |
6689
| `structuredOutput` | json | Structured output from the session |
90+
| `playbookId` | string | Associated playbook ID |
6791
| `sessions` | json | List of sessions |
6892

6993
### `devin_list_sessions`
@@ -88,6 +112,7 @@ Integrate Devin into your workflow. Create sessions to assign coding tasks, send
88112
| `tags` | json | Session tags |
89113
| `pullRequests` | json | Pull requests created during the session |
90114
| `structuredOutput` | json | Structured output from the session |
115+
| `playbookId` | string | Associated playbook ID |
91116
| `sessions` | json | List of sessions |
92117

93118
### `devin_send_message`
@@ -112,6 +137,7 @@ Integrate Devin into your workflow. Create sessions to assign coding tasks, send
112137
| `tags` | json | Session tags |
113138
| `pullRequests` | json | Pull requests created during the session |
114139
| `structuredOutput` | json | Structured output from the session |
140+
| `playbookId` | string | Associated playbook ID |
115141
| `sessions` | json | List of sessions |
116142

117143

apps/sim/tools/devin/create-session.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const devinCreateSessionTool: ToolConfig<
77
DevinCreateSessionResponse
88
> = {
99
id: 'devin_create_session',
10-
name: 'Devin Create Session',
10+
name: 'create_session',
1111
description:
1212
'Create a new Devin session with a prompt. Devin will autonomously work on the task described in the prompt.',
1313
version: '1.0.0',

apps/sim/tools/devin/get-session.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { DEVIN_SESSION_OUTPUT_PROPERTIES } from './types'
44

55
export const devinGetSessionTool: ToolConfig<DevinGetSessionParams, DevinGetSessionResponse> = {
66
id: 'devin_get_session',
7-
name: 'Devin Get Session',
7+
name: 'get_session',
88
description:
99
'Retrieve details of an existing Devin session including status, tags, pull requests, and structured output.',
1010
version: '1.0.0',

apps/sim/tools/devin/list-sessions.ts

Lines changed: 60 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -2,69 +2,71 @@ import type { ToolConfig } from '@/tools/types'
22
import type { DevinListSessionsParams, DevinListSessionsResponse } from './types'
33
import { DEVIN_SESSION_LIST_ITEM_PROPERTIES } from './types'
44

5-
export const devinListSessionsTool: ToolConfig<DevinListSessionsParams, DevinListSessionsResponse> =
6-
{
7-
id: 'devin_list_sessions',
8-
name: 'Devin List Sessions',
9-
description: 'List Devin sessions in the organization. Returns up to 100 sessions by default.',
10-
version: '1.0.0',
5+
export const devinListSessionsTool: ToolConfig<
6+
DevinListSessionsParams,
7+
DevinListSessionsResponse
8+
> = {
9+
id: 'devin_list_sessions',
10+
name: 'list_sessions',
11+
description: 'List Devin sessions in the organization. Returns up to 100 sessions by default.',
12+
version: '1.0.0',
1113

12-
params: {
13-
apiKey: {
14-
type: 'string',
15-
required: true,
16-
visibility: 'user-only',
17-
description: 'Devin API key (service user credential starting with cog_)',
18-
},
19-
limit: {
20-
type: 'number',
21-
required: false,
22-
visibility: 'user-or-llm',
23-
description: 'Maximum number of sessions to return (1-200, default: 100)',
24-
},
14+
params: {
15+
apiKey: {
16+
type: 'string',
17+
required: true,
18+
visibility: 'user-only',
19+
description: 'Devin API key (service user credential starting with cog_)',
2520
},
26-
27-
request: {
28-
url: (params) => {
29-
const searchParams = new URLSearchParams()
30-
if (params.limit) searchParams.set('first', String(Number(params.limit)))
31-
const qs = searchParams.toString()
32-
return `https://api.devin.ai/v3/organizations/sessions${qs ? `?${qs}` : ''}`
33-
},
34-
method: 'GET',
35-
headers: (params) => ({
36-
Authorization: `Bearer ${params.apiKey}`,
37-
}),
21+
limit: {
22+
type: 'number',
23+
required: false,
24+
visibility: 'user-or-llm',
25+
description: 'Maximum number of sessions to return (1-200, default: 100)',
3826
},
27+
},
3928

40-
transformResponse: async (response: Response) => {
41-
const data = await response.json()
42-
const items = data.items ?? []
43-
return {
44-
success: true,
45-
output: {
46-
sessions: items.map((item: Record<string, unknown>) => ({
47-
sessionId: item.session_id ?? null,
48-
url: item.url ?? null,
49-
status: item.status ?? null,
50-
statusDetail: item.status_detail ?? null,
51-
title: item.title ?? null,
52-
createdAt: item.created_at ?? null,
53-
updatedAt: item.updated_at ?? null,
54-
tags: item.tags ?? null,
55-
})),
56-
},
57-
}
29+
request: {
30+
url: (params) => {
31+
const searchParams = new URLSearchParams()
32+
if (params.limit) searchParams.set('first', String(Number(params.limit)))
33+
const qs = searchParams.toString()
34+
return `https://api.devin.ai/v3/organizations/sessions${qs ? `?${qs}` : ''}`
5835
},
36+
method: 'GET',
37+
headers: (params) => ({
38+
Authorization: `Bearer ${params.apiKey}`,
39+
}),
40+
},
41+
42+
transformResponse: async (response: Response) => {
43+
const data = await response.json()
44+
const items = data.items ?? []
45+
return {
46+
success: true,
47+
output: {
48+
sessions: items.map((item: Record<string, unknown>) => ({
49+
sessionId: item.session_id ?? null,
50+
url: item.url ?? null,
51+
status: item.status ?? null,
52+
statusDetail: item.status_detail ?? null,
53+
title: item.title ?? null,
54+
createdAt: item.created_at ?? null,
55+
updatedAt: item.updated_at ?? null,
56+
tags: item.tags ?? null,
57+
})),
58+
},
59+
}
60+
},
5961

60-
outputs: {
61-
sessions: {
62-
type: 'array',
63-
description: 'List of Devin sessions',
64-
items: {
65-
type: 'object',
66-
properties: DEVIN_SESSION_LIST_ITEM_PROPERTIES,
67-
},
62+
outputs: {
63+
sessions: {
64+
type: 'array',
65+
description: 'List of Devin sessions',
66+
items: {
67+
type: 'object',
68+
properties: DEVIN_SESSION_LIST_ITEM_PROPERTIES,
6869
},
6970
},
70-
}
71+
},
72+
}

apps/sim/tools/devin/send-message.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { DEVIN_SESSION_OUTPUT_PROPERTIES } from './types'
44

55
export const devinSendMessageTool: ToolConfig<DevinSendMessageParams, DevinSendMessageResponse> = {
66
id: 'devin_send_message',
7-
name: 'Devin Send Message',
7+
name: 'send_message',
88
description:
99
'Send a message to a Devin session. If the session is suspended, it will be automatically resumed. Returns the updated session state.',
1010
version: '1.0.0',

0 commit comments

Comments
 (0)