Quickstart
Author a prompt in Trodo, then fetch and compile it from Node or Python.
You'll create a prompt, label a version production, and fetch it from your app. Five minutes.
1. Create the prompt
Open Prompts in the sidebar and click New prompt. Give it a name your app will fetch by — say refund-agent. Names are slug-ish (a-z, 0-9, -, _, .).
In the Messages editor, write a system message and a user message. Use {{double braces}} for anything filled at runtime:
You are a refund support agent for {{company}}.
Be concise and never promise a refund you can't confirm.{{question}}Open the Model config section and set a provider and model as JSON, e.g. { "provider": "openai", "model": "gpt-4o" }. Open the Variables section — company and question were auto-detected; optionally give company a default like your company.
Click Save version, and in the dialog apply the production label. You've shipped v1.
2. Fetch it from your app
Install the SDK if you haven't:
npm install trodo-nodepip install trodo-pythonThen fetch and compile. get follows the production label by default; compile fills the variables and returns a ready-to-send payload:
import trodo from 'trodo-node';
trodo.init({ siteId: process.env.TRODO_SITE_ID! });
const prompt = await trodo.prompts.get('refund-agent');
const { messages, model } = prompt.compile({
company: 'Acme',
question: 'where is my order?',
});
const answer = await openai.chat.completions.create({
model: model.model ?? 'gpt-4o',
temperature: model.temperature ?? 0.2,
messages,
});import trodo
trodo.init(site_id=os.environ["TRODO_SITE_ID"])
prompt = trodo.get_prompt("refund-agent")
compiled = prompt.compile(
company="Acme",
question="where is my order?",
)
answer = openai.chat.completions.create(
model=compiled.model.get("model", "gpt-4o"),
temperature=compiled.model.get("temperature", 0.2),
messages=compiled.messages,
)get hands you the whole prompt with its messages still holding {{company}} and {{question}}; compile(values) fills those in and returns { messages, model, tools, response_format }, with the messages array already in the shape providers expect — you don't rebuild it. (model / tools / response_format are carried straight through from the prompt.) See Concepts for the exact split.
3. Ship a change
Edit the prompt, Save version, and move production to the new version. Your running app picks it up within one cache window (60s by default) — no redeploy.
Iterating on the wording? Do it in the Playground first — run the prompt across models side by side and score the outputs — then save the winner as a version here.
Next
- Concepts — the data model and the exact shapes
getandcompilereturn. - Initialization & core calls — everything the editor can do.
- Variables & templating — defaults and the template syntax.
- Caching & availability — make the fetch resilient before you go to production.
Overview
Author, version, and ship prompts from Trodo — structured messages, typed model config, declared variables, and MCP tools — fetched at runtime by name so a prompt change never needs a redeploy.
Concepts
Everything conceptual in one place: prompts, versions, labels, tags, variables, placeholders, the get/compile split, the exact data shapes, version resolution, and how caching keeps a fetch off your critical path.