agentic_fabric.core.discovery¶
Discovery module - finds packages with fabric agent configuration directories.
Supports framework-specific configuration directories:
.fabric/ - framework-agnostic fabric configuration
.crewai/ - CrewAI-specific configurations
.langgraph/ - LangGraph-specific configurations
.strands/ - Strands-specific configurations
The discovery order prefers the agnostic fabric before runtime-specific directories.
Module Contents¶
Functions¶
Get the workspace root directory. |
|
Discover all packages with fabric agent configuration directories. |
|
Discover all framework-specific config directories for all packages. |
|
Load a package’s fabric manifest. |
|
Determine the required framework from a config directory path. |
|
Load a specific fabric agent’s configuration. |
|
List all available fabric agents, optionally filtered by package or framework. |
Data¶
API¶
- agentic_fabric.core.discovery.logger = 'getLogger(...)'¶
- agentic_fabric.core.discovery.FRAMEWORK_DIRS = ['.fabric', '.crewai', '.langgraph', '.strands']¶
- agentic_fabric.core.discovery.DIR_TO_FRAMEWORK: dict[str, str | None] = None¶
- agentic_fabric.core.discovery.FRAMEWORK_TO_DIR: dict[str | None, str] = None¶
- agentic_fabric.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_fabric.core.discovery.discover_packages(workspace_root: pathlib.Path | None = None, framework: str | None = None) dict[str, pathlib.Path]¶
Discover all packages with fabric agent 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_fabric.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: {“sample”: {“crewai”: Path(…), “strands”: Path(…)}} Framework can be None for framework-agnostic .fabric/ directories.
- agentic_fabric.core.discovery.load_manifest(config_dir: pathlib.Path) dict[str, Any]¶
Load a package’s fabric manifest.
Args: config_dir: Path to the fabric or runtime-specific config directory.
Returns: Parsed manifest as a dictionary.
- agentic_fabric.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_fabric.core.discovery.get_fabric_agent_config(config_dir: pathlib.Path, fabric_agent_name: str) dict¶
Load a specific fabric agent’s configuration.
Args: config_dir: Path to the config directory (.fabric/, .crewai/, .strands/, .langgraph/). fabric_agent_name: Name of the fabric agent 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 fabric agent not found in manifest.
- agentic_fabric.core.discovery.list_fabric_agents(package_name: str | None = None, framework: str | None = None) dict[str, list[dict]]¶
List all available fabric agents, optionally filtered by package or framework.
Args: package_name: If provided, only list fabric agents for this package. framework: If provided, only list fabric agents that can run on this framework.
Returns: Dict mapping package name to list of fabric agent info dicts. Each fabric agent dict includes: - name: Fabric agent name - description: Fabric agent description - required_framework: Framework required (if in framework-specific dir)