import os from state import AgentState def saver(state: AgentState): os.makedirs("output", exist_ok=True) with open("output/index.html", "w", encoding="utf-8") as f: f.write(state["code"]) return state