State for the LangGraph agent.
| 51 | |
| 52 | |
| 53 | class AgentState(TypedDict): |
| 54 | """State for the LangGraph agent.""" |
| 55 | # Conversation |
| 56 | messages: Sequence[BaseMessage] |
| 57 | |
| 58 | # Pipeline information |
| 59 | pipeline_id: str |
| 60 | user_request: str |
| 61 | |
| 62 | # Workflow phase |
| 63 | phase: WorkflowPhase |
| 64 | |
| 65 | # URLs |
| 66 | urls: List[URLInfo] |
| 67 | urls_validated: bool |
| 68 | |
| 69 | # Schema |
| 70 | schema_fields: List[SchemaField] |
| 71 | schema_validated: bool |
| 72 | |
| 73 | # Generated code |
| 74 | generated_code: str |
| 75 | |
| 76 | # Execution results |
| 77 | execution_results: List[Dict] |
| 78 | |
| 79 | # Approval gates |
| 80 | requires_approval: bool |
| 81 | approval_status: Optional[Literal["pending", "approved", "rejected"]] |
| 82 | |
| 83 | # Error tracking |
| 84 | errors: List[str] |
| 85 | |
| 86 | # Extracted entities from request |
| 87 | extracted_entities: Dict[str, Any] |
| 88 | |
| 89 | # Metadata |
| 90 | created_at: datetime |
| 91 | updated_at: datetime |
| 92 | |
| 93 | |
| 94 | class ScrapeCraftAgent: |
nothing calls this directly
no outgoing calls
no test coverage detected