MCPcopy Create free account
hub / github.com/THUDM/AutoWebGLM / Agent

Class Agent

webarena/agent/agent.py:28–50  ·  view source on GitHub ↗

Base class for the agent

Source from the content-addressed store, hash-verified

26
27
28class Agent:
29 """Base class for the agent"""
30
31 def __init__(self, *args: Any) -> None:
32 pass
33
34 def next_action(
35 self, trajectory: Trajectory, intent: str, meta_data: Any
36 ) -> Action:
37 """Predict the next action given the observation"""
38 raise NotImplementedError
39
40 def check_action(
41 self, trajectory: Trajectory, intent: str, meta_data: dict[str, Any], target_action: str
42 ) -> Action:
43 """Predict the next action given the observation"""
44 raise NotImplementedError
45
46 def reset(
47 self,
48 test_config_file: str,
49 ) -> None:
50 raise NotImplementedError
51
52
53class TeacherForcingAgent(Agent):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected