MCPcopy Index your code
hub / github.com/AI45Lab/Code / agent

Method agent

core/src/orchestration/workflow.rs:209–221  ·  view source on GitHub ↗

Run a single step. A one-element barrier — reuses the panic isolation and placement of [`parallel`](Self::parallel) so one and many steps share a single code path.

(&self, spec: AgentStepSpec)

Source from the content-addressed store, hash-verified

207 /// placement of [`parallel`](Self::parallel) so one and many steps share a
208 /// single code path.
209 pub async fn agent(&self, spec: AgentStepSpec) -> StepOutcome {
210 let task_id = spec.task_id.clone();
211 let agent = spec.agent.clone();
212 execute_steps_parallel(
213 Arc::clone(&self.executor),
214 vec![spec],
215 self.step_events.clone(),
216 )
217 .await
218 .into_iter()
219 .next()
220 .unwrap_or_else(|| StepOutcome::failed(task_id, agent, "step produced no outcome"))
221 }
222
223 /// Barrier fan-out. Bounded by the executor's
224 /// [`concurrency_hint`](AgentExecutor::concurrency_hint); input order is

Calls 3

execute_steps_parallelFunction · 0.85
cloneMethod · 0.45
nextMethod · 0.45