agentic_fabric.base

Base module - reusable agent archetypes and shared tool re-exports.

Archetypes are base templates that packages can extend in their own agents.yaml. Use the extends field to inherit from an archetype:

.. code:: yaml

my_engineer: extends: senior_engineer variables: language: Python backstory: | {base} Additional context specific to my package…

The {base} placeholder in agent config is replaced with the archetype’s value. {language} and other variables are interpolated into the resolved role/goal/backstory strings.

Package Contents

Functions

resolve_archetype

Resolve extends and variables in an agent config.

resolve_agent_archetypes

Resolve archetypes for every agent in a config dict.

Data

API

agentic_fabric.base.logger = 'getLogger(...)'
agentic_fabric.base.resolve_archetype(agent_config: dict[str, Any], *, archetypes: dict[str, dict[str, Any]] | None = None) dict[str, Any]

Resolve extends and variables in an agent config.

If the config has an extends key, the named archetype is loaded and its role/goal/backstory are merged. {base} in the agent’s own field is replaced with the archetype’s value. Other {variables} are interpolated into the final resolved strings.

Args: agent_config: Raw agent config dict that may contain extends and variables. archetypes: Optional pre-loaded archetypes dict. If None, built-in archetypes are loaded from archetypes.yaml.

Returns: New config dict with extends and variables consumed and all string fields interpolated.

agentic_fabric.base.resolve_agent_archetypes(agents_config: dict[str, dict[str, Any]], *, archetypes: dict[str, dict[str, Any]] | None = None) dict[str, dict[str, Any]]

Resolve archetypes for every agent in a config dict.

Args: agents_config: Dict mapping agent names to agent configs. archetypes: Optional pre-loaded archetypes dict.

Returns: New dict with archetypes resolved for each agent.