aea.launcher

This module contains the implementation of multiple AEA configs launcher.

load_agent

load_agent(agent_dir: Union[PathLike, str]) -> AEA

Load AEA from directory.

Arguments:

  • agent_dir: agent configuration directory

Returns:

AEA instance

AEADirTask Objects

class AEADirTask(AbstractExecutorTask)

Task to run agent from agent configuration directory.

__init__

 | __init__(agent_dir: Union[PathLike, str]) -> None

Init aea config dir task.

Arguments:

  • agent_dir: direcory with aea config.

start

 | start() -> None

Start task.

stop

 | stop()

Stop task.

create_async_task

 | create_async_task(loop: AbstractEventLoop) -> TaskAwaitable

Return asyncio Task for task run in asyncio loop.

id

 | @property
 | id() -> Union[PathLike, str]

Return agent_dir.

AEADirMultiprocessTask Objects

class AEADirMultiprocessTask(AbstractMultiprocessExecutorTask)

Task to run agent from agent configuration directory.

Version for multiprocess executor mode.

__init__

 | __init__(agent_dir: Union[PathLike, str], log_level: Optional[str] = None)

Init aea config dir task.

Arguments:

  • agent_dir: direcory with aea config.
  • log_level: debug level applied for AEA in subprocess

start

 | start() -> Tuple[Callable, Sequence[Any]]

Return function and arguments to call within subprocess.

stop

 | stop()

Stop task.

id

 | @property
 | id() -> Union[PathLike, str]

Return agent_dir.

failed

 | @property
 | failed() -> bool

Return was exception failed or not.

If it's running it's not failed.

:rerurn: bool

AEALauncher Objects

class AEALauncher(AbstractMultipleRunner)

Run multiple AEA instances.

__init__

 | __init__(agent_dirs: Sequence[Union[PathLike, str]], mode: str, fail_policy: ExecutorExceptionPolicies = ExecutorExceptionPolicies.propagate, log_level: Optional[str] = None) -> None

Init AEARunner.

Arguments:

  • agent_dirs: sequence of AEA config directories.
  • mode: executor name to use.
  • fail_policy: one of ExecutorExceptionPolicies to be used with Executor
  • log_level: debug level applied for AEA in subprocesses