Task#

class scikitplot.agent.Task(name, tool, arguments=None, into=None, update=None, max_visits=None, on_exhausted=None)[source]#

A node that calls one tool.

Parameters:
namestr

Node name, unique in the graph.

toolTool

The tool to call.

argumentsmapping, callable or None, default=None

The call’s arguments, or arguments(view) -> mapping. None is no arguments.

intostr or None, default=None

Channel the result is reduced into when the call executed.

updatecallable or None, default=None

update(view, result) -> {channel: value}, each value reduced into its channel, instead of into.

max_visitsint or None, default=None

How many times the node may be entered; required on every loop.

on_exhaustedstr or None, default=None

Node entered instead once max_visits is reached. None makes reaching the bound an error.

Raises:
WorkflowError

If a field is malformed.

Parameters:
arguments: Any = None#
into: str | None = None#
max_visits: int | None = None#
name: str[source]#
on_exhausted: str | None = None#
tool: Tool[source]#
update: Callable[[...], Mapping[str, Any]] | None = None#