Echo Prompt Development Kit - A Domain Specific Language for dynamic prompt templating.
Echo enables developers and low-coders to write logic directly in prompt templates, rendering only relevant context at runtime. This reduces tokens, cost, and LLM cognitive load.
Traditional LLM development sends "monolithic prompts" containing every possible rule and edge case. Echo solves this by:
- Massive Token Reduction: Only send relevant context (up to 75% cost savings)
- Reduced Cognitive Load: Sharper LLM focus = higher accuracy
- Maintainable Code: Modular, readable prompts instead of "spaghetti prompts"
- Deterministic Control: Logic lives in code, not AI interpretation
Before (Static Prompt):
You are a Movie Curator.
### RULES:
1. IF watching with "Girlfriend":
- Avoid Adam Sandler and Tom Cruise
- Prefer psychological thrillers
2. IF watching with "Family":
- Must be G or PG rated
- No violence or swearing
3. IF watching with "Shimon":
- We love 80s/90s classics
- Nothing after 2015 unless IMDB > 8.5
...all rules sent every time...
After (Echo Template):
You are a Movie Curator.
[#IF {{companions}} #contains(Girlfriend)]
* Avoid Adam Sandler and Tom Cruise
* Prefer psychological thrillers
[END IF]
[#IF {{companions}} #contains(Shimon)]
* We love 80s/90s classics
* Nothing after 2015 unless IMDB > 8.5
[END IF]
Recommend one movie based on these preferences.
Rendered Output (when companions = "Shimon"):
You are a Movie Curator.
* We love 80s/90s classics
* Nothing after 2015 unless IMDB > 8.5
Recommend one movie based on these preferences.
npm install @goreal-ai/echo-pdk
# or
pnpm add @goreal-ai/echo-pdkimport { createEcho } from '@goreal-ai/echo-pdk';
const echo = createEcho();
const template = `
Hello {{name}}!
[#IF {{role}} #equals(admin)]
You have full access to all features.
[ELSE]
Welcome to our platform.
[END IF]
`;
const result = await echo.render(template, {
name: 'Alice',
role: 'admin'
});
console.log(result);
// Hello Alice!
// You have full access to all features.{{variable}} # Basic variable
{{user.name}} # Nested access
{{value ?? "default"}} # Default value
[#IF {{var}} #operator(value)]
content
[ELSE IF {{other}} #exists]
alternative
[ELSE]
fallback
[END IF]
Echo provides readable names for low-coders and short aliases for developers.
| Operator | Alias | Description |
|---|---|---|
#equals(value) |
- | Exact match |
#contains(value) |
- | String/array contains |
#exists |
- | Variable is defined |
#matches(regex) |
- | Regex pattern match |
#greater_than(n) |
#gt |
Greater than |
#less_than(n) |
#lt |
Less than |
#one_of(a,b,c) |
#in |
Value in list |
#ai_gate(question) |
- | LLM-evaluated condition |
[#IMPORT ./sections/header.echo]
[#INCLUDE system_prompt]
# Install CLI
npm install -g @goreal-ai/echo-pdk-cli
# Render a template
echopdk render template.echo --context context.json
# Validate syntax
echopdk validate template.echo| Package | Description |
|---|---|
@goreal-ai/echo-pdk |
Main rendering engine, parser, evaluator |
@goreal-ai/echo-pdk-cli |
Command-line interface |
@goreal-ai/echo-pdk-language |
Language definition and schema |
Echo PDK is part of the Echostash ecosystem - a complete toolkit for prompt engineering:
┌─────────────────────────────────────────────────────────────────────────┐
│ ECHOSTASH ECOSYSTEM │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Playground │ │ Echostash │ │ Your App │ │
│ │ (Develop) │────▶│ (Manage) │◀────│ (Consume) │ │
│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
│ │ │ │ │
│ └───────────────────┴───────────────────┘ │
│ │ │
│ ┌────────▼────────┐ │
│ │ Echo DSL │ ◀── You are here │
│ └────────┬────────┘ │
│ │ │
│ ┌────────▼────────┐ │
│ │ PLP Protocol │ Open standard for prompts │
│ └────────┬────────┘ │
│ │ │
│ ┌────────▼────────┐ │
│ │ PLP Registry │ Directory of PLP servers │
│ └─────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘
| Component | Description | Link |
|---|---|---|
| Echostash | Prompt management platform | echostash.app |
| PLP | Open protocol for prompt interchange | GitHub |
| PLP Registry | Directory of PLP-compliant servers | plp-registry.echostash.app |
- Complete Usage Guide - Full tutorial with examples
- Examples - Ready-to-use template examples
- Contributing - Development guidelines
See CONTRIBUTING.md for guidelines on:
- Creating plugins and extensions
- Contributing to core
- Setting up the development environment
MIT