instrukt.agent.loading
.ModuleManager
- class instrukt.agent.loading.ModuleManager[source]
Bases:
object
Methods
__init__
()discover
(paths)Discover available agent modules.
get_manifest
(name)Get the manifest of an agent module.
List all available agent modules.
verify_module
(name)Verify that an agent module is valid.
- static discover(paths: list[str]) Generator[str, None, None] [source]
Discover available agent modules. Agent modules must be python packages.
If you started the agent module with a dot(.) or underscore(_) it will not be discoverable. Useful during development
- static get_manifest(name: str) AgentManifest [source]
Get the manifest of an agent module.
- Returns:
The manifest as a dictionary.
- Raises:
ValueError – If the agent module does not have a manifest.
- static verify_module(name: str) Type[InstruktAgent] [source]
Verify that an agent module is valid.
- Returns:
The agent class if the module is valid.
- Raises:
ValueError – If the module is not valid.