Devin é um engenheiro de software de IA autônomo da Cognition que pode escrever, executar, depurar e fazer deploy de código de forma independente.
Com o Devin, você pode:
- Automatizar tarefas de código: Atribua tarefas de engenharia de software e deixe o Devin escrever, testar e iterar no código de forma autônoma
- Gerenciar sessões: Crie, monitore e interaja com sessões do Devin para acompanhar o progresso das tarefas atribuídas
- Guiar o trabalho ativo: Envie mensagens para sessões em execução para fornecer contexto adicional, redirecionar esforços ou responder perguntas
- Recuperar saída estruturada: Consulte sessões concluídas para pull requests, resultados estruturados e status detalhado
- Controlar custos: Defina limites de ACU (Autonomous Compute Unit) para limitar gastos em tarefas de longa duração
- Padronizar fluxos de trabalho: Use IDs de playbook para aplicar padrões de tarefa repetíveis entre sessões
Na Zoen, a integração com o Devin permite que seus agentes gerenciem sessões do Devin de forma programática como parte dos seus fluxos de trabalho:
- Criar sessões: Inicie novas sessões do Devin com um prompt descrevendo a tarefa, playbook opcional, limites de ACU e tags
- Obter detalhes da sessão: Recupere o estado completo de uma sessão, incluindo status, pull requests, saída estruturada e consumo de recursos
- Listar sessões: Consulte todas as sessões da sua organização com paginação opcional
- Enviar mensagens: Comunique-se com sessões ativas ou suspensas para fornecer orientação e retome automaticamente sessões suspensas
Isso permite cenários poderosos de automação, como disparar geração de código a partir de eventos upstream, aguardar a conclusão antes de consumir resultados, orquestrar pipelines de desenvolvimento em várias etapas e integrar a saída do Devin em fluxos de agentes mais amplos.
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.
Create a new Devin session with a prompt. Devin will autonomously work on the task described in the prompt.
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Devin API key (service user credential starting with cog_) |
orgId | string | Yes | Devin organization ID (prefixed with org-) |
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 |
| 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 (array of strings) |
pullRequests | json | Pull requests created during the session ([{pr_url, pr_state}]) |
structuredOutput | json | Structured output from the session |
playbookId | string | Associated playbook ID |
isArchived | boolean | Whether the session is archived |
Retrieve details of an existing Devin session including status, tags, pull requests, and structured output.
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Devin API key (service user credential starting with cog_) |
orgId | string | Yes | Devin organization ID (prefixed with org-) |
sessionId | string | Yes | The session ID to retrieve |
| 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 (array of strings) |
pullRequests | json | Pull requests created during the session ([{pr_url, pr_state}]) |
structuredOutput | json | Structured output from the session |
playbookId | string | Associated playbook ID |
isArchived | boolean | Whether the session is archived |
List Devin sessions in the organization. Returns up to 100 sessions by default.
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Devin API key (service user credential starting with cog_) |
orgId | string | Yes | Devin organization ID (prefixed with org-) |
limit | number | No | Maximum number of sessions to return (1-200, default: 100) |
after | string | No | Pagination cursor (endCursor from a previous response) to fetch the next page |
| 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 (array of strings) |
↳ acusConsumed | number | ACUs consumed by the session |
↳ pullRequests | json | Pull requests created during the session ([{pr_url, pr_state}]) |
↳ playbookId | string | Associated playbook ID |
↳ isArchived | boolean | Whether the session is archived |
endCursor | string | Pagination cursor for the next page, or null if last page |
hasNextPage | boolean | Whether more sessions are available |
total | number | Total number of sessions, if provided |
Send a message to a Devin session. If the session is suspended, it will be automatically resumed. Returns the updated session state.
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Devin API key (service user credential starting with cog_) |
orgId | string | Yes | Devin organization ID (prefixed with org-) |
sessionId | string | Yes | The session ID to send the message to |
message | string | Yes | The message to send to Devin |
| 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 (array of strings) |
pullRequests | json | Pull requests created during the session ([{pr_url, pr_state}]) |
structuredOutput | json | Structured output from the session |
playbookId | string | Associated playbook ID |
isArchived | boolean | Whether the session is archived |
List the messages exchanged in a Devin session, including messages from both the user and Devin.
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Devin API key (service user credential starting with cog_) |
orgId | string | Yes | Devin organization ID (prefixed with org-) |
sessionId | string | Yes | The session ID to list messages for |
limit | number | No | Maximum number of messages to return (1-200, default: 100) |
after | string | No | Pagination cursor (endCursor from a previous response) to fetch the next page |
| Parameter | Type | Description |
|---|
messages | array | Messages exchanged in the session |
↳ eventId | string | Unique identifier for the message event |
↳ source | string | Origin of the message (devin or user) |
↳ message | string | The message content |
↳ createdAt | number | Unix timestamp when the message was created |
endCursor | string | Pagination cursor for the next page, or null if last page |
hasNextPage | boolean | Whether more messages are available |
total | number | Total number of messages, if provided |
List the files uploaded to or produced by a Devin session.
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Devin API key (service user credential starting with cog_) |
orgId | string | Yes | Devin organization ID (prefixed with org-) |
sessionId | string | Yes | The session ID to list attachments for |
| Parameter | Type | Description |
|---|
attachments | array | Attachments associated with the session |
↳ attachmentId | string | Unique identifier for the attachment |
↳ name | string | Attachment file name |
↳ url | string | URL to download the attachment |
↳ source | string | Origin of the attachment (devin or user) |
↳ contentType | string | MIME type of the attachment |
Retrieve the tags currently applied to a Devin session.
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Devin API key (service user credential starting with cog_) |
orgId | string | Yes | Devin organization ID (prefixed with org-) |
sessionId | string | Yes | The session ID to retrieve tags for |
| Parameter | Type | Description |
|---|
tags | json | Tags applied to the session (array of strings) |
Add tags to a Devin session without removing existing tags (max 50 tags total).
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Devin API key (service user credential starting with cog_) |
orgId | string | Yes | Devin organization ID (prefixed with org-) |
sessionId | string | Yes | The session ID to add tags to |
tags | string | Yes | Tags to append to the session (comma-separated string or array of strings) |
| Parameter | Type | Description |
|---|
tags | json | Updated list of tags on the session (array of strings) |
Replace all tags on a Devin session with a new set of tags (max 50 tags).
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Devin API key (service user credential starting with cog_) |
orgId | string | Yes | Devin organization ID (prefixed with org-) |
sessionId | string | Yes | The session ID to replace tags on |
tags | string | Yes | Tags that will overwrite the existing tags (comma-separated string or array of strings) |
| Parameter | Type | Description |
|---|
tags | json | Updated list of tags on the session (array of strings) |
Archive a Devin session. Archived sessions can still be viewed but cannot be modified or resumed.
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Devin API key (service user credential starting with cog_) |
orgId | string | Yes | Devin organization ID (prefixed with org-) |
sessionId | string | Yes | The session ID to archive |
| 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 (array of strings) |
pullRequests | json | Pull requests created during the session ([{pr_url, pr_state}]) |
structuredOutput | json | Structured output from the session |
playbookId | string | Associated playbook ID |
isArchived | boolean | Whether the session is archived |
Terminate a Devin session. Optionally archive the session instead of permanently terminating it.
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | Devin API key (service user credential starting with cog_) |
orgId | string | Yes | Devin organization ID (prefixed with org-) |
sessionId | string | Yes | The session ID to terminate |
archive | boolean | No | Archive the session instead of permanently terminating it (default: false) |
| 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 (array of strings) |
pullRequests | json | Pull requests created during the session ([{pr_url, pr_state}]) |
structuredOutput | json | Structured output from the session |
playbookId | string | Associated playbook ID |
isArchived | boolean | Whether the session is archived |