Why Cascade? Application-as-Data Philosophy
The Paradigm Shift
Traditional software development treats applications as imperative code—a sequence of commands for the computer to execute. Cascade flips this model: applications are structured data that describes what should happen, not how to make it happen.
This fundamental shift creates three revolutionary capabilities:
- AI-Native Development - LLMs become first-class development tools
- Autonomous Agent Platform - Agents can read and orchestrate workflows
- Visual Development - Tools auto-generate from your data
Problem: Why Traditional Approaches Fall Short
The Code Problem
When applications are written as imperative code:
// Traditional: 500+ lines
func ProcessOrder(order Order) error {
validated, err := validate(order)
if err != nil {
return handleError(err)
}
charged, err := stripe.Charge(order.Amount)
if err != nil {
// Manual compensation
return compensate()
}
shipped, err := shipOrder(order)
// ... 450+ more lines of state management,
// error handling, retry logic, etc.
}Problems:
- ❌ Hard for AI: LLMs can’t reliably generate or modify complex control flow
- ❌ No Visuals: Need expensive tools to generate diagrams
- ❌ Version Control Noise: Git diffs show syntax, not business logic
- ❌ Agents Can’t Orchestrate: Can’t safely analyze or modify running workflows
- ❌ Deployment Friction: Any business rule change requires code review → deploy cycle
The Low-Code Problem
When applications are visual constructs stored in proprietary formats:
[Visual Flow Chart in Proprietary Format]Problems:
- ❌ Binary Format: Git doesn’t understand it, can’t merge PRs
- ❌ Vendor Locked: Only works in that specific tool
- ❌ Not AI-Readable: Proprietary JSON/XML schema unknown to LLMs
- ❌ Scale Issues: Large workflows become unwieldy
- ❌ Version Control Breaks: “Merge conflict? Just pick one…”
Solution: Application-as-Data
Cascade uses structured YAML (Application-as-Data) where workflows are declarations, not procedures:
# Cascade: 50 lines, 100% declarative
workflows:
- name: order_processing
start: ValidateOrder
states:
- name: ValidateOrder
type: Task
action: validate_order
next: ChargeCard
catch:
- error: ValidationFailed
next: Reject
- name: ChargeCard
type: Task
action: stripe.charge
retry: {max_attempts: 3}
catch:
- error: PaymentFailed
next: Compensate
next: ShipOrder
- name: ShipOrder
type: Task
action: ship_order
end: trueBenefits:
- ✅ Machine-Readable: Clear intent, no control flow ambiguity
- ✅ AI-Native: LLMs understand YAML structure and semantics
- ✅ Version Control: Meaningful diffs show business logic changes
- ✅ Visual Generation: Auto-generate state machine diagrams
- ✅ Agents Can Orchestrate: Structured data agents can safely analyze/modify
Three Revolutionary Consequences
1. AI-Native Development
When applications are data, LLMs become first-class development tools.
Generate Applications
User: "I need a leave request workflow where employees submit requests,
managers approve if under 5 days, otherwise requires HR approval"
Cascade AI Assistant generates:
→ 200 lines of production-ready CDL
→ Validated against schema
→ Ready to deployOptimize Workflows
AI Analyzer: "Your fraud detection has 3 sequential database queries.
These could run in parallel."
Suggestion:
→ Refactor to Parallel state
→ Test improvement
→ Commit change
→ 40% latency reductionDebug Intelligently
User: "Why did order-12345 fail?"
AI Agent:
1. Reads execution trace
2. Analyzes workflow definition
3. Traces through state transitions
4. "ChargeCard state failed with PaymentFailed error.
Retry policy maxed out. Check Stripe payment status."Why This Works:
- YAML is parseable → LLMs can understand structure
- Deterministic semantics → LLMs can predict behavior
- Type-safe via schemas → LLMs can validate before execution
- Clear state transitions → LLMs can trace execution
2. Autonomous Agent Platform
When workflows are data, agents can read and orchestrate them.
Agents at ANY Workflow Step
workflows:
- name: customer_support
states:
# Step 1: Traditional system gets query
- name: ReceiveQuery
type: Task
resource: "urn:cascade:waitFor:human"
next: AnalyzeAndRespond
# Step 2: AGENT ANALYZES AND ROUTES
- name: AnalyzeAndRespond
type: Task
resource: "urn:cascade:agent:support-agent"
parameters:
query: "$.customer_message"
customer_history: "$.customer.history"
knowledge_base: "$.company.kb"
capabilities:
- read.workflow # Access query context
- read.memory_semantic # Look up knowledge
- read.database # Check customer history
- evaluate.decision # Run routing rules
- execute.action # Send response
- write.memory_kv # Store resolution
next: CompleteTicketAgent Platform SDK (v5.1)
Read Capabilities (7 total):
read.workflow- Access workflow state and variablesread.memory_kv- General-purpose key-value storageread.memory_conversation- Dialogue history (ChatGPT-like)read.memory_semantic- Vector knowledge base (RAG)read.database- Execute read-only SQL queriesread.secrets- Access encrypted secrets from Vaultevaluate.decision- Run DMN decision tables or OPA policies
Write Capabilities (9 total):
write.workflow- Update workflow statewrite.memory_kv- Store agent insightswrite.memory_conversation- Append dialogue turnswrite.memory_semantic- Store knowledge with embeddingswrite.database- Execute database writeswrite.database_batch- Batch operationswrite.database_transaction- Transactional writesexecute.action- Call platform actions (email, webhooks, etc.)execute.connector- Invoke external systems (Stripe, Salesforce, etc.)
High-Privilege Capabilities (2 total, require approval):
execute.workflow- Start new processesexecute.workflow_cancel- Cancel running workflows
Security:
- All capabilities controlled via OPA policies
- RBAC + tenant isolation
- Audit logging on every operation
- Rate limits per agent per capability
Real Example: Intelligent Support Agent
tests:
- name: CustomerSupport_AgentRoutes
trigger:
query: "My order hasn't arrived and I need a refund"
customer: {status: "loyal", ltv: "$5000"}
expected_behavior:
agent_reads:
- customer_history: SUCCESS
- shipping_status: SUCCESS
- refund_policy: SUCCESS
agent_decides: "REFUND_APPROVED"
agent_executes:
- Process refund
- Send explanation email
- Create return label
result: "Customer satisfied, ticket resolved in 2 minutes"3. Visual Development Platform
Because everything is structured data, visual tools work automatically.
From Your YAML:
workflows:
- name: order_processing
states:
- name: ValidateOrder
next: PaymentOrReject
- name: PaymentOrReject
type: Choice
choices:
- condition: "$.valid == true"
next: ChargePayment
- condition: "$.valid == false"
next: Reject
- name: ChargePayment
next: ShipOrder
- name: ShipOrder
next: NotifyCustomer
- name: NotifyCustomer
end: trueCascade Auto-Generates:
┌─────────────┐
│ Validate │
│ Order │
└──────┬──────┘
│
▼
┌─────────────────────────┐
│ Valid? Choice │
├─────────────────────────┤
│ Yes ─► Charge No ─► Reject
└──┬───────────────────────┘
│
├─► Charge Payment ──┐
│ │
└─► Reject ──────────┤
▼
┌──────────────┐
│ Ship Order │
│ (if paid) │
└──────┬───────┘
│
▼
┌──────────────┐
│ Notify │
│ Customer │
└──────────────┘Plus Visual Configuration:
- Business users tune thresholds via UI
- No code changes needed
- Changes take effect immediately
- Full audit trail
The Data Advantage Across Domains
| Aspect | Traditional Code | Cascade Data |
|---|---|---|
| LLM Understanding | ❌ Hard (control flow) | ✅ Easy (declarative) |
| LLM Generation | ⚠️ Error-prone | ✅ Reliable |
| LLM Optimization | ❌ Can’t parse | ✅ Can reason about |
| Auto Diagrams | ❌ Manual tools | ✅ Automatic |
| Git Diffs | ⚠️ Syntax noise | ✅ Business logic |
| Visual Tools | ❌ Custom build | ✅ Auto-render |
| Agents as Orchestrators | ❌ Can’t safely modify | ✅ Full control |
| Non-Dev Configuration | ❌ Requires coding | ✅ UI + validation |
| Testing | ❌ Code-based | ✅ Declarative |
| Version Control | ⚠️ Complex merges | ✅ Clean diffs |
Real-World Impact
Before: Traditional BPM (5,000+ lines)
- Orchestration engine: 2,000 lines
- State management: 1,200 lines
- Error handling: 800 lines
- Retry logic: 600 lines
- Testing framework: 400 lines
After: Cascade (526 lines)
- Workflows (CDL): 300 lines
- Business rules: 150 lines
- Tests (YAML): 50 lines
- Integration code (Go): 26 lines
Metrics
- 95% less code than traditional approach
- 0% orchestration boilerplate (100% declarative)
- Declarative tests (no Jest/pytest code)
- AI can generate 60-70% of initial implementation
- Visual tools work automatically
- Deployment hours instead of weeks
Next Steps
Two Primitives Model
Understand the 2 building blocks for 90% of workflows
Application-as-Data Benefits
Deep dive into why structured data is revolutionary
AI-Native Development
How LLMs become first-class development tools
Agent-First Platform
Autonomous agents with full platform SDK
Comparisons
How Cascade compares to Temporal, Step Functions, Camunda
Ready to see it in action? → 5-Minute Quickstart or View Examples