MCPcopy Index your code
hub / github.com/agent0ai/agent-zero / run_task

Method run_task

agent.py:280–288  ·  view source on GitHub ↗
(
        self, func: Callable[..., Coroutine[Any, Any, Any]], *args: Any, **kwargs: Any
    )

Source from the content-addressed store, hash-verified

278
279 @extension.extensible
280 def run_task(
281 self, func: Callable[..., Coroutine[Any, Any, Any]], *args: Any, **kwargs: Any
282 ):
283 if not self.task:
284 self.task = DeferredTask(
285 thread_name=self.__class__.__name__,
286 )
287 self.task.start_task(func, *args, **kwargs)
288 return self.task
289
290 # this wrapper ensures that superior agents are called back if the chat was loaded from file and original callstack is gone
291 @extension.extensible

Callers 3

communicateMethod · 0.95
processMethod · 0.45
processMethod · 0.45

Calls 2

DeferredTaskClass · 0.90
start_taskMethod · 0.45

Tested by

no test coverage detected