Prompt Development Kit100% Open Source

A DSL fordynamic prompts.

Echo PDK is a domain-specific language for dynamic AI prompts. Variables, conditionals, reusable sections, and AI-powered content selection - render only what's needed.

Readable. Powerful. Portable.

Write logic in your prompts, not in your code. Echo PDK renders only what matters.

customer-support.echo
You are a {{role ?? "helpful assistant"}} for {{company}}.

[#IF {{tier}} #equals(enterprise)]
You have access to advanced features and priority support.
Provide detailed, technical responses.
[ELSE IF {{tier}} #equals(pro)]
You have access to standard features.
[ELSE]
You are helping a free-tier user. Mention upgrade options when relevant.
[END IF]

[#IF {{language}} #exists]
Always respond in {{language}}.
[END IF]

[#IF {{context}} #ai_judge(Is this a sensitive topic?)]
Be especially careful and empathetic in your response.
[END IF]

[#INCLUDE safety_rules]

Dynamic Variables

Use {{variable}} for substitution with optional defaults: {{name ?? "Guest"}}. Access nested data with {{user.preferences.theme}}.

Conditional Logic

Use [#IF {{var}} #operator(arg)] to create prompts that adapt. Built-in operators: #equals, #contains, #exists, #gt, #lt, and more.

Reusable Sections

Define sections with [#SECTION name="rules"] and include them anywhere with [#INCLUDE rules]. Import from external files with [#IMPORT].

AI Judge

Advanced

Let AI evaluate conditions at render time. Use #ai_judge("Is this topic sensitive?") for intelligent, context-aware prompt assembly.

Massive Token Savings

Only render what's needed. Conditional logic means up to 75% fewer tokens sent to the LLM - lower costs and better accuracy.

JavaScript & TypeScript

Use Echo PDK in Node.js, browsers, or any JavaScript runtime. Full TypeScript support with type definitions included.

MIT Licensed

Open Source

100% open source under the MIT license. Use it anywhere - personal projects, startups, or enterprise. No restrictions.

Try It Live

Edit the template and variables, then click "Render Prompt" to see Echo PDK in action.

Echo PDK Sandbox
Template
Variables (JSON)
Rendered Output
Click "Render Prompt" to see the output...

Note: AI Judge is disabled in this sandbox. See the documentation for usage details.

Ready to use Echo PDK?

Install the package and start building dynamic prompts in minutes.

Terminal
npm install @goreal-ai/echo-pdk