Skip to main content
A prompt is a named piece of text that your agent sends to a model, such as its instructions or a task template. Tilde versions every prompt your agent ships, and links each model call to the prompt versions that produced it. Your code owns its prompts. You write them in your framework, as you do today. When you deploy, Tilde reads them from your code and registers any new versions. To change a prompt, you change the code and deploy again.

What Tilde records

Each distinct prompt text becomes an immutable version, identified by a hash. An unchanged prompt never creates a new version.

How prompts are registered

tilde deploy registers a deployment and its prompts in one step.
1

Tilde loads your entry module

tilde deploy loads your agent’s entry module in discovery mode. The SDK starts nothing in this mode, so your agent does not connect or run.
2

Tilde finds your prompts

It collects each prompt you declared with definePrompt, and each prompt your framework adapter recognises, such as an agent’s instructions.
3

Tilde registers the deployment

It registers the deployment with those prompts, and prints the deployment token. New text becomes a new version.
Define your agents at module scope, and export them from the entry module, so discovery can find them. See Release agents from CI.

Declare a prompt

Framework adapters register your framework’s prompts for you. Use definePrompt for prompts the adapter cannot find, or when you want variables and sections.
{{name}} is a variable, and {{> name}} includes a section. Rendering fails if a variable is missing, or a section is not declared. A successful render() marks that prompt version as active for the invocation. From then on, the SDK tags each LLM request with the active prompt versions. The gateway reads the tag, removes it, and records it with the request. Tilde also matches prompts it can see in the request itself. After each model call, the gateway compares the request’s system, developer, and user messages with the text of the deployment’s prompt versions. It does this off the request path, so matching adds no latency. For sidecar agents, the sidecar matches prompts locally. Request bodies never leave the sidecar. It sends the gateway only the matched prompt names and versions.
Tilde matches OpenAI, Anthropic, Google Gemini, Amazon Bedrock, and Cohere request formats. A dynamic prompt can only be linked through its tag, because its text exists only at runtime.
In traces, spans from a stamped model call carry the prompt name and hash.

Formats

Tilde reports some prompts as warnings, without versioning them. These include OpenAI hosted prompts, LangSmith Hub prompts, and Jinja2 templates. Their text lives outside your code.

Limits

Next steps

Manage prompts

Review versions, compare them, and see their usage.

Framework integrations

See which prompts each framework adapter registers.