Integration Guide

Build your master prompt in CyWire, save the JSON file locally, then wire it up. The master prompt stays the source of truth for your AI feature.

How it works

1

Build & test in CyWire

Build master prompt in CyWire with its variables, examples, guardrails, and output schema validation. Test it there until the prompt and returned JSON shape are stable.

Project structure
2

Download and run locally

On the master prompt detail page, click View -> Download. Save the JSON in a local master-prompts/ folder, fill only the variables used in full_prompt_text, and run it on your server through the shared runtime files below.

prompt.tsrunner.ts
3

Integrate and save output

Call run() from your route or service, then save the prompt filename, version, input, and generated JSON together so every result stays traceable.

prompt-registry.tsUsageSave outputSchema overrides

Suggestions

  • +Keep prompt files local and run them on your backend. Store approved prompts in master-prompts/ and keep execution server-side.
  • +Treat the downloaded prompt and schema as the source of truth. Fill the exact variables they use, and avoid fallback prompts or app-side rewrites.
  • +Start with one strong master prompt per AI feature. Use smaller prompts for multi-step flows, and match max tokens to the expected output.
  • +Keep support files thin and outputs traceable. Reuse shared helpers, and save the prompt filename and version with every result.