Quick start
This walks you from nothing to a composed instance. Deploying it to Cloudflare is covered separately in Deploy.
1. Scaffold an instance
Section titled “1. Scaffold an instance”npm create notewright@latest -- my-notescd my-notes && bun installUse --template workspace if you plan to add local providers inside a monorepo
workspace alongside the generated app:
npm create notewright@latest -- my-notes --template workspace2. Understand the non-compiling holes
Section titled “2. Understand the non-compiling holes”The generated src/index.ts contains non-compiling holes where you compose your
providers. The entry does not compile until you install your chosen provider
packages and wire them into defineApp. This is by design: the scaffolder cannot
pick providers on your behalf.
3. Install the providers you want
Section titled “3. Install the providers you want”bun add @notewright/granola-notes-provider @notewright/linear-follow-up-provider4. Compose them in src/index.ts
Section titled “4. Compose them in src/index.ts”import { defineApp } from "@notewright/core";import { granola } from "@notewright/granola-notes-provider";import { linear } from "@notewright/linear-follow-up-provider";
const app = defineApp({ notes: granola, followUp: linear });export default app;
// Re-export each Durable Object class by its exact class_name in wrangler.jsonc:export const { FollowUpAgent, SpeakerContextAgent } = app.durableObjects;export { GranolaSyncAgent } from "@notewright/granola-notes-provider";defineApp returns a plain object: fetch (the Worker handler), durableObjects
(the DO classes to re-export), and extensions (the composed providers, read by
notewright doctor). The composition is fully type-checked, so a mismatched
provider shape is a compile error, not a runtime surprise.
Next steps
Section titled “Next steps”- AI Gateway setup is required before extraction runs.
- Deploy ships the instance and wakes the agents.
- Composition model explains
defineAppin depth.