Autonomous-AI / agent_editor.py
Leonydis137's picture
Upload 9 files
f3fe01a verified
raw
history blame contribute delete
349 Bytes
def update_agent_code(new_code):
with open("agent.py", "w") as f:
f.write(new_code)
return "✅ agent.py updated. Rebuild or reload your Space to apply changes."
def read_agent_code():
try:
with open("agent.py", "r") as f:
return f.read()
except FileNotFoundError:
return "# agent.py not found"