Core
User interface
Theme
Colors are theme tokens: CSS variables inglobals.css, mapped to Tailwind classes in tailwind.config.ts. They cover surfaces, text, borders, the primary color, five chart colors, and status colors for success, warning, info and errors. Each token has a light and a dark value, so the app follows the viewer’s light or dark mode without extra code.
New apps use Inter for text and Geist Mono for code. If your organization has a Brand Theme, new apps start with its colors, fonts and logo instead. Brand fonts must be Google Fonts. Other fonts are replaced with Inter. See Building UIs.
Data and forms
Collaboration and rich text
Liveblocks is set up for you. There’s no API key to add, and each app’s collaboration rooms are kept separate from other apps. Shared rooms are open to everyone who can use the app, and the AI can make a room private to one person for personal data.
Database and files
Each app has its own PostgreSQL database and its own file storage. See App data.- The AI creates and changes tables by running SQL directly. The app doesn’t use an ORM:
prisma/schema.prismais a locked placeholder. - The app’s server code queries the database with SQL through a helper in
src/server-lib. - Uploaded files are stored by DuetAgents. The app uses the helpers in
src/client-lib/files.tsandsrc/server-lib/files.ts, and the route atsrc/app/api/duet-files. There’s no storage account or key to set up. - Apps can also read and write your organization’s shared databases, and query external PostgreSQL, MySQL and Redshift databases your organization has connected. See Databases.
Background jobs
Apps run scheduled and background work with Inngest. Jobs live insrc/inngest/functions. See Background jobs.
Sign-in and users
Duet Agents handles sign-in, so apps have no login page of their own. Everyone who opens a published app is signed in to Duet Agents, and the app can read the current user’s name, email and profile image. That’s enough to build per-person features like “show my tasks”. See Access and sharing.Connections and AI coworkers
From the app’s code, the AI can use:- Integrations your organization or you have connected. See Integrations.
- Custom APIs. Duet Agents adds the API’s credentials to each request, so they never appear in the app’s code.
- Data queries.
- Your organization’s people: the name and email of each Duet Agents member and, when Slack is connected, of the people in your Slack workspace.
- Your organization’s contacts: the people outside your organization saved in DuetAgents. Each viewer sees the shared contacts plus their own private ones.
- AI coworkers that have access to the app, called from server code to get a structured judgment back. See Give coworkers access to apps.
Built-in integrations
These work in every app without connecting anything:Testing
The AI writes unit tests with Jest and runs TypeScript type checks after its changes. See Working with code.Packages
The starter project already includes everything listed on this page. You can’t add arbitrary npm packages: neither you nor the AI can runnpm install, and package.json is locked.
The AI can install these extra packages when a feature needs them:
Ask for the feature and the AI installs what it needs:
Let us import customers from a CSV or Excel file, and export the filtered list back to Excel.
Add a “Download invoice” button that creates a PDF of the invoice.
Create a workflow builder where people add steps, connect them with arrows and configure each step.If you need something the stack doesn’t cover, describe what you’re trying to build. The AI can often get there with what’s available, for example by drawing a custom visualization with SVG instead of adding a charting library.
Code conventions
The AI follows the Next.js App Router conventions:- Each folder in
src/appis a URL path, withpage.tsxfor pages androute.tsfor API routes. - Components render on the server unless the file starts with
"use client", which interactive components need. - Route parameters, like the
idin/customers/[id], are read by awaitingparams:
README.md for each app, with its goal, its main technical decisions and its design. It reads the README before each new feature or UI change. See Building UIs.
