Module agentforge4j.config.loader
Class BaseAgentLoader
java.lang.Object
com.agentforge4j.config.loader.agent.BaseAgentLoader
- All Implemented Interfaces:
AgentLoader
- Direct Known Subclasses:
ClasspathAgentLoader,FileSystemAgentLoader
Shared loading flow for agent bundle sources.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionLoads all agents available under a directory.loadAgents(List<String> bundleFiles) Loads agents from the given bundle entries, ignoring entries that do not identify an agent bundle.protected abstract voidlog(System.Logger.Level level, String message, Object... args) protected abstract AgentDefinitionFilereadAgentFile(String entry) protected abstract StringreadBoundariesFile(String entry) protected abstract StringreadSystemPromptFile(String entry)
-
Field Details
-
objectMapper
protected final com.fasterxml.jackson.databind.ObjectMapper objectMapper -
AGENT_DIR_SUFFIX
- See Also:
-
AGENT_FILE_NAME
- See Also:
-
SYSTEM_PROMPT_FILE_NAME
- See Also:
-
BOUNDARIES_FILE_NAME
- See Also:
-
-
Constructor Details
-
BaseAgentLoader
public BaseAgentLoader()
-
-
Method Details
-
log
-
listAgentDirectories
-
readAgentFile
-
readSystemPromptFile
-
readBoundariesFile
-
loadAgents
Description copied from interface:AgentLoaderLoads all agents available under a directory.- Specified by:
loadAgentsin interfaceAgentLoader- Returns:
- agents keyed by id
-
loadAgents
Description copied from interface:AgentLoaderLoads agents from the given bundle entries, ignoring entries that do not identify an agent bundle.- Specified by:
loadAgentsin interfaceAgentLoader- Parameters:
bundleFiles- candidate bundle entry paths- Returns:
- agents keyed by id
-