| name | progressive-crystallization |
| description | Progressive crystallization methodology for turning AI agent exploration into deterministic, lower-cost workflows. Three-stage execution taxonomy with evidence-based promotion/demotion mechanism. (arXiv: 2607.07052) |
Progressive Crystallization â Agent to Deterministic Workflows
Overview
Progressive crystallization is a lifecycle methodology that treats AI agent exploration as a discovery mechanism rather than a permanent execution model. It converts repeatedly validated agent behaviors into cheaper, more reproducible deterministic workflows.
Key Results (production cloud networking AIOps, tens of thousands of incidents/month):
- Increased deterministic execution from 0% â 45% over 8 months
- Reduced per-incident agent costs by >70% despite doubling incident volume
- Improved safety through greater reproducibility and auditability
Paper: "Progressive Crystallization: Turning Agent Exploration into Deterministic, Lower-Cost Workflows in Production" (arXiv:2607.07052, 2026-07-08)
Three-Stage Execution Taxonomy
Stage 1: Agent-Orchestrated (Full LLM)
- What: Full LLM inference for every execution
- When: Novel problems, first encounters
- Cost: High (full token consumption)
- Flexibility: Maximum
Stage 2: Hybrid (Agent + Rules)
- What: Agent handles novel parts, deterministic rules handle known patterns
- When: Partially understood problem space
- Cost: Medium
- Flexibility: Partial
Stage 3: Fully Deterministic
- What: Pre-compiled deterministic workflows from validated agent traces
- When: Repeatedly solved problems with stable patterns
- Cost: Low (no LLM inference)
- Flexibility: Minimal but reliable
Evidence-Based Promotion Mechanism
Promotion Criteria (Agent â Hybrid â Deterministic)
A behavior pattern is promoted when:
- Frequency threshold: Pattern appears â„ N times (configurable)
- Success rate: â„ 95% success across all instances
- Stability: No regression in the last M executions
- Trace quality: Agent trace is complete, auditable, and extractable
Demotion Criteria (Deterministic â Hybrid â Agent)
A workflow is demoted when:
- Failure rate: Exceeds configurable threshold (e.g., >5%)
- Edge cases: New edge cases not covered by existing workflow
- Context drift: Problem domain has shifted significantly
Trace Extraction Methodology
1. Execute agent on problem, capture full trace
2. Identify invariant steps (always present across executions)
3. Extract decision points and their outcomes
4. Parameterize variable inputs
5. Compile into deterministic workflow template
6. Validate template against historical instances
7. Deploy as Stage 2/3 workflow
Economic Model
Cost per incident:
- Stage 1: Câ (full LLM cost)
- Stage 2: Câ â 0.5 Ă Câ (partial LLM)
- Stage 3: Câ â 0.01 Ă Câ (deterministic)
Total cost with crystallization:
Total = NâĂCâ + NâĂCâ + NâĂCâ
Where Nâ + Nâ + Nâ = total incidents, and Nâ grows over time.
Implementation Pattern
class ProgressiveCrystallization:
def __init__(self, promotion_threshold=10, success_rate_threshold=0.95):
self.patterns = {}
self.workflows = {}
self.promotion_threshold = promotion_threshold
self.success_threshold = success_rate_threshold
def execute(self, problem):
pattern_id = self.classify(problem)
if pattern_id in self.workflows:
return self.execute_deterministic(pattern_id, problem)
else:
result, trace = self.execute_agent(problem)
self.record(pattern_id, result, trace)
self.check_promotion(pattern_id)
return result
def check_promotion(self, pattern_id):
history = self.patterns[pattern_id]
if (len(history) >= self.promotion_threshold and
history.success_rate >= self.success_threshold):
workflow = self.extract_workflow(pattern_id)
self.workflows[pattern_id] = workflow
Safety Considerations
- Auditability: Every deterministic workflow has a traceable origin in agent executions
- Regression detection: Continuous monitoring catches demotion triggers
- Human override: Critical workflows retain human-in-the-loop option
- Version control: Workflow versions are tracked for rollback
Pitfalls
- Over-crystallization: Premature promotion can lock in suboptimal patterns
- Trace quality: Poor agent traces lead to brittle deterministic workflows
- Context awareness: Crystallized workflows may miss new edge cases
- Promotion/demotion thresholds: Must be tuned per domain â too aggressive causes instability, too conservative loses cost benefits
References
- arXiv:2607.07052 â Progressive Crystallization methodology