Skip to content

Function: createAgent()

createAgent<T>(def): T

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 { ... }; },
});

Returns the definition unchanged - the wrapper exists only to anchor type inference and to match the AppKit API surface.

T extends MastraAgentDefinition

T

T