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

Method step

phone_agent/agent_ios.py:130–147  ·  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

128 return "Max steps reached"
129
130 def step(self, task: str | None = None) -> StepResult:
131 """
132 Execute a single step of the agent.
133
134 Useful for manual control or debugging.
135
136 Args:
137 task: Task description (only needed for first step).
138
139 Returns:
140 StepResult with step details.
141 """
142 is_first = len(self._context) == 0
143
144 if is_first and not task:
145 raise ValueError("Task is required for the first step")
146
147 return self._execute_step(task, is_first)
148
149 def reset(self) -> None:
150 """Reset the agent state for a new task."""

Callers

nothing calls this directly

Calls 1

_execute_stepMethod · 0.95

Tested by

no test coverage detected