instrukt.agent.manager.AgentManager

class instrukt.agent.manager.AgentManager(ctx: Context)[source]

Bases: object

AgentManager handles loading and switching between agents.

Methods

__init__(ctx)

from_name(name)

Return an agent by name.

load_agent(agent_mod)

Load an agent or return loaded agent module.

switch_agent(agent_name)

Switch to an already loaded agent by name.

Attributes

active_agent

List of currently active agents (implies loaded).

loaded_agents

List of all loaded agents.

from_name(name: str) InstruktAgent | None[source]

Return an agent by name.

async load_agent(agent_mod: str) None[source]

Load an agent or return loaded agent module.

async switch_agent(agent_name: str) None[source]

Switch to an already loaded agent by name.

property active_agent: InstruktAgent | None

List of currently active agents (implies loaded).

property loaded_agents: Sequence[str]

List of all loaded agents.