Team Ai
Apppublic

Krishp1/Autonomous-Coding-Agent

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
state.py30 linesDownload Raw Back to root
1# state.py — Shared State for Autonomous Python Coding Agent2 3from typing import TypedDict # pyhton class that lets us to define dictionary with specific key names 4 5 6class State(TypedDict):7    task:               str # original user requests 8    plan:               str # plans before writing code9    code:               str # code generated by this 10    test_result:        str # this stores what happened when code is generated it failed crashed or passed ?11    error:              str # message if code execution failed or not ?12    fixed_code:         str # fixed code 13    explanation:        str14    review:             str15    final_code:         str16    retries:            int17    security_retries:   int18    complexity_retries: int19    reflection_retries: int  # own counter — reflection loop no longer piggybacks on "retries"20    passed:             bool21    is_secure:          bool22    is_simple:          bool23    ast_valid:          bool24    generated_tests:    str25    hypothesis_result:  str26    benchmark_ms:       float27    reflection_ok:      bool28    reflection_notes:   str29    confidence_score:   int30