← Back to File Tree
state.py
Language: python |
Path: backend/src/orchestration/state.py |
Lines: 41
"""LangGraph state definitions for workflow orchestration."""
from typing import Any, TypedDict
class WorkflowState(TypedDict, total=False):
"""State passed between agents in the workflow.
This state is shared across all agent nodes and accumulates
results as the workflow progresses.
"""
# Input
user_query: str
correlation_id: str
dau_override: int | None # Optional user-provided DAU
api_key: str | None # Optional user-provided API key
# Parsed context from query
dau: int
qps: int
rps: int
data_gb: int
data_type: str
consistency: str
workload_type: str
budget_target: float
budget_conscious: bool
data_sensitivity: str
compliance_required: list[str]
public_facing: bool
existing_stack: str
architecture: str
# Agent results
database_result: dict[str, Any]
infrastructure_result: dict[str, Any]
cost_result: dict[str, Any]
security_result: dict[str, Any]
# Final output
final_recommendation: dict[str, Any]
error: str | None