EchoStash
Docs

Quick Start

Your first Echo template

Installation

bash
npm install @goreal-ai/echo-pdk

Your First Dynamic Prompt

Create a prompt that adapts based on context:

support-agent.echo
// support-agent.echo
You are a support agent for {{company}}.

[#IF {{customer.tier}} #equals(Premium)]
This is a Premium customer - prioritize their request.
[END IF]

Help them with: {{issue}}

Simple Render (Returns String)

import { createEcho } from "@goreal-ai/echo-pdk"

const echo = createEcho()

const text = await echo.render(template, {
  company: "Acme Inc",
  customer: { tier: "Premium" },
  issue: "billing question"
})

// Result:
// You are a support agent for Acme Inc.
// This is a Premium customer - prioritize their request.
// Help them with: billing question

Messages Render (Returns Messages + Tools + Meta + Schema)

For prompts with [#ROLE], [#TOOL], [#SCHEMA], or meta templates, use renderMessages():

import { createEcho } from "@goreal-ai/echo-pdk"

const echo = createEcho()

const result = await echo.renderMessages(template, variables)

result.messages  // Array of { role, content } messages
result.tools     // Array of tool definitions (OpenAI format)
result.meta      // { provider, model, temperature, ... }
result.schema    // JSON Schema object for structured output