Your Prompts Deserve Version Control Too
You’ve probably version-controlled your code for years. But what about your prompts?
If you’re building with LLMs, you know the pain: prompts drift over time, there’s no audit trail, and iterating means copy-pasting into a notes file somewhere. When something breaks, good luck figuring out what changed.
uuroute agents solve this. Let me show you how a simple vocabulary tutor evolves from a quick hack to a production-ready, versioned agent.
Getting Started
First, create an API key and add your credentials to a .env file in your project:
UUROUTE_API_KEY=sk-your-api-keyUUROUTE_BASE_URL=https://api.stag.uuroute.net/v1UUROUTE_MODEL=gpt-5-miniThat’s it. Your local agent workflow can load .env from the current directory.
Step 1: Create Your First Agent
Let’s build a vocabulary tutor. First, write the prompt in a file:
cat > vocab-tutor.md << 'EOF'You are an English vocabulary tutor. When given a word:
1. **Definition**: Clear, simple explanation2. **Pronunciation**: IPA notation3. **Example sentences**: 2-3 natural examples4. **Synonyms**: 3-5 related words with nuance differences5. **Common collocations**: Frequently paired words6. **Etymology**: Brief origin (if interesting)
Keep explanations concise.EOFNow create the agent:
uuroute agent create vocab-tutor \ --instructions @vocab-tutor.md \ --model gpt-5-miniThe @filename syntax loads instructions from a file—just like curl. This makes prompts easier to edit and version control.
Try it out:
uuroute chat --agent vocab-tutorYou> ephemeral**ephemeral** /ɪˈfem.ər.əl/
**Definition**: Lasting for a very short time; transitory.
**Example sentences**:- The ephemeral beauty of cherry blossoms draws millions each spring.- Social media fame is often ephemeral—here today, gone tomorrow.
**Synonyms**:- transient (more formal)- fleeting (emphasizes speed)- momentary (very brief)
**Collocations**: ephemeral nature, ephemeral beauty, ephemeral moment
**Etymology**: From Greek *ephēmeros* "lasting only a day"
tokens: 45 in / 186 outStep 2: Add Template Variables
Your tutor works, but it’s hardcoded for English. What if you want to teach German? Or French? Instead of creating separate agents, add variables:
uuroute agent update vocab-tutor \ --instructions 'You are a {{target_language}} vocabulary tutor for {{native_language}} speakers at {{level}} level.
When given a word:1. **Definition**: Explain in {{native_language}}, show the {{target_language}} word2. **Pronunciation**: IPA notation + phonetic hints for {{native_language}} speakers3. **Example sentences**: {{example_count}} sentences with translations4. **Related words**: Synonyms and antonyms5. **Memory tip**: Mnemonic connecting to {{native_language}} sounds'Now use it for German:
uuroute chat --agent vocab-tutor \ --var target_language=German \ --var native_language=English \ --var level=beginner \ --var example_count=2You> Schmetterling**Schmetterling** /ˈʃmɛtɐlɪŋ/(English: butterfly)
**Pronunciation tip**: "shmet-ter-ling" - stress on first syllable
**Example sentences**:- Der Schmetterling fliegt im Garten. (The butterfly flies in the garden.)- Ich sehe einen bunten Schmetterling. (I see a colorful butterfly.)
**Related words**:- die Raupe (caterpillar) - what it starts as- die Motte (moth) - nocturnal cousin
**Memory tip**: Think "smash + butter + fling" - imagine a butterfly flinging butter!
tokens: 67 in / 189 outSame agent, different languages. Variables make agents reusable.
Step 3: Version and Iterate
Your vocab-tutor is working great for language learners. But now you want to serve a different audience: native speakers aiming for The Economist-level precision.
This is a major change. Let’s version it properly:
uuroute agent update vocab-tutor \ --instructions 'You are a vocabulary consultant for advanced English users seeking precision and sophistication.
When given a word:
1. **Core meaning**: Precise definition with connotation (positive/negative/neutral)2. **Register**: Where this word belongs (academic, journalistic, literary, conversational)3. **Precision vs alternatives**: How it differs from near-synonyms4. **Sophisticated usage**: 2 examples from quality writing5. **Pitfalls**: Common misuses, even among educated speakers6. **Power move**: One sentence showing the word used effectively
Target audience: Native speakers, graduate students, professionals.' \ --bump major \ --reason "Redesigned for advanced users: added register, precision analysis"Check the version history:
uuroute agent history vocab-tutor# v1.0.0 (2025-01-05) - Initial beginner version# v2.0.0 (2025-01-06) - Redesigned for advanced users [CURRENT]Compare what changed:
uuroute agent diff vocab-tutor 1.0.0 2.0.0Try the advanced version:
uuroute chat --agent vocab-tutorYou> nuance**nuance** /ˈnjuː.ɑːns/
**Core meaning**: A subtle distinction or variation in meaning, expression,or response. *Connotation*: Positive—suggests sophistication and careful thought.
**Register**: Academic, journalistic, literary. Signals educated discourse.Avoid overuse in casual speech (can sound pretentious).
**Precision vs alternatives**:- *subtlety*: Broader; nuance specifically implies fine gradations- *distinction*: More binary; nuance suggests a spectrum- *shade*: Informal equivalent ("shades of meaning")
**Sophisticated usage**:- "The diplomat's response was full of nuance, acknowledging grievances without assigning blame."- "Her analysis captured nuances that the quantitative study missed entirely."
**Pitfalls**:- Don't use as a verb ("to nuance an argument")—controversial and criticized- Avoid "very nuanced" (redundant; nuance already implies degree)
**Power move**: "His objection wasn't opposition—it was nuance, a refinementthat strengthened the proposal."
tokens: 72 in / 234 outStep 4: Production Governance
Your agent is ready for the team. Mark it as approved:
uuroute agent approve vocab-tutor --version 2.0.0Check usage and audit trails:
uuroute agent audit vocab-tutor --last 50# execution_id | timestamp | model | tokens_in | tokens_out# exec_a1b2c3 | 2025-01-06 14:23:01 | gpt-5-mini | 72 | 234# ...Something wrong with v2? Roll back instantly:
uuroute agent rollback vocab-tutor --version 1.0.0Key Features
| Feature | Description |
|---|---|
| Instructions | System prompt defining agent behavior |
| Variables | {{custom}} placeholders for runtime customization |
| File injection | @{path} to include file contents |
| Versioning | Semantic versioning (major.minor.patch) |
| Audit trail | Full execution history with token counts |
| Status workflow | DRAFT → APPROVED → DEPRECATED |
| Team sharing | Export/Import as JSON |
Get Started
Your prompts deserve the same rigor as your code. Version them. Audit them. Iterate boldly, rollback safely.
Links: