A language
for prompts.
Variables, conditionals, sections, imports. Write prompts that adapt at runtime — and now build them visually or with AI-assisted tooling.
Readable. Powerful. Portable.
Write logic in your prompts, not in your code. Echo PDK renders only what matters.
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_gate(Is this a sensitive topic?)]
Be especially careful and empathetic in your response.
[END IF]
[#INCLUDE safety_rules]Visual Editor
NewAST-based node editor with round-trip sync to source. Drag, drop, and connect prompt blocks visually while the DSL stays in sync.
AI Assist Bar
NewSnippet builders for variables, conditionals, and sections. Describe what you need and get valid DSL inserted at the cursor.
Testing in Playground
NewYAML eval configs with Monaco validation. Write assertions, run test suites, and see results inline — all inside the playground.
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 Gate
AdvancedLet AI evaluate conditions at render time. Use #ai_gate("Is this topic sensitive?") for intelligent, context-aware prompt assembly.
<50ms Render (p99)
Only render what's needed. Conditional logic means up to 75% fewer tokens sent to the LLM — lower costs, faster responses, better accuracy.
Multi-Provider
Unified interface for OpenAI and Anthropic. Same syntax, any model — switch providers without changing your templates.
VS Code Extension
Full language support in VS Code — syntax highlighting, real-time diagnostics, autocomplete, hover docs, and a prompt explorer sidebar with PLP integration.
JavaScript & TypeScript
Use Echo PDK in Node.js, browsers, or any JavaScript runtime. Full TypeScript support with type definitions included.
MIT Licensed
Open Source100% 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.
Note: AI Gate is disabled in this sandbox. See the documentation for usage details.
Write prompts that adapt at runtime.
Install the package, build with the visual editor, and test with built-in evals.
npm install@goreal-ai/echo-pdk