Let me check if Promptix is initialized/configured anywhere else.
Now replace all Promptix usage in llm.py:
Now remove promptix from pyproject.toml:
Those are pre-existing unused imports, not from my changes. Let me verify the final state of the edited files:
Done. Here's the summary:
Created backend/src/lib/prompt_manager.py — a ~40-line module that:
backend/prompts/<name>/current.md into an in-memory _templates dictrender(name, **variables) which does {{var}} substitution via regexUpdated backend/src/lib/agent/llm.py:
from promptix import Promptix with from src.lib import prompt_managerbuild_agent_voice now calls prompt_manager.render("agent_persona", ...)build_system_prompt now calls prompt_manager.render(modality_prompt_name) for modality instructions and prompt_manager.render(base_prompt_name, ...) for the main promptRemoved promptix>=0.2.0 from pyproject.toml.
Templates are loaded once at process startup (module import time), so /completions never touches the filesystem. The config.yaml and versions/ folders are just ignored — only current.md matters. You can clean those up whenever.
Yeah, Jinja2 is the standard — already battle-tested for exactly this. It's what Promptix was likely using under the hood anyway.
Already a transitive dependency, so no new install needed. Jinja2 uses {{ var }} syntax natively — the templates won't need any changes.
Actually, let me use Jinja2's built-in StrictUndefined instead of that hacky lambda:
Clean. Jinja2 is already in the dependency tree (transitive via FastAPI/Starlette), uses {{ var }} natively so the templates work as-is, and StrictUndefined will blow up loudly if a variable is missing — same behavior as before.
Jinja2 has Environment.parse() which extracts all undeclared variables from a template via meta.find_undeclared_variables(). But honestly, StrictUndefined already handles this — if you call render() and miss a variable, it throws UndefinedError immediately at render time.
The config.yaml files were a Promptix thing for metadata/schema. They don't add value here since Jinja2's StrictUndefined already enforces that all referenced variables are provided. I'd just delete them along with the versions/ folders — they're dead weight now.
Want me to clean those up?
Let me look at the template files and understand the Promptix API surface being used.
Done. Added validation to update_agent_configuration:
Now setting team_prompt_template to "nonexistent" will fail fast with a 400 at update time listing all available templates, instead of blowing up with a 500 during /completions.