Import
import { prompt, promptRegistry } from "veryfront/prompt";
Examples
import { prompt } from "veryfront/prompt";
const summarize = prompt({
id: "summarize",
description: "Summarize text in a chosen style",
content: "Summarize the following text in {style} style:\n\n{text}",
});
const content = await summarize.getContent({
style: "technical",
text: "The runtime loads tools before an agent step starts.",
});
API
prompt(config)
Create a typed prompt definition.
Returns: Prompt
Exports
Functions
| Name | Description | Source |
|---|---|---|
prompt | Create a typed prompt definition. | source |
Types
| Name | Description | Source |
|---|---|---|
Prompt | Public API contract for prompt. | source |
PromptArgument | Public MCP argument metadata for a prompt. | source |
PromptConfig | Configuration used by prompt. | source |
PromptGenerateFn | Generate prompt content from interpolation variables. | source |
PromptMCPConfig | Public MCP exposure metadata for a prompt. | source |
PromptRenderContext | Cancellation and deadline controls for one prompt render. | source |
Constants
| Name | Description | Source |
|---|---|---|
promptRegistry | Application-facing project-scoped prompt registry value. | source |