COG-GTM/devin-sdk-examples, one folder per
example. Each is a standalone project with its own README and package.json that installs the
published @cognition-ai packages from npm. The pages here explain what each one shows and where
to look in the code; the code itself lives on GitHub.
Quickstart
createDevin() → createSession() → run(), then a switch over every event type. Cloud or
local with one flag.Anthropic agent patterns
Chaining, routing, parallelization, orchestrator-workers and evaluator-optimizer, each built on
typed structured output.
Harness chat
A Next.js chat where the AI SDK
HarnessAgent runs Devin in a Vercel Sandbox, streamed to
useChat.Cloudflare Agents chat
A chat on Cloudflare Workers where each conversation is an
AIChatAgent Durable Object driving
a Devin cloud session, streamed to useAgentChat.Session board
A Next.js board of every cloud session, moving live between working, needs you and done, on
one server-side WebSocket.
Ticket enricher
A help desk webhook whose business logic is a Devin session returning a typed
Enrichment.Running any of them
You need Bun and Node.js 22 or newer. Clone the repository and install inside the example you want; there is no shared build step:bun run … script (listed on its page). Each package.json pins the
@cognition-ai packages it uses to the same published beta, currently 0.0.1-beta.7; see
Installing the beta for how the beta dist-tag works.
The examples track the current beta, and the repository is tagged per release
(v0.0.1-beta.7, v0.0.1-beta.6, v0.0.1-beta.5, v0.0.1-beta.4, v0.0.1-beta.2, v0.0.1-beta.1, …), so the examples that match an earlier version are a
git checkout of its tag. Two of the six need a later beta than 0.0.1-beta.1 — the quickstart
needs 0.0.1-beta.6 or later (it passes acpVersion to createDevin() for its --acp-v1 flag, an
option added in beta.6) and the Cloudflare Agents chat needs 0.0.1-beta.2 or later (its package is
new in beta.2); the other four also compile against 0.0.1-beta.1.
