-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathagent.py
More file actions
21 lines (18 loc) · 779 Bytes
/
agent.py
File metadata and controls
21 lines (18 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class Agent:
def __init__(self, state):
self.state = state
def handle(self, msg: str) -> str:
O, P, I, R, A, Op = self.state.as_tuple()
if O == 0:
return "I cannot interpret your request."
if P == 0:
return "I can respond, but I will not retain context."
if I == 0:
return "I can follow instructions, but I cannot form goals."
if R == 0:
return "I can propose actions, but cannot explain my reasoning."
if A == 0:
return "I can analyze, but will not initiate actions."
if Op == 0:
return "I operate only on existing information."
return "All capacities active. I can plan, reflect, initiate, and integrate new information."