Skip to main content

Function: loadAgentFromFile()

Function: loadAgentFromFile()

function loadAgentFromFile(filePath: string, ctx: LoadContext): Promise<AgentDefinition>;

Loads a single markdown agent file and resolves its frontmatter against registered plugin toolkits + ambient tool library.

Rejects non-empty agents: frontmatter because single-file loads have no siblings to resolve sub-agent references against — callers must use loadAgentsFromDir when markdown agents delegate to one another.

Parameters

ParameterType
filePathstring
ctxLoadContext

Returns

Promise<AgentDefinition>

Databricks Developer Hub

Ready to ship your next agentic app in minutes?

Read docs