Hello everyone, and welcome to the final day of our launch week!
Before we get to today’s announcement, here’s a quick recap of what we launched this week:
- Day 1: Evaluation Dashboard for comprehensive evaluation insights
- Day 2: Online Evaluation for production monitoring
- Day 3: Evaluation SDK for programmatic evaluation workflows
- Day 4: We open sourced all core evaluation functionality in Agenta
Today: Jinja2 Template Support in the Playground
We’re excited to announce a powerful update to the Agenta prompt playground. You can now use Jinja2 templating in your prompts.
This means you can add sophisticated logic directly into your prompt templates. Use conditional statements, apply filters to variables, and transform data on the fly.
Example
Here’s a prompt template that uses Jinja2 to adapt based on user expertise level:
You are {% if expertise_level == "beginner" %}a friendly teacher who explains concepts in simple terms{% else %}a technical expert providing detailed analysis{% endif %}.
Explain {{ topic }} {% if include_examples %}with practical examples{% endif %}.
{% if False %} {{expertise_level}} {{include_examples}} {% endif %}
Note: The {% if False %} block makes variables available to the playground without including them in the final prompt.
Using Jinja2 Prompts
When you fetch a Jinja2 prompt via the SDK, you get the template format included in the configuration:
{
"prompt": {
"messages": [
{
"role": "user",
"content": "You are {% if expertise_level == \"beginner\" %}a friendly teacher...{% endif %}"
}
],
"llm_config": {
"model": "gpt-4",
"temperature": 0.7
},
"template_format": "jinja2"
}
}
The template_format field tells Agenta how to process your variables. This works both when invoking prompts through Agenta as an LLM gateway and when fetching prompts programmatically via the SDK.
That wraps up our launch week! We hope you explore these updates and find them useful. If you try them out, we’d love your feedback.
You can check our roadmap and vote on upcoming features at https://docs.agenta.ai/roadmap. You can also request new features directly on GitHub.
One last thing: We’re launching on Product Hunt on Friday, November 28. We’d really appreciate your support! You can follow our pagenow at Product Hunt.
Thanks, and happy prompting!



