Variables System
Connect content and context across Koubou features.
Variables are the connective tissue of Koubou. They let content and context flow between features, making your prompts dynamic and context-aware.
Variable Syntax
All variables use double curly braces:
{{variableName}} When a prompt runs, Koubou replaces each variable with its current value.
Input Type Modifiers
In Smart Prompts, you can control how variables appear as form fields:
| Syntax | Result |
|---|---|
{{name}} | Text field (default) |
{{TEXTAREA:name}} | Multi-line textarea |
{{SELECT[a, b, c]:name}} | Dropdown with options |
Learn more: Smart Prompts — Variable Types
Dynamic Variables
These are automatically created based on your cursor position in the Rich Text editor:
| Variable | What it captures |
|---|---|
{{lastParagraph}} | The paragraph containing your cursor (or the one above if on a new line) |
{{lastSentence}} | The last sentence before your cursor |
{{selectedText}} | Any text you’ve highlighted |
{{currentHeading}} | The nearest heading above your cursor |
{{sectionContent}} | Content from cursor up to a horizontal rule |
{{h2SectionContent}} | Content from cursor up to an H2 heading |
{{h3SectionContent}} | Content from cursor up to an H3 heading |
{{h4SectionContent}} | Content from cursor up to an H4 heading |
{{h5SectionContent}} | Content from cursor up to an H5 heading |
Example use:
Continue this thought: {{lastParagraph}} Tool Variables
Reference items from Koubou’s toolbox:
| Type | Syntax | Example |
|---|---|---|
| Blueprint | {{blueprint.Name}} | {{blueprint.BlogPost}} |
| Persona | {{persona.Name}} | {{persona.MarketingManager}} |
| Smart Prompt | {{smartprompt.Name}} | {{smartprompt.EmailDraft}} |
| Memory | {{fileName.memoryKey}} | {{Brand.Voice}} |
| Note | {{note.Name}} | {{note.StyleGuide}} |
Workflow Context Variables
During workflow execution, nodes create variables that subsequent nodes can use:
- Form fields become variables with their field names
- LLM nodes can specify output variable names
- Loop nodes create iteration variables
- Any node can reference previously created variables
Example workflow:
- Form Trigger creates
{{topic}}from user input - LLM node uses
{{topic}}, outputs to{{outline}} - Next LLM node uses
{{outline}}, outputs to{{draft}} - Write to Editor inserts
{{draft}}
Variable Resolution
When a prompt or workflow runs:
- Koubou scans for
{{variable}}patterns - Each variable is replaced with its current value
- The resolved text is sent to the AI or next step
If a variable doesn’t match any known source, it becomes a form field for you to fill in.
Combining Variables
Variables can be combined in a single prompt:
Write a {{length}} article about {{topic}} in the style of {{persona.MyVoice}}.
Use this structure: {{blueprint.ArticleFormat}}
Include this context: {{Brand.Guidelines}} Quick Reference
| Variable Type | Syntax |
|---|---|
| Dynamic | {{lastParagraph}}, {{selectedText}}, etc. |
| Blueprint | {{blueprint.BlueprintName}} |
| Persona | {{persona.PersonaName}} |
| Smart Prompt | {{smartprompt.PromptName}} |
| Memory | {{MemoryFileName.MemoryKey}} |
| Note | {{note.NoteName}} |