Skip to content

Function: createAgent()

createAgent<TRequestContext, TDefinition>(def): TDefinition

Identity helper that brands a definition as a Mastra agent. Mirrors AppKit’s createAgent(def) so the registration shape matches:

const support = createAgent({
instructions: "...",
model: "databricks-claude-sonnet-4-6",
tools(plugins) { return { ... }; },
});

Adds the package’s default workspace when the definition omits one. That workspace carries Databricks skill mounts while command execution stays disabled until a sandbox is selected explicitly. An explicit workspace remains the caller’s complete override.

TRequestContext extends unknown = unknown

TDefinition extends MastraAgentDefinition<TRequestContext> = MastraAgentDefinition<TRequestContext>

TDefinition

TDefinition