[`agentic_crew.core.discovery`](#module-agentic_crew.core.discovery)
Discovery module - finds packages with crew configuration directories.
Supports framework-specific configuration directories:
- .crewai/ - CrewAI-specific configurations (default)
- .langgraph/ - LangGraph-specific configurations
- .strands/ - Strands-specific configurations
The discovery order matches framework priority for auto-detection.
Module Contents
Section titled “Module Contents”Functions
Section titled “Functions”get_workspace_root | Get the workspace root directory. |
|---|---|
discover_packages | Discover all packages with crew configuration directories. |
discover_all_framework_configs | Discover all framework-specific config directories for all packages. |
load_manifest | Load a package’s CrewAI manifest. |
get_framework_from_config_dir | Determine the required framework from a config directory path. |
get_crew_config | Load a specific crew’s configuration. |
list_crews | List all available crews, optionally filtered by package or framework. |
FRAMEWORK_DIRS | |
|---|---|
DIR_TO_FRAMEWORK | |
FRAMEWORK_TO_DIR |
agentic_crew.core.discovery.FRAMEWORK_DIRS
Section titled “agentic_crew.core.discovery.FRAMEWORK_DIRS”[‘.crew’, ‘.crewai’, ‘.langgraph’, ‘.strands’]
agentic_crew.core.discovery.DIR_TO_FRAMEWORK : dict[str, str | None]
Section titled “agentic_crew.core.discovery.DIR_TO_FRAMEWORK : dict[str, str | None]”None
agentic_crew.core.discovery.FRAMEWORK_TO_DIR : dict[str | None, str]
Section titled “agentic_crew.core.discovery.FRAMEWORK_TO_DIR : dict[str | None, str]”None
agentic_crew.core.discovery.get_workspace_root() → pathlib.Path
Section titled “agentic_crew.core.discovery.get_workspace_root() → pathlib.Path”Get the workspace root directory.
Walks up from the current file to find the root (where pyproject.toml is).
agentic_crew.core.discovery.discover_packages(workspace_root: pathlib.Path | None = None, framework: str | None = None) → dict[str, pathlib.Path]
Section titled “agentic_crew.core.discovery.discover_packages(workspace_root: pathlib.Path | None = None, framework: str | None = None) → dict[str, pathlib.Path]”Discover all packages with crew configuration directories.
Args: workspace_root: Root of the workspace. If None, auto-detected. framework: Optional framework to filter by (crewai, langgraph, strands). If None, returns first found directory per package.
Returns: Dict mapping package name to its config directory path.
agentic_crew.core.discovery.discover_all_framework_configs(workspace_root: pathlib.Path | None = None) → dict[str, dict[str | None, pathlib.Path]]
Section titled “agentic_crew.core.discovery.discover_all_framework_configs(workspace_root: pathlib.Path | None = None) → dict[str, dict[str | None, pathlib.Path]]”Discover all framework-specific config directories for all packages.
This finds ALL framework directories, not just the first one per package.
Args: workspace_root: Root of the workspace. If None, auto-detected.
Returns: Dict mapping package name to dict of framework -> config_dir. Example: {“otterfall”: {“crewai”: Path(…), “strands”: Path(…)}} Framework can be None for framework-agnostic .crew/ directories.
agentic_crew.core.discovery.load_manifest(crewai_dir: pathlib.Path) → dict[str, Any]
Section titled “agentic_crew.core.discovery.load_manifest(crewai_dir: pathlib.Path) → dict[str, Any]”Load a package’s CrewAI manifest.
Args: crewai_dir: Path to the .crewai/ directory.
Returns: Parsed manifest as a dictionary.
agentic_crew.core.discovery.get_framework_from_config_dir(config_dir: pathlib.Path) → str | None
Section titled “agentic_crew.core.discovery.get_framework_from_config_dir(config_dir: pathlib.Path) → str | None”Determine the required framework from a config directory path.
Args: config_dir: Path to a framework config directory (.crewai, .strands, etc.)
Returns: Framework name if directory indicates a specific framework, None otherwise.
agentic_crew.core.discovery.get_crew_config(config_dir: pathlib.Path, crew_name: str) → dict
Section titled “agentic_crew.core.discovery.get_crew_config(config_dir: pathlib.Path, crew_name: str) → dict”Load a specific crew’s configuration.
Args: config_dir: Path to the config directory (.crewai/, .strands/, .langgraph/). crew_name: Name of the crew to load.
Returns: Dict with agents, tasks, knowledge_paths, and required_framework. The required_framework field indicates which framework MUST be used if the config is in a framework-specific directory.
Raises: ValueError: If crew not found in manifest.
agentic_crew.core.discovery.list_crews(package_name: str | None = None, framework: str | None = None) → dict[str, list[dict]]
Section titled “agentic_crew.core.discovery.list_crews(package_name: str | None = None, framework: str | None = None) → dict[str, list[dict]]”List all available crews, optionally filtered by package or framework.
Args: package_name: If provided, only list crews for this package. framework: If provided, only list crews that can run on this framework.
Returns: Dict mapping package name to list of crew info dicts. Each crew dict includes:
- name: Crew name
- description: Crew description
- required_framework: Framework required (if in framework-specific dir)