Catalog
Customization
Fork templates, modify LLM nodes, and evaluate your customized workflows.
The WorkflowCustomizer in src/autoflow/catalog/customizer.py lets you fork any catalog template, modify its LLM nodes, evaluate the result, and save it as a custom workflow.
Customization Workflow
Fork a template
Create a copy of any catalog template with a new slug:
python -m autoflow --fork classification --fork-as my_classifierThe fork is saved to workflows/custom_workflows/my_classifier.json with provenance metadata tracking the original template.
Modify LLM nodes
Adjust system prompts, prompt templates, temperature, model, or max tokens on any LLM node:
# Change temperature
python -m autoflow --modify-slug my_classifier --modify-node intake --set-temperature 0.0
# Change model
python -m autoflow --modify-slug my_classifier --modify-node intake --set-model gpt-4o
# Change system prompt
python -m autoflow --modify-slug my_classifier --modify-node intake \
--set-system-prompt "You are an expert email classifier for IT support tickets."
# Change prompt template
python -m autoflow --modify-slug my_classifier --modify-node intake \
--set-prompt-template "Classify this ticket into one of: bug, feature, question.\n\nTicket: {{input.message}}"Evaluate your changes
Run validation and quality scoring on the modified workflow:
python -m autoflow --evaluate-custom my_classifierThis runs:
- JSON Schema validation against the workflow schema
- Custom structural rules (unique IDs, valid edges, no orphans, variable resolution)
- Quality scoring across all 5 dimensions
Managing Custom Workflows
List all custom workflows
python -m autoflow --list-customCustom workflow storage
Custom workflows live in workflows/custom_workflows/ and are automatically discovered alongside catalog templates. They include provenance metadata:
{
"nodes": [...],
"edges": [...],
"metadata": {
"name": "My Classifier",
"forked_from": "classification",
"fork_date": "2025-01-15T10:30:00Z",
"modifications": [
{
"node_id": "intake",
"field": "temperature",
"old_value": 0.3,
"new_value": 0.0,
"date": "2025-01-15T10:35:00Z"
}
]
}
}Programmatic Customization
from autoflow.catalog.customizer import WorkflowCustomizer
customizer = WorkflowCustomizer()
# Fork
customizer.fork("classification", "my_classifier")
# Modify
customizer.modify_node("my_classifier", "intake", temperature=0.0)
# Evaluate
result = customizer.evaluate("my_classifier")
print(result["quality_scores"])
print(result["validation_errors"])
# List custom workflows
customs = customizer.list_custom()