MCPcopy Index your code
hub / github.com/zai-org/Open-AutoGLM / step

Method step

phone_agent/agent.py:112–129  ·  view source on GitHub ↗

Execute a single step of the agent. Useful for manual control or debugging. Args: task: Task description (only needed for first step). Returns: StepResult with step details.

(self, task: str | None = None)

Source from the content-addressed store, hash-verified

110 return "Max steps reached"
111
112 def step(self, task: str | None = None) -> StepResult:
113 """
114 Execute a single step of the agent.
115
116 Useful for manual control or debugging.
117
118 Args:
119 task: Task description (only needed for first step).
120
121 Returns:
122 StepResult with step details.
123 """
124 is_first = len(self._context) == 0
125
126 if is_first and not task:
127 raise ValueError("Task is required for the first step")
128
129 return self._execute_step(task, is_first)
130
131 def reset(self) -> None:
132 """Reset the agent state for a new task."""

Callers 1

example_step_by_stepFunction · 0.95

Calls 1

_execute_stepMethod · 0.95

Tested by

no test coverage detected