Skip to content

Your prompts don't belong in your codebase

Manage, test, and deploy AI prompts without touching code. Let your AI agent write and publish them, then fetch them at runtime from any stack.

Add the Promptly MCP server, sign in, then ask your agent to do the work:

Find the prompts in this repo that are hardcoded strings. Move each one into Promptly as a draft, with an input schema for its template variables, then replace the string with a getPrompt() call.

Set up your agent →

Terminal window
bun add @promptlycms/prompts

Zero Hardcoded Prompts

Fetch prompts at runtime with getPrompt() and getPrompts(). Update wording, model, and temperature from the CMS - no code changes, no redeploys.

AI SDK Integration

getPrompt() returns model, temperature, and messages ready for Vercel AI SDK functions like generateText() and streamText().

Multi-Model Auto-Detection

Supports all AI SDK providers. Automatically resolves models from your CMS config - no manual provider setup.

Codegen for Type Safety

Run npx promptly generate to generate typed template variables via declaration merging. Full autocomplete in your editor.

Composer Workflows

Orchestrate multi-prompt workflows with getComposer(). Combine static content and prompt segments, then assemble results with formatComposer().

Built for Speed

API responses in 50-80ms. Designed for speed-critical applications where every millisecond counts.

import { createPromptlyClient } from '@promptlycms/prompts';
import { generateText } from 'ai';
const { getPrompt } = createPromptlyClient();
// fetch your prompt at runtime - no prompts harcoded in your codebase
const { userMessage, systemMessage, temperature, model } = await getPrompt(
'upsellMessage',
);
const { text } = await generateText({
model,
messages: [
{
role: 'system',
content: systemMessage,
},
{
role: 'user',
content: userMessage({
username,
persuasionLevel: 1,
recentPurchases,
}),
},
],
temperature,
});
console.log(text);