Skip to content

No new actions at runtime error

Defining new actions at runtime is not allowed.

✅ DO:

const prompt = defineDotprompt({...})
const flow = defineFlow({...}, async (input) => {
await prompt.generate(...);
})

❌ DON’T:

const flow = defineFlow({...}, async (input) => {
const prompt = defineDotprompt({...})
prompt.generate(...);
})