File size: 477 Bytes
922ff89
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Reflex Agent Lifecycle Simulator

import time

class ReflexAgent:
    def __init__(self):
        self.state = "Idle"
        self.log = []

    def update_state(self, command):
        self.state = f"Processing: {command}"
        self.log.append(self.state)
        time.sleep(1)
        self.state = "Complete"
        self.log.append(self.state)
        return self.log

if __name__ == "__main__":
    agent = ReflexAgent()
    print(agent.update_state("Render spiral"))