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 |
|
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
extendsandvariablesin an agent config.If the config has an
extendskey, 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
extendsandvariables. archetypes: Optional pre-loaded archetypes dict. IfNone, built-in archetypes are loaded fromarchetypes.yaml.Returns: New config dict with
extendsandvariablesconsumed 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.