The Problem with Traditional Versioning
Traditional approach:Thin Git Wrapper Philosophy
Edgit creates Git tags. That’s it.- No custom databases
- No version registries
- No deployment state files
- Just standard Git tags
Git Tag Format (4 Levels)
Edgit uses a 4-level tag format:- prefix:
componentsorlogic(inferred from file path) - type:
prompts,agents,ensembles, etc. - name: Component name
- slot: Version (v1.0.0) or environment (staging, production)
- components: Hot-swappable (prompts, configs, queries, schemas). Push to KV, live immediately.
- logic: Requires Worker rebuild (agents, ensembles). Bundle into code, redeploy Worker.
--type flags needed. Edgit infers prefix from file location.
Version Tags vs Environment Tags
Version Tags (Immutable)
Version tags are immutable snapshots:- Semantic versioning: v1.0.0, v1.1.0, v2.0.0
- Immutable by convention (no —force needed)
- Create once, reference forever
- Safe for production
Environment Tags (Mutable)
Environment tags are pointers to versions:- Common names: staging, production, dev, canary
- Mutable (—force required to update)
- Point to version tags
- Easy deployment workflow
- Git protects against accidental overwrites
- Forces explicit intent when moving environment pointers
- Prevents race conditions in CI/CD
Component Versioning
What Gets Versioned
Components are versioned artifacts that agents use:- Prompts (
.md) - AI instructions - Configs (
.json,.yaml) - Settings - Queries (
.sql) - Database queries - Scripts (
.js,.ts) - Functions - Schemas (
.json) - Validation rules - Templates (
.html,.md) - Output templates
Create Component Versions
Full Workflow Example
Semantic Versioning
Follow semver:v{major}.{minor}.{patch}
Major (v2.0.0): Breaking changes
Reference Versions in Ensembles
Lock to specific versions:- TypeScript
- YAML
- Predictable behavior (won’t break on updates)
- Can A/B test different versions
- Easy rollback (just change the version)
For TypeScript ensembles, see the Version Primitives documentation for complete API reference including
versionedAgent(), versionedEnsemble(), and deploymentRef().Agent Versioning
What Are Agents?
Agents are workers that execute tasks. They live inlogic/ because they require Worker rebuilds:
- Pre-built agents (scraper, validator, RAG, HITL)
- Custom agent implementations
Version Agent Implementations
Reference Agent Versions
Ensemble Versioning
What Are Ensembles?
Ensembles are workflow definitions that orchestrate agents. They live inlogic/:
- YAML ensembles (
.yaml,.yml) - Declarative workflow definitions - TypeScript ensembles (
.ts) - Programmatic workflow definitions with full type safety
Version Ensemble Definitions
- TypeScript
- YAML
TypeScript vs YAML Ensembles
- TypeScript
- YAML
- Complex flow control (nested branches, loops)
- Type safety requirements
- IDE autocomplete and validation
- Reusable ensemble patterns
- Simple linear workflows
- Non-developers editing ensembles
- Quick prototyping
- Configuration-driven deployments
The Versioning Multiverse
The real power: version components, agents, AND ensembles independently, then mix them.Example: Testing Matrix
You have:- 2 agent versions (analyzer v1.0.0, v2.0.0)
- 3 prompt versions (prompt v1.0.0, v1.5.0, v2.0.0)
- 2 config versions (config v1.0.0, v2.0.0)
Real-World Use Case: Progressive Testing
Version Strategies
Strategy 1: Lock Everything (Maximum Stability)
Strategy 2: Latest Everything (Maximum Innovation)
Strategy 3: Mixed (Balanced)
Strategy 4: Canary (Gradual Rollout)
Version Lifecycle
Development Flow
When to Create Versions
Do version:- After merging to main
- After successful tests in staging
- When deploying to any environment
- When you want to lock a working state
- Every commit during development
- WIP (work in progress) changes
- Before testing
- In feature branches

