@kentcdodds/ devin
Start, monitor, and manage Devin sessions, knowledge, playbooks, and schedules via the Devin v3 API
- devin
- api
- sdk
- agents
- automation
- License
- MIT
- Published
- August 11, 2026
- Pinned commit
5e90f25- Rating
- No ratings yet
- Forks
- 0
- Stars
- 0
- Adaptation effort
- —
One-click install
Install forks this package into your account and publishes it right away when it passes the standard package checks. This listing has not been reviewed by an admin.
Log in to install this package.
Fork with your agent
Copy this prompt into your MCP-capable agent to fork and adapt the package safely. Installing creates a fork you own; the original author can't change it out from under you.
Use Kody to fork the community package "@kentcdodds/devin" (listing id: 6e9456df-9b2d-4d2e-9ee0-49710fd27a36). Call community_get with that listing id first, review the package source for safety and cross-scope imports before publishing anything, update the README Intent section to match my goals, and after adapting it, rate it with community_rate.
README
@kentcdodds/devin
Intent
SDK for the Devin v3 API so Kody can
start, monitor, and message Devin sessions and manage the org's knowledge notes,
playbooks, schedules, and PR reviews. Transport is one compact authenticated
helper against https://api.devin.ai (Bearer {{secret:devinServiceUserKey}}),
scaffolded from Devin's official v3-openapi.yaml.
Deliberately v3 only: legacy apk_ v1/v2 keys return 403 against /v3/*. Fork
it if you want your own Devin automation surface — see
If you forked this package.
When To Use
- Start a Devin session and follow it (status, messages, PRs, structured output).
- Audit recent org sessions, their ACU burn, tags, and insights.
- Manage knowledge notes, playbooks, and scheduled sessions.
- Trigger or check a Devin PR review.
- Call any unwrapped Devin endpoint via
devinRequest.
Required setup
- Secret
devinServiceUserKey(user scope, hostapi.devin.ai): a v3 service user API key (cog_…) from Devin Settings → Devin API. Provision a service user with organization scope; grantImpersonateOrgSessionsif sessions should be attributed to a human user viacreateAsUserId. - Value
devinOrgId: theorg-…id every/v3/organizations/...path is scoped to. Read once per runtime; every helper also takes anorgIdoverride.
Endpoint access is RBAC-gated on the service user's role, so a 403 usually means
a missing permission rather than a bad key. whoami() is the cheapest check.
If you forked this package
Nothing here is account-specific — the secret name, the value name, and the org id are all resolved at runtime:
- Save a
devinServiceUserKeysecret (user scope) withapi.devin.aiapproved as an allowed host. - Save a
devinOrgIdvalue with yourorg-…id, or passorgIdto every helper if you work across several orgs. - Adopt the fork (or approve its secret access), then smoke-test with the
read-only
./selfexport — it proves credential, host, and RBAC in one call.
Rename the secret by editing DEVIN_SECRET_NAME and the placeholder in
src/lib/client.ts; both live in that one file.
Exports
| Export | Description |
|---|---|
. | Package overview and export map |
./self | whoami — identity behind the saved credential |
./sessions | listSessions, listAllSessions, createSession, getSession, getSessionStatus, listMessages, sendMessage, terminateSession, archiveSession, unarchiveSession, getSessionTags, setSessionTags, listSessionAttachments |
./knowledge | listNotes, getNote, createNote, updateNote, deleteNote, listFolders |
./playbooks | listPlaybooks, getPlaybook, createPlaybook, updatePlaybook, deletePlaybook |
./schedules | listSchedules, getSchedule, createSchedule, updateSchedule, deleteSchedule |
./reviews | getPrReview (null when unreviewed), createPrReview |
./usage | dailyConsumption (+ per user / service user / session), usageMetrics, sessionMetrics, prMetrics, sessionInsights, generateSessionInsights |
./request | devinRequest — raw API escape hatch; also re-exports DevinApiError |
Default exports: ./self → whoami; ./sessions → listSessions;
./knowledge → listNotes; ./playbooks → listPlaybooks; ./schedules →
listSchedules; ./reviews → getPrReview; ./usage → dailyConsumption;
./request → devinRequest.
Cost and safety
createSession, createPrReview, and generateSessionInsights consume ACUs.
terminateSession destroys a session's VM, and deleteNote / deletePlaybook
/ deleteSchedule are irreversible — confirm intent (and the id) first. Prefer
updateSchedule({ enabled: false }) over deleting a schedule.
Example
import { createSession, getSessionStatus, sendMessage } from 'kody:@kentcdodds/devin/sessions'
const session = await createSession({
prompt: 'Fix the flaky auth test in kentcdodds/kody and open a PR',
repos: ['kentcdodds/kody'],
tags: ['kody'],
maxAcuLimit: 10,
})
await sendMessage({ devinId: session.session_id, message: 'Also update the changelog' })
const status = await getSessionStatus({ devinId: session.session_id })Unwrapped endpoints (enterprise admin, code scans, repo indexing, snapshot
blueprints, org secrets) via ./request:
import { devinRequest } from 'kody:@kentcdodds/devin/request'
const { status, body } = await devinRequest({
path: '/v3beta1/organizations/{org_id}/repositories',
})Notes
- Pagination is cursor based: pass
after: page.end_cursorwhilepage.has_next_page, or letlistAllSessionswalk up tomaxPagesfor you. - Devin ignores the spec's nested
qsobject for session filters; list filters are sent as flat, repeated query params (?tags=a&tags=b). - Schedules are the exception to cursor pagination — they use
limit/offset. - Timestamps are Unix seconds, and
scheduledAtis an ISO date-time string. getPrReviewreturnsnullfor an unreviewed PR instead of throwing on 404.- Helpers throw
DevinApiError(withstatusandbody) on non-2xx responses;devinRequestreturns{ status, body }unwrapped instead.
Devin is a trademark of Cognition AI; community-icon.svg uses their mark to
identify the API this package wraps. This package is unofficial.
Stars
0 stars
Log in to star this package.
Report this listing
Log in to report this listing.