agentic_fabric.core.loader

Loader module - creates CrewAI Crew objects from YAML configurations.

Note: This module imports CrewAI lazily to allow the core package to be installed without requiring CrewAI. For framework-agnostic usage, prefer using the decomposer module with runners instead.

Module Contents

Functions

load_knowledge_sources

Load knowledge sources from the specified paths.

create_agent_from_config

Create an Agent from YAML configuration.

create_task_from_config

Create a Task from YAML configuration.

load_fabric_agent_from_config

Load a complete Crew from configuration.

Data

API

agentic_fabric.core.loader.logger = 'getLogger(...)'
agentic_fabric.core.loader.load_knowledge_sources(knowledge_paths: list[pathlib.Path]) list

Load knowledge sources from the specified paths.

Args: knowledge_paths: List of paths to knowledge directories.

Returns: List of TextFileKnowledgeSource objects.

Raises: ImportError: If crewai is not installed.

agentic_fabric.core.loader.create_agent_from_config(agent_name: str, agent_config: dict, tools: list | None = None) crewai.Agent

Create an Agent from YAML configuration.

Args: agent_name: Name/key of the agent. agent_config: Agent configuration dict with role, goal, backstory. tools: Optional list of tools to give the agent.

Returns: Configured Agent instance.

Raises: ImportError: If crewai is not installed.

agentic_fabric.core.loader.create_task_from_config(task_name: str, task_config: dict, agent: crewai.Agent) crewai.Task

Create a Task from YAML configuration.

Args: task_name: Name/key of the task. task_config: Task configuration dict with description, expected_output. agent: Agent to assign to this task.

Returns: Configured Task instance.

Raises: ImportError: If crewai is not installed.

agentic_fabric.core.loader.load_fabric_agent_from_config(fabric_agent_config: dict) crewai.Crew

Load a complete Crew from configuration.

Args: fabric_agent_config: Configuration dict from get_fabric_agent_config().

Returns: Configured Crew instance ready to kickoff.

Raises: ImportError: If crewai is not installed.