Class: MastraPluginClient
@mastra/client-js MastraClient extended with the Mastra plugin’s
custom routes. One client drives everything the chat UI needs:
- Conversation streaming via the inherited
getAgent(id).stream()(the standard Mastra agent route). - Thread history (
history/clearHistory), the conversation list (threads/removeThread/renameThread), the model catalogue (models), Genie starter prompts (suggestions), MLflow feedback logging (feedback), and inline embed resolution (chart/statement) over the plugin’s own routes - all derived frombasePath+ routes.MASTRA_ROUTES.
Built from the plugin’s published clientConfig() payload
(MastraClientConfig). credentials: "include" is set once at
construction so the session cookie (which pins the server-side
thread id) travels with every request, streaming included.
Extends
Section titled “Extends”MastraClient
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MastraPluginClient(
config):MastraPluginClient
Parameters
Section titled “Parameters”config
Section titled “config”agents
Section titled “agents”string[] = ...
basePath
Section titled “basePath”string = ...
chatAlwaysAvailable
Section titled “chatAlwaysAvailable”boolean = ...
defaultAgent
Section titled “defaultAgent”string = ...
feedbackEnabled
Section titled “feedbackEnabled”boolean = ...
Returns
Section titled “Returns”MastraPluginClient
Overrides
Section titled “Overrides”MastraClient.constructor
Properties
Section titled “Properties”agents
Section titled “agents”
readonlyagents: readonlystring[]
Registered agent ids, surfaced for pickers.
apiPrefix
Section titled “apiPrefix”
protectedreadonlyapiPrefix:string
Inherited from
Section titled “Inherited from”MastraClient.apiPrefix
basePath
Section titled “basePath”
readonlybasePath:string
Plugin mount prefix (/api/<plugin-name>); all custom routes derive from it.
channels
Section titled “channels”
readonlychannels:Channels
Inherited from
Section titled “Inherited from”MastraClient.channels
chatAlwaysAvailable
Section titled “chatAlwaysAvailable”
readonlychatAlwaysAvailable:boolean
Whether the agents run their Databricks calls as the app service principal
rather than on-behalf-of the signed-in user. When true the chat works for
any caller who can open the app, so a UI that hides chat when the OBO token
is absent should show it regardless. false (the default "user" identity
mode) keeps the OBO-gated behavior.
conversations
Section titled “conversations”
readonlyconversations:Conversations
Inherited from
Section titled “Inherited from”MastraClient.conversations
defaultAgent
Section titled “defaultAgent”
readonlydefaultAgent:string
Agent the bare (un-suffixed) routes resolve to.
feedbackEnabled
Section titled “feedbackEnabled”
readonlyfeedbackEnabled:boolean
Whether the server can log feedback to MLflow. When false, the
chat UI hides thumbs / comment controls and feedback would
be rejected server-side, so callers gate on this before offering
feedback affordances.
options
Section titled “options”
readonlyoptions:ClientOptions
Inherited from
Section titled “Inherited from”MastraClient.options
responses
Section titled “responses”
readonlyresponses:Responses
Inherited from
Section titled “Inherited from”MastraClient.responses
Methods
Section titled “Methods”addDatasetItem()
Section titled “addDatasetItem()”addDatasetItem(
params):Promise<DatasetItem>
Adds an item to a dataset
Parameters
Section titled “Parameters”params
Section titled “params”AddDatasetItemParams
Returns
Section titled “Returns”Promise<DatasetItem>
Inherited from
Section titled “Inherited from”MastraClient.addDatasetItem
approveToolCallStream()
Section titled “approveToolCallStream()”approveToolCallStream(
agentId,params):Promise<MastraStreamResponse>
Resume a suspended requireApproval tool via approve-tool-call.
Reads SSE directly instead of agent.approveToolCall() so the
stock client’s internal processChatResponse_vNext tee does not
throw when the resume stream emits tool-result without a new
tool-call.
Parameters
Section titled “Parameters”agentId
Section titled “agentId”string
params
Section titled “params”string
signal?
Section titled “signal?”AbortSignal
threadId?
Section titled “threadId?”string
toolCallId
Section titled “toolCallId”string
Returns
Section titled “Returns”Promise<MastraStreamResponse>
awaitBufferStatus()
Section titled “awaitBufferStatus()”awaitBufferStatus(
params):Promise<{record: {activeObservations:string;bufferedObservations?:string;bufferedReflection?:string;config: {[key:string]:unknown; };createdAt:string;generationCount:number;id:string;isObserving:boolean;isReflecting:boolean;lastObservedAt?:string;metadata?: {[key:string]:unknown; };observationTokenCount:number;originType:"initial"|"observation"|"reflection";pendingMessageTokens:number;resourceId:string;scope:"thread"|"resource";threadId:string|null;totalTokensObserved:number;updatedAt:string; } |null; }>
Blocks until any in-flight observational memory buffering completes, then returns the updated record
Parameters
Section titled “Parameters”params
Section titled “params”AwaitBufferStatusParams
Parameters containing agentId, resourceId, threadId
Returns
Section titled “Returns”Promise<{ record: { activeObservations: string; bufferedObservations?: string; bufferedReflection?: string; config: {[key: string]: unknown; }; createdAt: string; generationCount: number; id: string; isObserving: boolean; isReflecting: boolean; lastObservedAt?: string; metadata?: {[key: string]: unknown; }; observationTokenCount: number; originType: "initial" | "observation" | "reflection"; pendingMessageTokens: number; resourceId: string; scope: "thread" | "resource"; threadId: string | null; totalTokensObserved: number; updatedAt: string; } | null; }>
Promise containing the updated OM record after buffering completes
Inherited from
Section titled “Inherited from”MastraClient.awaitBufferStatus
batchDeleteDatasetItems()
Section titled “batchDeleteDatasetItems()”batchDeleteDatasetItems(
params):Promise<{deletedCount:number;success:boolean; }>
Batch deletes items from a dataset
Parameters
Section titled “Parameters”params
Section titled “params”BatchDeleteDatasetItemsParams
Returns
Section titled “Returns”Promise<{ deletedCount: number; success: boolean; }>
Inherited from
Section titled “Inherited from”MastraClient.batchDeleteDatasetItems
batchInsertDatasetItems()
Section titled “batchInsertDatasetItems()”batchInsertDatasetItems(
params):Promise<{count:number;items:DatasetItem[]; }>
Batch inserts items to a dataset
Parameters
Section titled “Parameters”params
Section titled “params”BatchInsertDatasetItemsParams
Returns
Section titled “Returns”Promise<{ count: number; items: DatasetItem[]; }>
Inherited from
Section titled “Inherited from”MastraClient.batchInsertDatasetItems
chart()
Section titled “chart()”chart(
id,signal?):Promise<{chartId:string;error?:string;result?: {chartType:"custom"|"bar"|"horizontalBar"|"line"|"area"|"combo"|"waterfall"|"scatter"|"heatmap"|"radar"|"pie"|"funnel"|"treemap";option:Record<string,unknown>; }; } |undefined>
Resolve a [chart:<id>] marker from
GET ${basePath}/embed/chart/:id. The chart planner runs in the
background, so the server long-polls the cache and returns the
settled entry in one response. A 404 (unknown / expired id)
resolves to undefined so the slot renders nothing.
Parameters
Section titled “Parameters”string
signal?
Section titled “signal?”AbortSignal
Returns
Section titled “Returns”Promise<{ chartId: string; error?: string; result?: { chartType: "custom" | "bar" | "horizontalBar" | "line" | "area" | "combo" | "waterfall" | "scatter" | "heatmap" | "radar" | "pie" | "funnel" | "treemap"; option: Record<string, unknown>; }; } | undefined>
clearHistory()
Section titled “clearHistory()”clearHistory(
options?):Promise<{agentId:string;cleared:number;ok:true;threadId:string; }>
Wipe a thread’s history (DELETE ${basePath}/route/history). threadId
targets a specific conversation via the thread-selection header (so it
doesn’t depend on shared client state); omit it to clear the per-session
cookie thread. The session cookie that anchors the thread id is
preserved - only the messages go away. Idempotent: a fresh thread reports
cleared: 0 without erroring.
Parameters
Section titled “Parameters”options?
Section titled “options?”agentId?
Section titled “agentId?”string
signal?
Section titled “signal?”AbortSignal
threadId?
Section titled “threadId?”string
Returns
Section titled “Returns”Promise<{ agentId: string; cleared: number; ok: true; threadId: string; }>
clusterFailures()
Section titled “clusterFailures()”clusterFailures(
params):Promise<{clusters:object[];proposedTags?:object[]; }>
Cluster experiment failures using AI to identify common failure patterns.
Parameters
Section titled “Parameters”params
Section titled “params”availableTags?
Section titled “availableTags?”string[]
object[]
modelId
Section titled “modelId”string
prompt?
Section titled “prompt?”string
Returns
Section titled “Returns”Promise<{ clusters: object[]; proposedTags?: object[]; }>
Inherited from
Section titled “Inherited from”MastraClient.clusterFailures
compareExperiments()
Section titled “compareExperiments()”compareExperiments(
params):Promise<CompareExperimentsResponse>
Compares two dataset experiments for regression detection
Parameters
Section titled “Parameters”params
Section titled “params”CompareExperimentsParams
Returns
Section titled “Returns”Promise<CompareExperimentsResponse>
Inherited from
Section titled “Inherited from”MastraClient.compareExperiments
createDataset()
Section titled “createDataset()”createDataset(
params):Promise<DatasetRecord>
Creates a new dataset
Parameters
Section titled “Parameters”params
Section titled “params”CreateDatasetParams
Returns
Section titled “Returns”Promise<DatasetRecord>
Inherited from
Section titled “Inherited from”MastraClient.createDataset
createFeedback()
Section titled “createFeedback()”createFeedback(
params):Promise<{success:boolean; }>
Creates a single feedback record in the observability store.
Parameters
Section titled “Parameters”params
Section titled “params”feedback
Section titled “feedback”{ comment?: string | null; entityId?: string | null; entityName?: string | null; entityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null; entityVersionId?: string | null; environment?: string | null; executionSource?: string | null; experimentId?: string | null; feedbackId?: string | null; feedbackSource?: string | null; feedbackType: string; feedbackUserId?: string | null; metadata?: Record<string, unknown> | null; organizationId?: string | null; parentEntityId?: string | null; parentEntityName?: string | null; parentEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null; parentEntityVersionId?: string | null; requestId?: string | null; resourceId?: string | null; rootEntityId?: string | null; rootEntityName?: string | null; rootEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null; rootEntityVersionId?: string | null; runId?: string | null; scope?: Record<string, unknown> | null; serviceName?: string | null; sessionId?: string | null; source?: string | null; sourceId?: string | null; spanId?: string | null; tags?: string[] | null; threadId?: string | null; traceId?: string | null; userId?: string | null; value: string | number; }
feedback.comment?
Section titled “feedback.comment?”string | null
feedback.entityId?
Section titled “feedback.entityId?”string | null
feedback.entityName?
Section titled “feedback.entityName?”string | null
feedback.entityType?
Section titled “feedback.entityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null
feedback.entityVersionId?
Section titled “feedback.entityVersionId?”string | null
feedback.environment?
Section titled “feedback.environment?”string | null
feedback.executionSource?
Section titled “feedback.executionSource?”string | null
feedback.experimentId?
Section titled “feedback.experimentId?”string | null
feedback.feedbackId?
Section titled “feedback.feedbackId?”string | null
feedback.feedbackSource?
Section titled “feedback.feedbackSource?”string | null
feedback.feedbackType
Section titled “feedback.feedbackType”string
feedback.feedbackUserId?
Section titled “feedback.feedbackUserId?”string | null
feedback.metadata?
Section titled “feedback.metadata?”Record<string, unknown> | null
feedback.organizationId?
Section titled “feedback.organizationId?”string | null
feedback.parentEntityId?
Section titled “feedback.parentEntityId?”string | null
feedback.parentEntityName?
Section titled “feedback.parentEntityName?”string | null
feedback.parentEntityType?
Section titled “feedback.parentEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null
feedback.parentEntityVersionId?
Section titled “feedback.parentEntityVersionId?”string | null
feedback.requestId?
Section titled “feedback.requestId?”string | null
feedback.resourceId?
Section titled “feedback.resourceId?”string | null
feedback.rootEntityId?
Section titled “feedback.rootEntityId?”string | null
feedback.rootEntityName?
Section titled “feedback.rootEntityName?”string | null
feedback.rootEntityType?
Section titled “feedback.rootEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null
feedback.rootEntityVersionId?
Section titled “feedback.rootEntityVersionId?”string | null
feedback.runId?
Section titled “feedback.runId?”string | null
feedback.scope?
Section titled “feedback.scope?”Record<string, unknown> | null
feedback.serviceName?
Section titled “feedback.serviceName?”string | null
feedback.sessionId?
Section titled “feedback.sessionId?”string | null
feedback.source?
Section titled “feedback.source?”string | null
feedback.sourceId?
Section titled “feedback.sourceId?”string | null
feedback.spanId?
Section titled “feedback.spanId?”string | null
feedback.tags?
Section titled “feedback.tags?”string[] | null
feedback.threadId?
Section titled “feedback.threadId?”string | null
feedback.traceId?
Section titled “feedback.traceId?”string | null
feedback.userId?
Section titled “feedback.userId?”string | null
feedback.value
Section titled “feedback.value”string | number
Returns
Section titled “Returns”Promise<{ success: boolean; }>
Inherited from
Section titled “Inherited from”MastraClient.createFeedback
createMemoryThread()
Section titled “createMemoryThread()”createMemoryThread(
params):Promise<{createdAt:string;id:string;metadata?: {[key:string]:unknown; };resourceId:string;title?:string;updatedAt:string; }>
Creates a new memory thread
Parameters
Section titled “Parameters”params
Section titled “params”CreateMemoryThreadParams
Parameters for creating the memory thread including optional request context
Returns
Section titled “Returns”Promise<{ createdAt: string; id: string; metadata?: {[key: string]: unknown; }; resourceId: string; title?: string; updatedAt: string; }>
Promise containing the created memory thread
Inherited from
Section titled “Inherited from”MastraClient.createMemoryThread
createScore()
Section titled “createScore()”createScore(
params):Promise<{success:boolean; }>
Creates a single score record in the observability store.
Parameters
Section titled “Parameters”params
Section titled “params”{ entityId?: string | null; entityName?: string | null; entityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null; entityVersionId?: string | null; environment?: string | null; executionSource?: string | null; experimentId?: string | null; metadata?: Record<string, unknown> | null; organizationId?: string | null; parentEntityId?: string | null; parentEntityName?: string | null; parentEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null; parentEntityVersionId?: string | null; reason?: string | null; requestId?: string | null; resourceId?: string | null; rootEntityId?: string | null; rootEntityName?: string | null; rootEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null; rootEntityVersionId?: string | null; runId?: string | null; scope?: Record<string, unknown> | null; score: number; scoreId?: string | null; scorerId: string; scorerName?: string | null; scorerVersion?: string | null; scoreSource?: string | null; scoreTraceId?: string | null; serviceName?: string | null; sessionId?: string | null; source?: string | null; spanId?: string | null; tags?: string[] | null; threadId?: string | null; traceId?: string | null; userId?: string | null; }
score.entityId?
Section titled “score.entityId?”string | null
score.entityName?
Section titled “score.entityName?”string | null
score.entityType?
Section titled “score.entityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null
score.entityVersionId?
Section titled “score.entityVersionId?”string | null
score.environment?
Section titled “score.environment?”string | null
score.executionSource?
Section titled “score.executionSource?”string | null
score.experimentId?
Section titled “score.experimentId?”string | null
score.metadata?
Section titled “score.metadata?”Record<string, unknown> | null
score.organizationId?
Section titled “score.organizationId?”string | null
score.parentEntityId?
Section titled “score.parentEntityId?”string | null
score.parentEntityName?
Section titled “score.parentEntityName?”string | null
score.parentEntityType?
Section titled “score.parentEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null
score.parentEntityVersionId?
Section titled “score.parentEntityVersionId?”string | null
score.reason?
Section titled “score.reason?”string | null
score.requestId?
Section titled “score.requestId?”string | null
score.resourceId?
Section titled “score.resourceId?”string | null
score.rootEntityId?
Section titled “score.rootEntityId?”string | null
score.rootEntityName?
Section titled “score.rootEntityName?”string | null
score.rootEntityType?
Section titled “score.rootEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null
score.rootEntityVersionId?
Section titled “score.rootEntityVersionId?”string | null
score.runId?
Section titled “score.runId?”string | null
score.scope?
Section titled “score.scope?”Record<string, unknown> | null
score.score
Section titled “score.score”number
score.scoreId?
Section titled “score.scoreId?”string | null
score.scorerId
Section titled “score.scorerId”string
score.scorerName?
Section titled “score.scorerName?”string | null
score.scorerVersion?
Section titled “score.scorerVersion?”string | null
score.scoreSource?
Section titled “score.scoreSource?”string | null
score.scoreTraceId?
Section titled “score.scoreTraceId?”string | null
score.serviceName?
Section titled “score.serviceName?”string | null
score.sessionId?
Section titled “score.sessionId?”string | null
score.source?
Section titled “score.source?”string | null
score.spanId?
Section titled “score.spanId?”string | null
score.tags?
Section titled “score.tags?”string[] | null
score.threadId?
Section titled “score.threadId?”string | null
score.traceId?
Section titled “score.traceId?”string | null
score.userId?
Section titled “score.userId?”string | null
Returns
Section titled “Returns”Promise<{ success: boolean; }>
Inherited from
Section titled “Inherited from”MastraClient.createScore
createStoredAgent()
Section titled “createStoredAgent()”createStoredAgent(
params):Promise<StoredAgentResponse>
Creates a new stored agent
Parameters
Section titled “Parameters”params
Section titled “params”CreateStoredAgentParams
Agent configuration including id, name, instructions, model, etc.
Returns
Section titled “Returns”Promise<StoredAgentResponse>
Promise containing the created stored agent
Inherited from
Section titled “Inherited from”MastraClient.createStoredAgent
createStoredMCPClient()
Section titled “createStoredMCPClient()”createStoredMCPClient(
params):Promise<StoredMCPClientResponse>
Creates a new stored MCP client
Parameters
Section titled “Parameters”params
Section titled “params”CreateStoredMCPClientParams
MCP client configuration
Returns
Section titled “Returns”Promise<StoredMCPClientResponse>
Promise containing the created stored MCP client
Inherited from
Section titled “Inherited from”MastraClient.createStoredMCPClient
createStoredPromptBlock()
Section titled “createStoredPromptBlock()”createStoredPromptBlock(
params):Promise<StoredPromptBlockResponse>
Creates a new stored prompt block
Parameters
Section titled “Parameters”params
Section titled “params”CreateStoredPromptBlockParams
Prompt block configuration including name, content, rules, etc.
Returns
Section titled “Returns”Promise<StoredPromptBlockResponse>
Promise containing the created stored prompt block
Inherited from
Section titled “Inherited from”MastraClient.createStoredPromptBlock
createStoredScorer()
Section titled “createStoredScorer()”createStoredScorer(
params):Promise<StoredScorerResponse>
Creates a new stored scorer definition
Parameters
Section titled “Parameters”params
Section titled “params”CreateStoredScorerParams
Scorer definition configuration
Returns
Section titled “Returns”Promise<StoredScorerResponse>
Promise containing the created stored scorer definition
Inherited from
Section titled “Inherited from”MastraClient.createStoredScorer
createStoredSkill()
Section titled “createStoredSkill()”createStoredSkill(
params):Promise<StoredSkillResponse>
Creates a new stored skill
Parameters
Section titled “Parameters”params
Section titled “params”CreateStoredSkillParams
Skill configuration
Returns
Section titled “Returns”Promise<StoredSkillResponse>
Promise containing the created stored skill
Inherited from
Section titled “Inherited from”MastraClient.createStoredSkill
declineToolCallStream()
Section titled “declineToolCallStream()”declineToolCallStream(
agentId,params):Promise<MastraStreamResponse>
Deny a suspended requireApproval tool via decline-tool-call.
Same direct SSE reader as approveToolCallStream.
Parameters
Section titled “Parameters”agentId
Section titled “agentId”string
params
Section titled “params”string
signal?
Section titled “signal?”AbortSignal
threadId?
Section titled “threadId?”string
toolCallId
Section titled “toolCallId”string
Returns
Section titled “Returns”Promise<MastraStreamResponse>
defaultModel()
Section titled “defaultModel()”defaultModel(
agentId?,signal?):Promise<string|null>
Fetch the humanized name of the static default model agentId falls back
to when no model is pinned, from GET ${basePath}/default-model. Returns
the server-humanized displayName (never a raw endpoint id), or null
when the agent resolves its model dynamically at call time (or the agent
id is unknown) - there’s nothing static to advertise. The picker uses this
to label its default option on load, before the /models catalogue
arrives. Defaults to the server’s default agent when agentId is omitted.
Parameters
Section titled “Parameters”agentId?
Section titled “agentId?”string
signal?
Section titled “signal?”AbortSignal
Returns
Section titled “Returns”Promise<string | null>
deleteDataset()
Section titled “deleteDataset()”deleteDataset(
datasetId):Promise<{success:boolean; }>
Deletes a dataset
Parameters
Section titled “Parameters”datasetId
Section titled “datasetId”string
Returns
Section titled “Returns”Promise<{ success: boolean; }>
Inherited from
Section titled “Inherited from”MastraClient.deleteDataset
deleteDatasetItem()
Section titled “deleteDatasetItem()”deleteDatasetItem(
datasetId,itemId):Promise<{success:boolean; }>
Deletes a dataset item
Parameters
Section titled “Parameters”datasetId
Section titled “datasetId”string
itemId
Section titled “itemId”string
Returns
Section titled “Returns”Promise<{ success: boolean; }>
Inherited from
Section titled “Inherited from”MastraClient.deleteDatasetItem
deleteThread()
Section titled “deleteThread()”deleteThread(
threadId,opts):Promise<{message:string;success:boolean; }>
Parameters
Section titled “Parameters”threadId
Section titled “threadId”string
{ agentId: string; networkId?: undefined; requestContext?: RequestContext<unknown> | Record<string, any>; } | { agentId?: undefined; networkId: string; requestContext?: RequestContext<unknown> | Record<string, any>; }
Returns
Section titled “Returns”Promise<{ message: string; success: boolean; }>
Inherited from
Section titled “Inherited from”MastraClient.deleteThread
feedback()
Section titled “feedback()”feedback(
input):Promise<{assessmentId?:string;ok:boolean; }>
Log user feedback for a turn to POST ${basePath}/route/feedback.
traceId is the tr-<hex> value the server sent on the stream
response (via MLFLOW_TRACE_ID_HEADER) for that assistant message;
value carries a thumbs (boolean) / rating, and/or comment
carries freeform text. The server logs it as a HUMAN assessment on
the trace, attributed to the signed-in user.
Resolves with { ok: false } (not a throw) when the assessment
couldn’t be recorded yet - most often because the trace is still
exporting to MLflow - so callers can prompt a retry. Throws only on
a transport / HTTP-level failure.
Parameters
Section titled “Parameters”comment?
Section titled “comment?”string = ...
string = ...
traceId
Section titled “traceId”string = ...
value?
Section titled “value?”string | number | boolean = ...
Returns
Section titled “Returns”Promise<{ assessmentId?: string; ok: boolean; }>
generateDatasetItems()
Section titled “generateDatasetItems()”generateDatasetItems(
params):Promise<{items:GeneratedItem[]; }>
Generates synthetic dataset items using AI. Items are returned for review, not auto-saved.
Parameters
Section titled “Parameters”params
Section titled “params”GenerateDatasetItemsParams
Returns
Section titled “Returns”Promise<{ items: GeneratedItem[]; }>
Inherited from
Section titled “Inherited from”MastraClient.generateDatasetItems
getA2A()
Section titled “getA2A()”getA2A(
agentId):A2A
Gets an A2A client for interacting with an agent via the A2A protocol
Parameters
Section titled “Parameters”agentId
Section titled “agentId”string
ID of the agent to interact with
Returns
Section titled “Returns”A2A
A2A client instance
Inherited from
Section titled “Inherited from”MastraClient.getA2A
getAgent()
Section titled “getAgent()”getAgent(
agentId,version?):Agent
Gets an agent instance by ID
Parameters
Section titled “Parameters”agentId
Section titled “agentId”string
ID of the agent to retrieve
version?
Section titled “version?”AgentVersionIdentifier
Optional version selector for stored agent overrides
Returns
Section titled “Returns”Agent
Agent instance
Inherited from
Section titled “Inherited from”MastraClient.getAgent
getAgentBuilderAction()
Section titled “getAgentBuilderAction()”getAgentBuilderAction(
actionId):AgentBuilder
Gets an agent builder instance for executing agent-builder workflows
Parameters
Section titled “Parameters”actionId
Section titled “actionId”string
Returns
Section titled “Returns”AgentBuilder
AgentBuilder instance
Inherited from
Section titled “Inherited from”MastraClient.getAgentBuilderAction
getAgentBuilderActions()
Section titled “getAgentBuilderActions()”getAgentBuilderActions():
Promise<Record<string,WorkflowInfo>>
Gets all available agent builder actions
Returns
Section titled “Returns”Promise<Record<string, WorkflowInfo>>
Promise containing map of action IDs to action details
Inherited from
Section titled “Inherited from”MastraClient.getAgentBuilderActions
getAgentController()
Section titled “getAgentController()”getAgentController(
controllerId):AgentController
Scopes to an agent controller hosted on the connected Mastra instance. Use
getAgentController(id).session(resourceId) to create/resume a session,
stream its events, and send messages.
Parameters
Section titled “Parameters”controllerId
Section titled “controllerId”string
The id the agent controller is registered under on Mastra
Returns
Section titled “Returns”AgentController
Inherited from
Section titled “Inherited from”MastraClient.getAgentController
getBackgroundTask()
Section titled “getBackgroundTask()”getBackgroundTask(
backgroundTaskId):Promise<{agentId:string;args: {[key:string]:unknown; };completedAt?:string;createdAt:string;error?: {message:string;stack?:string; };id:string;maxRetries:number;resourceId?:string;result?:unknown;retryCount:number;runId:string;startedAt?:string;status:"running"|"pending"|"completed"|"failed"|"suspended"|"cancelled"|"timed_out";suspendPayload?:unknown;threadId?:string;timeoutMs:number;toolCallId:string;toolName:string; }>
Gets a single background task by ID.
Parameters
Section titled “Parameters”backgroundTaskId
Section titled “backgroundTaskId”string
Returns
Section titled “Returns”Promise<{ agentId: string; args: {[key: string]: unknown; }; completedAt?: string; createdAt: string; error?: { message: string; stack?: string; }; id: string; maxRetries: number; resourceId?: string; result?: unknown; retryCount: number; runId: string; startedAt?: string; status: "running" | "pending" | "completed" | "failed" | "suspended" | "cancelled" | "timed_out"; suspendPayload?: unknown; threadId?: string; timeoutMs: number; toolCallId: string; toolName: string; }>
Inherited from
Section titled “Inherited from”MastraClient.getBackgroundTask
getBranch()
Section titled “getBranch()”getBranch(
params):Promise<{spans:object[];traceId:string; }>
Retrieves the subtree of spans rooted at a given span. The optional depth field
bounds descendant levels below the anchor (0 = anchor only; omitted = full subtree).
Parameters
Section titled “Parameters”params
Section titled “params”depth?
Section titled “depth?”unknown
spanId
Section titled “spanId”string
traceId
Section titled “traceId”string
Returns
Section titled “Returns”Promise<{ spans: object[]; traceId: string; }>
Inherited from
Section titled “Inherited from”MastraClient.getBranch
getBuilderAvailableModels()
Section titled “getBuilderAvailableModels()”getBuilderAvailableModels():
Promise<{providers:object[]; }>
Retrieves the AI providers/models available under the active builder model policy. The server applies the EE allowlist, so the result can be rendered directly in the model picker.
Returns
Section titled “Returns”Promise<{ providers: object[]; }>
Promise containing the policy-filtered providers/models
Inherited from
Section titled “Inherited from”MastraClient.getBuilderAvailableModels
getBuilderRegistryPopular()
Section titled “getBuilderRegistryPopular()”getBuilderRegistryPopular(
registryId,params?):Promise<BuilderRegistryPopularResponse>
Fetch the popular skills feed from a builder skill registry.
Requires stored-skills:read permission.
Parameters
Section titled “Parameters”registryId
Section titled “registryId”string
params?
Section titled “params?”limit?
Section titled “limit?”number
offset?
Section titled “offset?”number
Returns
Section titled “Returns”Promise<BuilderRegistryPopularResponse>
Inherited from
Section titled “Inherited from”MastraClient.getBuilderRegistryPopular
getBuilderRegistryPreview()
Section titled “getBuilderRegistryPreview()”getBuilderRegistryPreview(
registryId,params):Promise<BuilderRegistryPreviewResponse>
Fetch the rendered preview content for a single registry skill.
Requires stored-skills:read permission.
Parameters
Section titled “Parameters”registryId
Section titled “registryId”string
params
Section titled “params”string
string
string
Returns
Section titled “Returns”Promise<BuilderRegistryPreviewResponse>
Inherited from
Section titled “Inherited from”MastraClient.getBuilderRegistryPreview
getBuilderSettings()
Section titled “getBuilderSettings()”getBuilderSettings():
Promise<BuilderSettingsResponse>
Retrieves agent builder settings for UI gating. Returns feature flags and configuration set by admin.
Returns
Section titled “Returns”Promise<BuilderSettingsResponse>
Promise containing builder settings
Inherited from
Section titled “Inherited from”MastraClient.getBuilderSettings
getDataset()
Section titled “getDataset()”getDataset(
datasetId):Promise<DatasetRecord>
Gets a single dataset by ID
Parameters
Section titled “Parameters”datasetId
Section titled “datasetId”string
Returns
Section titled “Returns”Promise<DatasetRecord>
Inherited from
Section titled “Inherited from”MastraClient.getDataset
getDatasetExperiment()
Section titled “getDatasetExperiment()”getDatasetExperiment(
datasetId,experimentId):Promise<DatasetExperiment>
Gets a single dataset experiment by ID
Parameters
Section titled “Parameters”datasetId
Section titled “datasetId”string
experimentId
Section titled “experimentId”string
Returns
Section titled “Returns”Promise<DatasetExperiment>
Inherited from
Section titled “Inherited from”MastraClient.getDatasetExperiment
getDatasetItem()
Section titled “getDatasetItem()”getDatasetItem(
datasetId,itemId):Promise<DatasetItem>
Gets a single dataset item by ID
Parameters
Section titled “Parameters”datasetId
Section titled “datasetId”string
itemId
Section titled “itemId”string
Returns
Section titled “Returns”Promise<DatasetItem>
Inherited from
Section titled “Inherited from”MastraClient.getDatasetItem
getDatasetItemVersion()
Section titled “getDatasetItemVersion()”getDatasetItemVersion(
datasetId,itemId,datasetVersion):Promise<DatasetItemVersionResponse>
Gets a specific version of a dataset item
Parameters
Section titled “Parameters”datasetId
Section titled “datasetId”string
itemId
Section titled “itemId”string
datasetVersion
Section titled “datasetVersion”number
Returns
Section titled “Returns”Promise<DatasetItemVersionResponse>
Inherited from
Section titled “Inherited from”MastraClient.getDatasetItemVersion
getEntityNames()
Section titled “getEntityNames()”getEntityNames(
params?):Promise<{names:string[]; }>
Returns distinct entity names with optional type filtering.
Parameters
Section titled “Parameters”params?
Section titled “params?”entityType?
Section titled “entityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
Returns
Section titled “Returns”Promise<{ names: string[]; }>
Inherited from
Section titled “Inherited from”MastraClient.getEntityNames
getEntityTypes()
Section titled “getEntityTypes()”getEntityTypes():
Promise<{entityTypes:EntityType[]; }>
Returns distinct entity types from observability data.
Returns
Section titled “Returns”Promise<{ entityTypes: EntityType[]; }>
Inherited from
Section titled “Inherited from”MastraClient.getEntityTypes
getEnvironments()
Section titled “getEnvironments()”getEnvironments():
Promise<{environments:string[]; }>
Returns distinct environments from observability data.
Returns
Section titled “Returns”Promise<{ environments: string[]; }>
Inherited from
Section titled “Inherited from”MastraClient.getEnvironments
getExperimentReviewSummary()
Section titled “getExperimentReviewSummary()”getExperimentReviewSummary():
Promise<{counts:ExperimentReviewCounts[]; }>
Gets review status counts aggregated per experiment
Returns
Section titled “Returns”Promise<{ counts: ExperimentReviewCounts[]; }>
Inherited from
Section titled “Inherited from”MastraClient.getExperimentReviewSummary
getFeedbackAggregate()
Section titled “getFeedbackAggregate()”getFeedbackAggregate(
params):Promise<{changePercent?:number|null;previousValue?:number|null;value:number|null; }>
Returns an aggregated feedback value with optional period-over-period comparison.
Parameters
Section titled “Parameters”params
Section titled “params”aggregation
Section titled “aggregation”"min" | "max" | "sum" | "avg" | "count" | "count_distinct" | "last"
comparePeriod?
Section titled “comparePeriod?”"previous_period" | "previous_day" | "previous_week"
feedbackSource?
Section titled “feedbackSource?”string
feedbackType
Section titled “feedbackType”string
filters?
Section titled “filters?”{ entityName?: string; entityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; entityVersionId?: string; environment?: string; executionSource?: string; experimentId?: string; feedbackSource?: string; feedbackType?: string | string[]; feedbackUserId?: string; organizationId?: string; parentEntityName?: string; parentEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; parentEntityVersionId?: string; requestId?: string; resourceId?: string; rootEntityName?: string; rootEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; rootEntityVersionId?: string; runId?: string; serviceName?: string; sessionId?: string; source?: string; spanId?: string; tags?: string[]; threadId?: string; timestamp?: { end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }; traceId?: string; userId?: string; }
filters.entityName?
Section titled “filters.entityName?”string
filters.entityType?
Section titled “filters.entityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.entityVersionId?
Section titled “filters.entityVersionId?”string
filters.environment?
Section titled “filters.environment?”string
filters.executionSource?
Section titled “filters.executionSource?”string
filters.experimentId?
Section titled “filters.experimentId?”string
filters.feedbackSource?
Section titled “filters.feedbackSource?”string
filters.feedbackType?
Section titled “filters.feedbackType?”string | string[]
filters.feedbackUserId?
Section titled “filters.feedbackUserId?”string
filters.organizationId?
Section titled “filters.organizationId?”string
filters.parentEntityName?
Section titled “filters.parentEntityName?”string
filters.parentEntityType?
Section titled “filters.parentEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.parentEntityVersionId?
Section titled “filters.parentEntityVersionId?”string
filters.requestId?
Section titled “filters.requestId?”string
filters.resourceId?
Section titled “filters.resourceId?”string
filters.rootEntityName?
Section titled “filters.rootEntityName?”string
filters.rootEntityType?
Section titled “filters.rootEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.rootEntityVersionId?
Section titled “filters.rootEntityVersionId?”string
filters.runId?
Section titled “filters.runId?”string
filters.serviceName?
Section titled “filters.serviceName?”string
filters.sessionId?
Section titled “filters.sessionId?”string
filters.source?
Section titled “filters.source?”string
filters.spanId?
Section titled “filters.spanId?”string
filters.tags?
Section titled “filters.tags?”string[]
filters.threadId?
Section titled “filters.threadId?”string
filters.timestamp?
Section titled “filters.timestamp?”{ end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }
filters.timestamp.end?
Section titled “filters.timestamp.end?”Date
filters.timestamp.endExclusive?
Section titled “filters.timestamp.endExclusive?”boolean
filters.timestamp.start?
Section titled “filters.timestamp.start?”Date
filters.timestamp.startExclusive?
Section titled “filters.timestamp.startExclusive?”boolean
filters.traceId?
Section titled “filters.traceId?”string
filters.userId?
Section titled “filters.userId?”string
Returns
Section titled “Returns”Promise<{ changePercent?: number | null; previousValue?: number | null; value: number | null; }>
Inherited from
Section titled “Inherited from”MastraClient.getFeedbackAggregate
getFeedbackBreakdown()
Section titled “getFeedbackBreakdown()”getFeedbackBreakdown(
params):Promise<{groups:object[]; }>
Returns feedback values grouped by specified dimensions.
Parameters
Section titled “Parameters”params
Section titled “params”aggregation
Section titled “aggregation”"min" | "max" | "sum" | "avg" | "count" | "count_distinct" | "last"
feedbackSource?
Section titled “feedbackSource?”string
feedbackType
Section titled “feedbackType”string
filters?
Section titled “filters?”{ entityName?: string; entityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; entityVersionId?: string; environment?: string; executionSource?: string; experimentId?: string; feedbackSource?: string; feedbackType?: string | string[]; feedbackUserId?: string; organizationId?: string; parentEntityName?: string; parentEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; parentEntityVersionId?: string; requestId?: string; resourceId?: string; rootEntityName?: string; rootEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; rootEntityVersionId?: string; runId?: string; serviceName?: string; sessionId?: string; source?: string; spanId?: string; tags?: string[]; threadId?: string; timestamp?: { end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }; traceId?: string; userId?: string; }
filters.entityName?
Section titled “filters.entityName?”string
filters.entityType?
Section titled “filters.entityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.entityVersionId?
Section titled “filters.entityVersionId?”string
filters.environment?
Section titled “filters.environment?”string
filters.executionSource?
Section titled “filters.executionSource?”string
filters.experimentId?
Section titled “filters.experimentId?”string
filters.feedbackSource?
Section titled “filters.feedbackSource?”string
filters.feedbackType?
Section titled “filters.feedbackType?”string | string[]
filters.feedbackUserId?
Section titled “filters.feedbackUserId?”string
filters.organizationId?
Section titled “filters.organizationId?”string
filters.parentEntityName?
Section titled “filters.parentEntityName?”string
filters.parentEntityType?
Section titled “filters.parentEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.parentEntityVersionId?
Section titled “filters.parentEntityVersionId?”string
filters.requestId?
Section titled “filters.requestId?”string
filters.resourceId?
Section titled “filters.resourceId?”string
filters.rootEntityName?
Section titled “filters.rootEntityName?”string
filters.rootEntityType?
Section titled “filters.rootEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.rootEntityVersionId?
Section titled “filters.rootEntityVersionId?”string
filters.runId?
Section titled “filters.runId?”string
filters.serviceName?
Section titled “filters.serviceName?”string
filters.sessionId?
Section titled “filters.sessionId?”string
filters.source?
Section titled “filters.source?”string
filters.spanId?
Section titled “filters.spanId?”string
filters.tags?
Section titled “filters.tags?”string[]
filters.threadId?
Section titled “filters.threadId?”string
filters.timestamp?
Section titled “filters.timestamp?”{ end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }
filters.timestamp.end?
Section titled “filters.timestamp.end?”Date
filters.timestamp.endExclusive?
Section titled “filters.timestamp.endExclusive?”boolean
filters.timestamp.start?
Section titled “filters.timestamp.start?”Date
filters.timestamp.startExclusive?
Section titled “filters.timestamp.startExclusive?”boolean
filters.traceId?
Section titled “filters.traceId?”string
filters.userId?
Section titled “filters.userId?”string
groupBy
Section titled “groupBy”string[]
Returns
Section titled “Returns”Promise<{ groups: object[]; }>
Inherited from
Section titled “Inherited from”MastraClient.getFeedbackBreakdown
getFeedbackPercentiles()
Section titled “getFeedbackPercentiles()”getFeedbackPercentiles(
params):Promise<{series:object[]; }>
Returns percentile values for feedback bucketed by time interval.
Parameters
Section titled “Parameters”params
Section titled “params”feedbackSource?
Section titled “feedbackSource?”string
feedbackType
Section titled “feedbackType”string
filters?
Section titled “filters?”{ entityName?: string; entityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; entityVersionId?: string; environment?: string; executionSource?: string; experimentId?: string; feedbackSource?: string; feedbackType?: string | string[]; feedbackUserId?: string; organizationId?: string; parentEntityName?: string; parentEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; parentEntityVersionId?: string; requestId?: string; resourceId?: string; rootEntityName?: string; rootEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; rootEntityVersionId?: string; runId?: string; serviceName?: string; sessionId?: string; source?: string; spanId?: string; tags?: string[]; threadId?: string; timestamp?: { end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }; traceId?: string; userId?: string; }
filters.entityName?
Section titled “filters.entityName?”string
filters.entityType?
Section titled “filters.entityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.entityVersionId?
Section titled “filters.entityVersionId?”string
filters.environment?
Section titled “filters.environment?”string
filters.executionSource?
Section titled “filters.executionSource?”string
filters.experimentId?
Section titled “filters.experimentId?”string
filters.feedbackSource?
Section titled “filters.feedbackSource?”string
filters.feedbackType?
Section titled “filters.feedbackType?”string | string[]
filters.feedbackUserId?
Section titled “filters.feedbackUserId?”string
filters.organizationId?
Section titled “filters.organizationId?”string
filters.parentEntityName?
Section titled “filters.parentEntityName?”string
filters.parentEntityType?
Section titled “filters.parentEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.parentEntityVersionId?
Section titled “filters.parentEntityVersionId?”string
filters.requestId?
Section titled “filters.requestId?”string
filters.resourceId?
Section titled “filters.resourceId?”string
filters.rootEntityName?
Section titled “filters.rootEntityName?”string
filters.rootEntityType?
Section titled “filters.rootEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.rootEntityVersionId?
Section titled “filters.rootEntityVersionId?”string
filters.runId?
Section titled “filters.runId?”string
filters.serviceName?
Section titled “filters.serviceName?”string
filters.sessionId?
Section titled “filters.sessionId?”string
filters.source?
Section titled “filters.source?”string
filters.spanId?
Section titled “filters.spanId?”string
filters.tags?
Section titled “filters.tags?”string[]
filters.threadId?
Section titled “filters.threadId?”string
filters.timestamp?
Section titled “filters.timestamp?”{ end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }
filters.timestamp.end?
Section titled “filters.timestamp.end?”Date
filters.timestamp.endExclusive?
Section titled “filters.timestamp.endExclusive?”boolean
filters.timestamp.start?
Section titled “filters.timestamp.start?”Date
filters.timestamp.startExclusive?
Section titled “filters.timestamp.startExclusive?”boolean
filters.traceId?
Section titled “filters.traceId?”string
filters.userId?
Section titled “filters.userId?”string
interval
Section titled “interval”"1m" | "5m" | "15m" | "1h" | "1d"
percentiles
Section titled “percentiles”number[]
Returns
Section titled “Returns”Promise<{ series: object[]; }>
Inherited from
Section titled “Inherited from”MastraClient.getFeedbackPercentiles
getFeedbackTimeSeries()
Section titled “getFeedbackTimeSeries()”getFeedbackTimeSeries(
params):Promise<{series:object[]; }>
Returns feedback values bucketed by time interval with optional grouping.
Parameters
Section titled “Parameters”params
Section titled “params”aggregation
Section titled “aggregation”"min" | "max" | "sum" | "avg" | "count" | "count_distinct" | "last"
feedbackSource?
Section titled “feedbackSource?”string
feedbackType
Section titled “feedbackType”string
filters?
Section titled “filters?”{ entityName?: string; entityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; entityVersionId?: string; environment?: string; executionSource?: string; experimentId?: string; feedbackSource?: string; feedbackType?: string | string[]; feedbackUserId?: string; organizationId?: string; parentEntityName?: string; parentEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; parentEntityVersionId?: string; requestId?: string; resourceId?: string; rootEntityName?: string; rootEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; rootEntityVersionId?: string; runId?: string; serviceName?: string; sessionId?: string; source?: string; spanId?: string; tags?: string[]; threadId?: string; timestamp?: { end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }; traceId?: string; userId?: string; }
filters.entityName?
Section titled “filters.entityName?”string
filters.entityType?
Section titled “filters.entityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.entityVersionId?
Section titled “filters.entityVersionId?”string
filters.environment?
Section titled “filters.environment?”string
filters.executionSource?
Section titled “filters.executionSource?”string
filters.experimentId?
Section titled “filters.experimentId?”string
filters.feedbackSource?
Section titled “filters.feedbackSource?”string
filters.feedbackType?
Section titled “filters.feedbackType?”string | string[]
filters.feedbackUserId?
Section titled “filters.feedbackUserId?”string
filters.organizationId?
Section titled “filters.organizationId?”string
filters.parentEntityName?
Section titled “filters.parentEntityName?”string
filters.parentEntityType?
Section titled “filters.parentEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.parentEntityVersionId?
Section titled “filters.parentEntityVersionId?”string
filters.requestId?
Section titled “filters.requestId?”string
filters.resourceId?
Section titled “filters.resourceId?”string
filters.rootEntityName?
Section titled “filters.rootEntityName?”string
filters.rootEntityType?
Section titled “filters.rootEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.rootEntityVersionId?
Section titled “filters.rootEntityVersionId?”string
filters.runId?
Section titled “filters.runId?”string
filters.serviceName?
Section titled “filters.serviceName?”string
filters.sessionId?
Section titled “filters.sessionId?”string
filters.source?
Section titled “filters.source?”string
filters.spanId?
Section titled “filters.spanId?”string
filters.tags?
Section titled “filters.tags?”string[]
filters.threadId?
Section titled “filters.threadId?”string
filters.timestamp?
Section titled “filters.timestamp?”{ end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }
filters.timestamp.end?
Section titled “filters.timestamp.end?”Date
filters.timestamp.endExclusive?
Section titled “filters.timestamp.endExclusive?”boolean
filters.timestamp.start?
Section titled “filters.timestamp.start?”Date
filters.timestamp.startExclusive?
Section titled “filters.timestamp.startExclusive?”boolean
filters.traceId?
Section titled “filters.traceId?”string
filters.userId?
Section titled “filters.userId?”string
groupBy?
Section titled “groupBy?”string[]
interval
Section titled “interval”"1m" | "5m" | "15m" | "1h" | "1d"
Returns
Section titled “Returns”Promise<{ series: object[]; }>
Inherited from
Section titled “Inherited from”MastraClient.getFeedbackTimeSeries
getInfrastructureStatus()
Section titled “getInfrastructureStatus()”getInfrastructureStatus():
Promise<InfrastructureStatusResponse>
Retrieves Agent Builder infrastructure configuration and resolution status.
Requires infrastructure:read permission.
Returns
Section titled “Returns”Promise<InfrastructureStatusResponse>
Promise containing infrastructure status
Inherited from
Section titled “Inherited from”MastraClient.getInfrastructureStatus
getItemHistory()
Section titled “getItemHistory()”getItemHistory(
datasetId,itemId):Promise<{history:DatasetItemVersionResponse[]; }>
Lists versions for a dataset item
Parameters
Section titled “Parameters”datasetId
Section titled “datasetId”string
itemId
Section titled “itemId”string
Returns
Section titled “Returns”Promise<{ history: DatasetItemVersionResponse[]; }>
Inherited from
Section titled “Inherited from”MastraClient.getItemHistory
getLogForRun()
Section titled “getLogForRun()”getLogForRun(
params):Promise<{hasMore:boolean;logs:object[];page:number;perPage:number|false;total:number; }>
Gets logs for a specific run
Parameters
Section titled “Parameters”params
Section titled “params”GetLogParams
Parameters containing run ID to retrieve
Returns
Section titled “Returns”Promise<{ hasMore: boolean; logs: object[]; page: number; perPage: number | false; total: number; }>
Promise containing array of log messages
Inherited from
Section titled “Inherited from”MastraClient.getLogForRun
getMcpServerDetails()
Section titled “getMcpServerDetails()”getMcpServerDetails(
serverId,params?):Promise<ServerDetailInfo>
Retrieves detailed information for a specific MCP server.
Parameters
Section titled “Parameters”serverId
Section titled “serverId”string
The ID of the MCP server to retrieve.
params?
Section titled “params?”Optional parameters, e.g., specific version.
version?
Section titled “version?”string
Returns
Section titled “Returns”Promise<ServerDetailInfo>
Promise containing the detailed MCP server information.
Inherited from
Section titled “Inherited from”MastraClient.getMcpServerDetails
getMcpServerResources()
Section titled “getMcpServerResources()”getMcpServerResources(
serverId):Promise<{resources:object[]; }>
Lists resources available on an MCP server.
Parameters
Section titled “Parameters”serverId
Section titled “serverId”string
The ID of the MCP server.
Returns
Section titled “Returns”Promise<{ resources: object[]; }>
Promise containing the list of resources.
Inherited from
Section titled “Inherited from”MastraClient.getMcpServerResources
getMcpServers()
Section titled “getMcpServers()”getMcpServers(
params?):Promise<McpServerListResponse>
Retrieves a list of available MCP servers.
Parameters
Section titled “Parameters”params?
Section titled “params?”Optional parameters for pagination (page, perPage, or deprecated offset, limit).
limit?
Section titled “limit?”number
Deprecated
Use perPage instead
offset?
Section titled “offset?”number
Deprecated
Use page instead
number
perPage?
Section titled “perPage?”number
Returns
Section titled “Returns”Promise<McpServerListResponse>
Promise containing the list of MCP servers and pagination info.
Inherited from
Section titled “Inherited from”MastraClient.getMcpServers
getMcpServerTool()
Section titled “getMcpServerTool()”getMcpServerTool(
serverId,toolId):MCPTool
Gets an MCPTool resource instance for a specific tool on an MCP server. This instance can then be used to fetch details or execute the tool.
Parameters
Section titled “Parameters”serverId
Section titled “serverId”string
The ID of the MCP server.
toolId
Section titled “toolId”string
The ID of the tool.
Returns
Section titled “Returns”MCPTool
MCPTool instance.
Inherited from
Section titled “Inherited from”MastraClient.getMcpServerTool
getMcpServerTools()
Section titled “getMcpServerTools()”getMcpServerTools(
serverId):Promise<McpServerToolListResponse>
Retrieves a list of tools for a specific MCP server.
Parameters
Section titled “Parameters”serverId
Section titled “serverId”string
The ID of the MCP server.
Returns
Section titled “Returns”Promise<McpServerToolListResponse>
Promise containing the list of tools.
Inherited from
Section titled “Inherited from”MastraClient.getMcpServerTools
getMemoryConfig()
Section titled “getMemoryConfig()”getMemoryConfig(
params):Promise<{config: {lastMessages?:number|false;observationalMemory?: {enabled:boolean;messageTokens?:number| {max:number;min:number; };observationModel?:string;observationModelRouting?:object[];observationTokens?:number| {max:number;min:number; };reflectionModel?:string;reflectionModelRouting?:object[];scope?:"thread"|"resource";shareTokenBudget?:boolean; };semanticRecall?:any;workingMemory?:any; } |null;memoryType?:"local"|"gateway"; }>
Retrieves memory config for a resource
Parameters
Section titled “Parameters”params
Section titled “params”GetMemoryConfigParams
Parameters containing the resource ID and optional request context
Returns
Section titled “Returns”Promise<{ config: { lastMessages?: number | false; observationalMemory?: { enabled: boolean; messageTokens?: number | { max: number; min: number; }; observationModel?: string; observationModelRouting?: object[]; observationTokens?: number | { max: number; min: number; }; reflectionModel?: string; reflectionModelRouting?: object[]; scope?: "thread" | "resource"; shareTokenBudget?: boolean; }; semanticRecall?: any; workingMemory?: any; } | null; memoryType?: "local" | "gateway"; }>
Promise containing memory configuration
Inherited from
Section titled “Inherited from”MastraClient.getMemoryConfig
getMemoryStatus()
Section titled “getMemoryStatus()”getMemoryStatus(
agentId,requestContext?,opts?):Promise<{memoryType?:"local"|"gateway";observationalMemory?: {enabled:boolean;hasRecord?:boolean;isObserving?:boolean;isReflecting?:boolean;lastObservedAt?:string;observationTokenCount?:number;originType?:string;tokenCount?:number; };result:boolean; }>
Gets the status of the memory system
Parameters
Section titled “Parameters”agentId
Section titled “agentId”string
The agent ID
requestContext?
Section titled “requestContext?”RequestContext<unknown> | Record<string, any>
Optional parameters including resourceId, threadId, and requestContext
resourceId?
Section titled “resourceId?”string
threadId?
Section titled “threadId?”string
Returns
Section titled “Returns”Promise<{ memoryType?: "local" | "gateway"; observationalMemory?: { enabled: boolean; hasRecord?: boolean; isObserving?: boolean; isReflecting?: boolean; lastObservedAt?: string; observationTokenCount?: number; originType?: string; tokenCount?: number; }; result: boolean; }>
Promise containing memory system status including observational memory info
Inherited from
Section titled “Inherited from”MastraClient.getMemoryStatus
getMemoryThread()
Section titled “getMemoryThread()”getMemoryThread(
threadId):MemoryThread
Gets a memory thread instance by ID
Parameters
Section titled “Parameters”threadId
Section titled “threadId”ID of the memory thread to retrieve
agentId?
Section titled “agentId?”string
threadId
Section titled “threadId”string
Returns
Section titled “Returns”MemoryThread
MemoryThread instance
Inherited from
Section titled “Inherited from”MastraClient.getMemoryThread
getMetricAggregate()
Section titled “getMetricAggregate()”getMetricAggregate(
params):Promise<{changePercent?:number|null;costChangePercent?:number|null;costUnit?:string|null;estimatedCost?:number|null;previousEstimatedCost?:number|null;previousValue?:number|null;value:number|null; }>
Returns an aggregated metric value with optional period-over-period comparison.
Parameters
Section titled “Parameters”params
Section titled “params”aggregation
Section titled “aggregation”"min" | "max" | "sum" | "avg" | "count" | "count_distinct" | "last"
comparePeriod?
Section titled “comparePeriod?”"previous_period" | "previous_day" | "previous_week"
distinctColumn?
Section titled “distinctColumn?”"model" | "name" | "threadId" | "resourceId" | "entityType" | "entityName" | "parentEntityType" | "parentEntityName" | "rootEntityType" | "rootEntityName" | "environment" | "serviceName" | "executionSource" | "provider"
filters?
Section titled “filters?”{ costUnit?: string; entityName?: string; entityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; entityVersionId?: string; environment?: string; executionSource?: string; experimentId?: string; labels?: Record<string, string>; model?: string; name?: string[]; organizationId?: string; parentEntityName?: string; parentEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; parentEntityVersionId?: string; provider?: string; requestId?: string; resourceId?: string; rootEntityName?: string; rootEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; rootEntityVersionId?: string; runId?: string; serviceName?: string; sessionId?: string; source?: string; spanId?: string; tags?: string[]; threadId?: string; timestamp?: { end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }; traceId?: string; userId?: string; }
filters.costUnit?
Section titled “filters.costUnit?”string
filters.entityName?
Section titled “filters.entityName?”string
filters.entityType?
Section titled “filters.entityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.entityVersionId?
Section titled “filters.entityVersionId?”string
filters.environment?
Section titled “filters.environment?”string
filters.executionSource?
Section titled “filters.executionSource?”string
filters.experimentId?
Section titled “filters.experimentId?”string
filters.labels?
Section titled “filters.labels?”Record<string, string>
filters.model?
Section titled “filters.model?”string
filters.name?
Section titled “filters.name?”string[]
filters.organizationId?
Section titled “filters.organizationId?”string
filters.parentEntityName?
Section titled “filters.parentEntityName?”string
filters.parentEntityType?
Section titled “filters.parentEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.parentEntityVersionId?
Section titled “filters.parentEntityVersionId?”string
filters.provider?
Section titled “filters.provider?”string
filters.requestId?
Section titled “filters.requestId?”string
filters.resourceId?
Section titled “filters.resourceId?”string
filters.rootEntityName?
Section titled “filters.rootEntityName?”string
filters.rootEntityType?
Section titled “filters.rootEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.rootEntityVersionId?
Section titled “filters.rootEntityVersionId?”string
filters.runId?
Section titled “filters.runId?”string
filters.serviceName?
Section titled “filters.serviceName?”string
filters.sessionId?
Section titled “filters.sessionId?”string
filters.source?
Section titled “filters.source?”string
filters.spanId?
Section titled “filters.spanId?”string
filters.tags?
Section titled “filters.tags?”string[]
filters.threadId?
Section titled “filters.threadId?”string
filters.timestamp?
Section titled “filters.timestamp?”{ end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }
filters.timestamp.end?
Section titled “filters.timestamp.end?”Date
filters.timestamp.endExclusive?
Section titled “filters.timestamp.endExclusive?”boolean
filters.timestamp.start?
Section titled “filters.timestamp.start?”Date
filters.timestamp.startExclusive?
Section titled “filters.timestamp.startExclusive?”boolean
filters.traceId?
Section titled “filters.traceId?”string
filters.userId?
Section titled “filters.userId?”string
string[]
Returns
Section titled “Returns”Promise<{ changePercent?: number | null; costChangePercent?: number | null; costUnit?: string | null; estimatedCost?: number | null; previousEstimatedCost?: number | null; previousValue?: number | null; value: number | null; }>
Inherited from
Section titled “Inherited from”MastraClient.getMetricAggregate
getMetricBreakdown()
Section titled “getMetricBreakdown()”getMetricBreakdown(
params):Promise<{groups:object[]; }>
Returns metric values grouped by specified dimensions.
Parameters
Section titled “Parameters”params
Section titled “params”aggregation
Section titled “aggregation”"min" | "max" | "sum" | "avg" | "count" | "count_distinct" | "last"
distinctColumn?
Section titled “distinctColumn?”"model" | "name" | "threadId" | "resourceId" | "entityType" | "entityName" | "parentEntityType" | "parentEntityName" | "rootEntityType" | "rootEntityName" | "environment" | "serviceName" | "executionSource" | "provider"
filters?
Section titled “filters?”{ costUnit?: string; entityName?: string; entityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; entityVersionId?: string; environment?: string; executionSource?: string; experimentId?: string; labels?: Record<string, string>; model?: string; name?: string[]; organizationId?: string; parentEntityName?: string; parentEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; parentEntityVersionId?: string; provider?: string; requestId?: string; resourceId?: string; rootEntityName?: string; rootEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; rootEntityVersionId?: string; runId?: string; serviceName?: string; sessionId?: string; source?: string; spanId?: string; tags?: string[]; threadId?: string; timestamp?: { end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }; traceId?: string; userId?: string; }
filters.costUnit?
Section titled “filters.costUnit?”string
filters.entityName?
Section titled “filters.entityName?”string
filters.entityType?
Section titled “filters.entityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.entityVersionId?
Section titled “filters.entityVersionId?”string
filters.environment?
Section titled “filters.environment?”string
filters.executionSource?
Section titled “filters.executionSource?”string
filters.experimentId?
Section titled “filters.experimentId?”string
filters.labels?
Section titled “filters.labels?”Record<string, string>
filters.model?
Section titled “filters.model?”string
filters.name?
Section titled “filters.name?”string[]
filters.organizationId?
Section titled “filters.organizationId?”string
filters.parentEntityName?
Section titled “filters.parentEntityName?”string
filters.parentEntityType?
Section titled “filters.parentEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.parentEntityVersionId?
Section titled “filters.parentEntityVersionId?”string
filters.provider?
Section titled “filters.provider?”string
filters.requestId?
Section titled “filters.requestId?”string
filters.resourceId?
Section titled “filters.resourceId?”string
filters.rootEntityName?
Section titled “filters.rootEntityName?”string
filters.rootEntityType?
Section titled “filters.rootEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.rootEntityVersionId?
Section titled “filters.rootEntityVersionId?”string
filters.runId?
Section titled “filters.runId?”string
filters.serviceName?
Section titled “filters.serviceName?”string
filters.sessionId?
Section titled “filters.sessionId?”string
filters.source?
Section titled “filters.source?”string
filters.spanId?
Section titled “filters.spanId?”string
filters.tags?
Section titled “filters.tags?”string[]
filters.threadId?
Section titled “filters.threadId?”string
filters.timestamp?
Section titled “filters.timestamp?”{ end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }
filters.timestamp.end?
Section titled “filters.timestamp.end?”Date
filters.timestamp.endExclusive?
Section titled “filters.timestamp.endExclusive?”boolean
filters.timestamp.start?
Section titled “filters.timestamp.start?”Date
filters.timestamp.startExclusive?
Section titled “filters.timestamp.startExclusive?”boolean
filters.traceId?
Section titled “filters.traceId?”string
filters.userId?
Section titled “filters.userId?”string
groupBy
Section titled “groupBy”string[]
limit?
Section titled “limit?”number
string[]
orderDirection?
Section titled “orderDirection?”"ASC" | "DESC"
Returns
Section titled “Returns”Promise<{ groups: object[]; }>
Inherited from
Section titled “Inherited from”MastraClient.getMetricBreakdown
getMetricLabelKeys()
Section titled “getMetricLabelKeys()”getMetricLabelKeys(
params):Promise<{keys:string[]; }>
Returns distinct label keys for a given metric.
Parameters
Section titled “Parameters”params
Section titled “params”metricName
Section titled “metricName”string
Returns
Section titled “Returns”Promise<{ keys: string[]; }>
Inherited from
Section titled “Inherited from”MastraClient.getMetricLabelKeys
getMetricLabelValues()
Section titled “getMetricLabelValues()”getMetricLabelValues(
params):Promise<{values:string[]; }>
Returns distinct values for a given metric label key.
Parameters
Section titled “Parameters”params
Section titled “params”labelKey
Section titled “labelKey”string
limit?
Section titled “limit?”number
metricName
Section titled “metricName”string
prefix?
Section titled “prefix?”string
Returns
Section titled “Returns”Promise<{ values: string[]; }>
Inherited from
Section titled “Inherited from”MastraClient.getMetricLabelValues
getMetricNames()
Section titled “getMetricNames()”getMetricNames(
params?):Promise<{names:string[]; }>
Returns distinct metric names with optional prefix filtering.
Parameters
Section titled “Parameters”params?
Section titled “params?”limit?
Section titled “limit?”number
prefix?
Section titled “prefix?”string
Returns
Section titled “Returns”Promise<{ names: string[]; }>
Inherited from
Section titled “Inherited from”MastraClient.getMetricNames
getMetricPercentiles()
Section titled “getMetricPercentiles()”getMetricPercentiles(
params):Promise<{series:object[]; }>
Returns percentile values for a metric bucketed by time interval.
Parameters
Section titled “Parameters”params
Section titled “params”filters?
Section titled “filters?”{ costUnit?: string; entityName?: string; entityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; entityVersionId?: string; environment?: string; executionSource?: string; experimentId?: string; labels?: Record<string, string>; model?: string; name?: string[]; organizationId?: string; parentEntityName?: string; parentEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; parentEntityVersionId?: string; provider?: string; requestId?: string; resourceId?: string; rootEntityName?: string; rootEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; rootEntityVersionId?: string; runId?: string; serviceName?: string; sessionId?: string; source?: string; spanId?: string; tags?: string[]; threadId?: string; timestamp?: { end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }; traceId?: string; userId?: string; }
filters.costUnit?
Section titled “filters.costUnit?”string
filters.entityName?
Section titled “filters.entityName?”string
filters.entityType?
Section titled “filters.entityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.entityVersionId?
Section titled “filters.entityVersionId?”string
filters.environment?
Section titled “filters.environment?”string
filters.executionSource?
Section titled “filters.executionSource?”string
filters.experimentId?
Section titled “filters.experimentId?”string
filters.labels?
Section titled “filters.labels?”Record<string, string>
filters.model?
Section titled “filters.model?”string
filters.name?
Section titled “filters.name?”string[]
filters.organizationId?
Section titled “filters.organizationId?”string
filters.parentEntityName?
Section titled “filters.parentEntityName?”string
filters.parentEntityType?
Section titled “filters.parentEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.parentEntityVersionId?
Section titled “filters.parentEntityVersionId?”string
filters.provider?
Section titled “filters.provider?”string
filters.requestId?
Section titled “filters.requestId?”string
filters.resourceId?
Section titled “filters.resourceId?”string
filters.rootEntityName?
Section titled “filters.rootEntityName?”string
filters.rootEntityType?
Section titled “filters.rootEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.rootEntityVersionId?
Section titled “filters.rootEntityVersionId?”string
filters.runId?
Section titled “filters.runId?”string
filters.serviceName?
Section titled “filters.serviceName?”string
filters.sessionId?
Section titled “filters.sessionId?”string
filters.source?
Section titled “filters.source?”string
filters.spanId?
Section titled “filters.spanId?”string
filters.tags?
Section titled “filters.tags?”string[]
filters.threadId?
Section titled “filters.threadId?”string
filters.timestamp?
Section titled “filters.timestamp?”{ end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }
filters.timestamp.end?
Section titled “filters.timestamp.end?”Date
filters.timestamp.endExclusive?
Section titled “filters.timestamp.endExclusive?”boolean
filters.timestamp.start?
Section titled “filters.timestamp.start?”Date
filters.timestamp.startExclusive?
Section titled “filters.timestamp.startExclusive?”boolean
filters.traceId?
Section titled “filters.traceId?”string
filters.userId?
Section titled “filters.userId?”string
interval
Section titled “interval”"1m" | "5m" | "15m" | "1h" | "1d"
string
percentiles
Section titled “percentiles”number[]
Returns
Section titled “Returns”Promise<{ series: object[]; }>
Inherited from
Section titled “Inherited from”MastraClient.getMetricPercentiles
getMetricTimeSeries()
Section titled “getMetricTimeSeries()”getMetricTimeSeries(
params):Promise<{series:object[]; }>
Returns metric values bucketed by time interval with optional grouping.
Parameters
Section titled “Parameters”params
Section titled “params”aggregation
Section titled “aggregation”"min" | "max" | "sum" | "avg" | "count" | "count_distinct" | "last"
distinctColumn?
Section titled “distinctColumn?”"model" | "name" | "threadId" | "resourceId" | "entityType" | "entityName" | "parentEntityType" | "parentEntityName" | "rootEntityType" | "rootEntityName" | "environment" | "serviceName" | "executionSource" | "provider"
filters?
Section titled “filters?”{ costUnit?: string; entityName?: string; entityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; entityVersionId?: string; environment?: string; executionSource?: string; experimentId?: string; labels?: Record<string, string>; model?: string; name?: string[]; organizationId?: string; parentEntityName?: string; parentEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; parentEntityVersionId?: string; provider?: string; requestId?: string; resourceId?: string; rootEntityName?: string; rootEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; rootEntityVersionId?: string; runId?: string; serviceName?: string; sessionId?: string; source?: string; spanId?: string; tags?: string[]; threadId?: string; timestamp?: { end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }; traceId?: string; userId?: string; }
filters.costUnit?
Section titled “filters.costUnit?”string
filters.entityName?
Section titled “filters.entityName?”string
filters.entityType?
Section titled “filters.entityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.entityVersionId?
Section titled “filters.entityVersionId?”string
filters.environment?
Section titled “filters.environment?”string
filters.executionSource?
Section titled “filters.executionSource?”string
filters.experimentId?
Section titled “filters.experimentId?”string
filters.labels?
Section titled “filters.labels?”Record<string, string>
filters.model?
Section titled “filters.model?”string
filters.name?
Section titled “filters.name?”string[]
filters.organizationId?
Section titled “filters.organizationId?”string
filters.parentEntityName?
Section titled “filters.parentEntityName?”string
filters.parentEntityType?
Section titled “filters.parentEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.parentEntityVersionId?
Section titled “filters.parentEntityVersionId?”string
filters.provider?
Section titled “filters.provider?”string
filters.requestId?
Section titled “filters.requestId?”string
filters.resourceId?
Section titled “filters.resourceId?”string
filters.rootEntityName?
Section titled “filters.rootEntityName?”string
filters.rootEntityType?
Section titled “filters.rootEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.rootEntityVersionId?
Section titled “filters.rootEntityVersionId?”string
filters.runId?
Section titled “filters.runId?”string
filters.serviceName?
Section titled “filters.serviceName?”string
filters.sessionId?
Section titled “filters.sessionId?”string
filters.source?
Section titled “filters.source?”string
filters.spanId?
Section titled “filters.spanId?”string
filters.tags?
Section titled “filters.tags?”string[]
filters.threadId?
Section titled “filters.threadId?”string
filters.timestamp?
Section titled “filters.timestamp?”{ end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }
filters.timestamp.end?
Section titled “filters.timestamp.end?”Date
filters.timestamp.endExclusive?
Section titled “filters.timestamp.endExclusive?”boolean
filters.timestamp.start?
Section titled “filters.timestamp.start?”Date
filters.timestamp.startExclusive?
Section titled “filters.timestamp.startExclusive?”boolean
filters.traceId?
Section titled “filters.traceId?”string
filters.userId?
Section titled “filters.userId?”string
groupBy?
Section titled “groupBy?”string[]
interval
Section titled “interval”"1m" | "5m" | "15m" | "1h" | "1d"
string[]
Returns
Section titled “Returns”Promise<{ series: object[]; }>
Inherited from
Section titled “Inherited from”MastraClient.getMetricTimeSeries
getObservationalMemory()
Section titled “getObservationalMemory()”getObservationalMemory(
params):Promise<{history?:object[];record: {activeObservations:string;bufferedObservations?:string;bufferedReflection?:string;config: {[key:string]:unknown; };createdAt:string;generationCount:number;id:string;isObserving:boolean;isReflecting:boolean;lastObservedAt?:string;metadata?: {[key:string]:unknown; };observationTokenCount:number;originType:"initial"|"observation"|"reflection";pendingMessageTokens:number;resourceId:string;scope:"thread"|"resource";threadId:string|null;totalTokensObserved:number;updatedAt:string; } |null; }>
Gets observational memory data for a resource or thread
Parameters
Section titled “Parameters”params
Section titled “params”GetObservationalMemoryParams
Parameters containing agentId, resourceId, threadId, and optional request context
Returns
Section titled “Returns”Promise<{ history?: object[]; record: { activeObservations: string; bufferedObservations?: string; bufferedReflection?: string; config: {[key: string]: unknown; }; createdAt: string; generationCount: number; id: string; isObserving: boolean; isReflecting: boolean; lastObservedAt?: string; metadata?: {[key: string]: unknown; }; observationTokenCount: number; originType: "initial" | "observation" | "reflection"; pendingMessageTokens: number; resourceId: string; scope: "thread" | "resource"; threadId: string | null; totalTokensObserved: number; updatedAt: string; } | null; }>
Promise containing the current OM record and history
Inherited from
Section titled “Inherited from”MastraClient.getObservationalMemory
getPermissionPatterns()
Section titled “getPermissionPatterns()”getPermissionPatterns():
Promise<{patterns:string[]; }>
Retrieves the authoritative list of valid permission-pattern strings. Used by Studio to validate route→permission literals and gate the sidebar.
Returns
Section titled “Returns”Promise<{ patterns: string[]; }>
Promise containing the permission patterns
Inherited from
Section titled “Inherited from”MastraClient.getPermissionPatterns
getProcessor()
Section titled “getProcessor()”getProcessor(
processorId):Processor
Gets a processor instance by ID
Parameters
Section titled “Parameters”processorId
Section titled “processorId”string
ID of the processor to retrieve
Returns
Section titled “Returns”Processor
Processor instance
Inherited from
Section titled “Inherited from”MastraClient.getProcessor
getProcessorProvider()
Section titled “getProcessorProvider()”getProcessorProvider(
providerId):ProcessorProvider
Gets a processor provider instance by ID for further operations
Parameters
Section titled “Parameters”providerId
Section titled “providerId”string
ID of the processor provider
Returns
Section titled “Returns”ProcessorProvider
ProcessorProvider instance
Inherited from
Section titled “Inherited from”MastraClient.getProcessorProvider
getProcessorProviders()
Section titled “getProcessorProviders()”getProcessorProviders():
Promise<GetProcessorProvidersResponse>
Lists all registered processor providers
Returns
Section titled “Returns”Promise<GetProcessorProvidersResponse>
Promise containing list of processor provider info
Inherited from
Section titled “Inherited from”MastraClient.getProcessorProviders
getSchedule()
Section titled “getSchedule()”getSchedule(
scheduleId):Promise<ScheduleResponse>
Gets a single schedule by ID.
Parameters
Section titled “Parameters”scheduleId
Section titled “scheduleId”string
Returns
Section titled “Returns”Promise<ScheduleResponse>
Inherited from
Section titled “Inherited from”MastraClient.getSchedule
getScoreAggregate()
Section titled “getScoreAggregate()”getScoreAggregate(
params):Promise<{changePercent?:number|null;previousValue?:number|null;value:number|null; }>
Returns an aggregated score value with optional period-over-period comparison.
Parameters
Section titled “Parameters”params
Section titled “params”aggregation
Section titled “aggregation”"min" | "max" | "sum" | "avg" | "count" | "count_distinct" | "last"
comparePeriod?
Section titled “comparePeriod?”"previous_period" | "previous_day" | "previous_week"
filters?
Section titled “filters?”{ entityName?: string; entityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; entityVersionId?: string; environment?: string; executionSource?: string; experimentId?: string; organizationId?: string; parentEntityName?: string; parentEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; parentEntityVersionId?: string; requestId?: string; resourceId?: string; rootEntityName?: string; rootEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; rootEntityVersionId?: string; runId?: string; scorerId?: string | string[]; scoreSource?: string; serviceName?: string; sessionId?: string; source?: string; spanId?: string; tags?: string[]; threadId?: string; timestamp?: { end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }; traceId?: string; userId?: string; }
filters.entityName?
Section titled “filters.entityName?”string
filters.entityType?
Section titled “filters.entityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.entityVersionId?
Section titled “filters.entityVersionId?”string
filters.environment?
Section titled “filters.environment?”string
filters.executionSource?
Section titled “filters.executionSource?”string
filters.experimentId?
Section titled “filters.experimentId?”string
filters.organizationId?
Section titled “filters.organizationId?”string
filters.parentEntityName?
Section titled “filters.parentEntityName?”string
filters.parentEntityType?
Section titled “filters.parentEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.parentEntityVersionId?
Section titled “filters.parentEntityVersionId?”string
filters.requestId?
Section titled “filters.requestId?”string
filters.resourceId?
Section titled “filters.resourceId?”string
filters.rootEntityName?
Section titled “filters.rootEntityName?”string
filters.rootEntityType?
Section titled “filters.rootEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.rootEntityVersionId?
Section titled “filters.rootEntityVersionId?”string
filters.runId?
Section titled “filters.runId?”string
filters.scorerId?
Section titled “filters.scorerId?”string | string[]
filters.scoreSource?
Section titled “filters.scoreSource?”string
filters.serviceName?
Section titled “filters.serviceName?”string
filters.sessionId?
Section titled “filters.sessionId?”string
filters.source?
Section titled “filters.source?”string
filters.spanId?
Section titled “filters.spanId?”string
filters.tags?
Section titled “filters.tags?”string[]
filters.threadId?
Section titled “filters.threadId?”string
filters.timestamp?
Section titled “filters.timestamp?”{ end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }
filters.timestamp.end?
Section titled “filters.timestamp.end?”Date
filters.timestamp.endExclusive?
Section titled “filters.timestamp.endExclusive?”boolean
filters.timestamp.start?
Section titled “filters.timestamp.start?”Date
filters.timestamp.startExclusive?
Section titled “filters.timestamp.startExclusive?”boolean
filters.traceId?
Section titled “filters.traceId?”string
filters.userId?
Section titled “filters.userId?”string
scorerId
Section titled “scorerId”string
scoreSource?
Section titled “scoreSource?”string
Returns
Section titled “Returns”Promise<{ changePercent?: number | null; previousValue?: number | null; value: number | null; }>
Inherited from
Section titled “Inherited from”MastraClient.getScoreAggregate
getScoreBreakdown()
Section titled “getScoreBreakdown()”getScoreBreakdown(
params):Promise<{groups:object[]; }>
Returns score values grouped by specified dimensions.
Parameters
Section titled “Parameters”params
Section titled “params”aggregation
Section titled “aggregation”"min" | "max" | "sum" | "avg" | "count" | "count_distinct" | "last"
filters?
Section titled “filters?”{ entityName?: string; entityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; entityVersionId?: string; environment?: string; executionSource?: string; experimentId?: string; organizationId?: string; parentEntityName?: string; parentEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; parentEntityVersionId?: string; requestId?: string; resourceId?: string; rootEntityName?: string; rootEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; rootEntityVersionId?: string; runId?: string; scorerId?: string | string[]; scoreSource?: string; serviceName?: string; sessionId?: string; source?: string; spanId?: string; tags?: string[]; threadId?: string; timestamp?: { end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }; traceId?: string; userId?: string; }
filters.entityName?
Section titled “filters.entityName?”string
filters.entityType?
Section titled “filters.entityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.entityVersionId?
Section titled “filters.entityVersionId?”string
filters.environment?
Section titled “filters.environment?”string
filters.executionSource?
Section titled “filters.executionSource?”string
filters.experimentId?
Section titled “filters.experimentId?”string
filters.organizationId?
Section titled “filters.organizationId?”string
filters.parentEntityName?
Section titled “filters.parentEntityName?”string
filters.parentEntityType?
Section titled “filters.parentEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.parentEntityVersionId?
Section titled “filters.parentEntityVersionId?”string
filters.requestId?
Section titled “filters.requestId?”string
filters.resourceId?
Section titled “filters.resourceId?”string
filters.rootEntityName?
Section titled “filters.rootEntityName?”string
filters.rootEntityType?
Section titled “filters.rootEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.rootEntityVersionId?
Section titled “filters.rootEntityVersionId?”string
filters.runId?
Section titled “filters.runId?”string
filters.scorerId?
Section titled “filters.scorerId?”string | string[]
filters.scoreSource?
Section titled “filters.scoreSource?”string
filters.serviceName?
Section titled “filters.serviceName?”string
filters.sessionId?
Section titled “filters.sessionId?”string
filters.source?
Section titled “filters.source?”string
filters.spanId?
Section titled “filters.spanId?”string
filters.tags?
Section titled “filters.tags?”string[]
filters.threadId?
Section titled “filters.threadId?”string
filters.timestamp?
Section titled “filters.timestamp?”{ end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }
filters.timestamp.end?
Section titled “filters.timestamp.end?”Date
filters.timestamp.endExclusive?
Section titled “filters.timestamp.endExclusive?”boolean
filters.timestamp.start?
Section titled “filters.timestamp.start?”Date
filters.timestamp.startExclusive?
Section titled “filters.timestamp.startExclusive?”boolean
filters.traceId?
Section titled “filters.traceId?”string
filters.userId?
Section titled “filters.userId?”string
groupBy
Section titled “groupBy”string[]
scorerId
Section titled “scorerId”string
scoreSource?
Section titled “scoreSource?”string
Returns
Section titled “Returns”Promise<{ groups: object[]; }>
Inherited from
Section titled “Inherited from”MastraClient.getScoreBreakdown
getScorePercentiles()
Section titled “getScorePercentiles()”getScorePercentiles(
params):Promise<{series:object[]; }>
Returns percentile values for scores bucketed by time interval.
Parameters
Section titled “Parameters”params
Section titled “params”filters?
Section titled “filters?”{ entityName?: string; entityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; entityVersionId?: string; environment?: string; executionSource?: string; experimentId?: string; organizationId?: string; parentEntityName?: string; parentEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; parentEntityVersionId?: string; requestId?: string; resourceId?: string; rootEntityName?: string; rootEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; rootEntityVersionId?: string; runId?: string; scorerId?: string | string[]; scoreSource?: string; serviceName?: string; sessionId?: string; source?: string; spanId?: string; tags?: string[]; threadId?: string; timestamp?: { end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }; traceId?: string; userId?: string; }
filters.entityName?
Section titled “filters.entityName?”string
filters.entityType?
Section titled “filters.entityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.entityVersionId?
Section titled “filters.entityVersionId?”string
filters.environment?
Section titled “filters.environment?”string
filters.executionSource?
Section titled “filters.executionSource?”string
filters.experimentId?
Section titled “filters.experimentId?”string
filters.organizationId?
Section titled “filters.organizationId?”string
filters.parentEntityName?
Section titled “filters.parentEntityName?”string
filters.parentEntityType?
Section titled “filters.parentEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.parentEntityVersionId?
Section titled “filters.parentEntityVersionId?”string
filters.requestId?
Section titled “filters.requestId?”string
filters.resourceId?
Section titled “filters.resourceId?”string
filters.rootEntityName?
Section titled “filters.rootEntityName?”string
filters.rootEntityType?
Section titled “filters.rootEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.rootEntityVersionId?
Section titled “filters.rootEntityVersionId?”string
filters.runId?
Section titled “filters.runId?”string
filters.scorerId?
Section titled “filters.scorerId?”string | string[]
filters.scoreSource?
Section titled “filters.scoreSource?”string
filters.serviceName?
Section titled “filters.serviceName?”string
filters.sessionId?
Section titled “filters.sessionId?”string
filters.source?
Section titled “filters.source?”string
filters.spanId?
Section titled “filters.spanId?”string
filters.tags?
Section titled “filters.tags?”string[]
filters.threadId?
Section titled “filters.threadId?”string
filters.timestamp?
Section titled “filters.timestamp?”{ end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }
filters.timestamp.end?
Section titled “filters.timestamp.end?”Date
filters.timestamp.endExclusive?
Section titled “filters.timestamp.endExclusive?”boolean
filters.timestamp.start?
Section titled “filters.timestamp.start?”Date
filters.timestamp.startExclusive?
Section titled “filters.timestamp.startExclusive?”boolean
filters.traceId?
Section titled “filters.traceId?”string
filters.userId?
Section titled “filters.userId?”string
interval
Section titled “interval”"1m" | "5m" | "15m" | "1h" | "1d"
percentiles
Section titled “percentiles”number[]
scorerId
Section titled “scorerId”string
scoreSource?
Section titled “scoreSource?”string
Returns
Section titled “Returns”Promise<{ series: object[]; }>
Inherited from
Section titled “Inherited from”MastraClient.getScorePercentiles
getScorer()
Section titled “getScorer()”getScorer(
scorerId):Promise<GetScorerResponse>
Retrieves a scorer by ID
Parameters
Section titled “Parameters”scorerId
Section titled “scorerId”string
ID of the scorer to retrieve
Returns
Section titled “Returns”Promise<GetScorerResponse>
Promise containing the scorer
Inherited from
Section titled “Inherited from”MastraClient.getScorer
getScoreTimeSeries()
Section titled “getScoreTimeSeries()”getScoreTimeSeries(
params):Promise<{series:object[]; }>
Returns score values bucketed by time interval with optional grouping.
Parameters
Section titled “Parameters”params
Section titled “params”aggregation
Section titled “aggregation”"min" | "max" | "sum" | "avg" | "count" | "count_distinct" | "last"
filters?
Section titled “filters?”{ entityName?: string; entityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; entityVersionId?: string; environment?: string; executionSource?: string; experimentId?: string; organizationId?: string; parentEntityName?: string; parentEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; parentEntityVersionId?: string; requestId?: string; resourceId?: string; rootEntityName?: string; rootEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; rootEntityVersionId?: string; runId?: string; scorerId?: string | string[]; scoreSource?: string; serviceName?: string; sessionId?: string; source?: string; spanId?: string; tags?: string[]; threadId?: string; timestamp?: { end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }; traceId?: string; userId?: string; }
filters.entityName?
Section titled “filters.entityName?”string
filters.entityType?
Section titled “filters.entityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.entityVersionId?
Section titled “filters.entityVersionId?”string
filters.environment?
Section titled “filters.environment?”string
filters.executionSource?
Section titled “filters.executionSource?”string
filters.experimentId?
Section titled “filters.experimentId?”string
filters.organizationId?
Section titled “filters.organizationId?”string
filters.parentEntityName?
Section titled “filters.parentEntityName?”string
filters.parentEntityType?
Section titled “filters.parentEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.parentEntityVersionId?
Section titled “filters.parentEntityVersionId?”string
filters.requestId?
Section titled “filters.requestId?”string
filters.resourceId?
Section titled “filters.resourceId?”string
filters.rootEntityName?
Section titled “filters.rootEntityName?”string
filters.rootEntityType?
Section titled “filters.rootEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.rootEntityVersionId?
Section titled “filters.rootEntityVersionId?”string
filters.runId?
Section titled “filters.runId?”string
filters.scorerId?
Section titled “filters.scorerId?”string | string[]
filters.scoreSource?
Section titled “filters.scoreSource?”string
filters.serviceName?
Section titled “filters.serviceName?”string
filters.sessionId?
Section titled “filters.sessionId?”string
filters.source?
Section titled “filters.source?”string
filters.spanId?
Section titled “filters.spanId?”string
filters.tags?
Section titled “filters.tags?”string[]
filters.threadId?
Section titled “filters.threadId?”string
filters.timestamp?
Section titled “filters.timestamp?”{ end?: Date; endExclusive?: boolean; start?: Date; startExclusive?: boolean; }
filters.timestamp.end?
Section titled “filters.timestamp.end?”Date
filters.timestamp.endExclusive?
Section titled “filters.timestamp.endExclusive?”boolean
filters.timestamp.start?
Section titled “filters.timestamp.start?”Date
filters.timestamp.startExclusive?
Section titled “filters.timestamp.startExclusive?”boolean
filters.traceId?
Section titled “filters.traceId?”string
filters.userId?
Section titled “filters.userId?”string
groupBy?
Section titled “groupBy?”string[]
interval
Section titled “interval”"1m" | "5m" | "15m" | "1h" | "1d"
scorerId
Section titled “scorerId”string
scoreSource?
Section titled “scoreSource?”string
Returns
Section titled “Returns”Promise<{ series: object[]; }>
Inherited from
Section titled “Inherited from”MastraClient.getScoreTimeSeries
getServiceNames()
Section titled “getServiceNames()”getServiceNames():
Promise<{serviceNames:string[]; }>
Returns distinct service names from observability data.
Returns
Section titled “Returns”Promise<{ serviceNames: string[]; }>
Inherited from
Section titled “Inherited from”MastraClient.getServiceNames
getSpan()
Section titled “getSpan()”getSpan(
traceId,spanId):Promise<{span: {attributes?:Record<string,unknown> |null;createdAt:Date;endedAt?:Date|null;entityId?:string|null;entityName?:string|null;entityType?:AGENT|SCORER|RAG_INGESTION|TRAJECTORY|INPUT_PROCESSOR|INPUT_STEP_PROCESSOR|OUTPUT_PROCESSOR|OUTPUT_STEP_PROCESSOR|WORKFLOW_STEP|TOOL|WORKFLOW_RUN|MEMORY|null;entityVersionId?:string|null;environment?:string|null;error?:unknown;experimentId?:string|null;input?:unknown;isEvent:boolean;links?:unknown[] |null;metadata?:Record<string,unknown> |null;name:string;organizationId?:string|null;output?:unknown;parentEntityId?:string|null;parentEntityName?:string|null;parentEntityType?:AGENT|SCORER|RAG_INGESTION|TRAJECTORY|INPUT_PROCESSOR|INPUT_STEP_PROCESSOR|OUTPUT_PROCESSOR|OUTPUT_STEP_PROCESSOR|WORKFLOW_STEP|TOOL|WORKFLOW_RUN|MEMORY|null;parentEntityVersionId?:string|null;parentSpanId?:string|null;requestContext?:Record<string,unknown> |null;requestId?:string|null;resourceId?:string|null;rootEntityId?:string|null;rootEntityName?:string|null;rootEntityType?:AGENT|SCORER|RAG_INGESTION|TRAJECTORY|INPUT_PROCESSOR|INPUT_STEP_PROCESSOR|OUTPUT_PROCESSOR|OUTPUT_STEP_PROCESSOR|WORKFLOW_STEP|TOOL|WORKFLOW_RUN|MEMORY|null;rootEntityVersionId?:string|null;runId?:string|null;scope?:Record<string,unknown> |null;serviceName?:string|null;sessionId?:string|null;source?:string|null;spanId:string;spanType:SpanType;startedAt:Date;tags?:string[] |null;threadId?:string|null;traceId:string;updatedAt:Date|null;userId?:string|null; }; }>
Retrieves a single span with full details by trace ID and span ID.
Parameters
Section titled “Parameters”traceId
Section titled “traceId”string
spanId
Section titled “spanId”string
Returns
Section titled “Returns”Promise<{ span: { attributes?: Record<string, unknown> | null; createdAt: Date; endedAt?: Date | null; entityId?: string | null; entityName?: string | null; entityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null; entityVersionId?: string | null; environment?: string | null; error?: unknown; experimentId?: string | null; input?: unknown; isEvent: boolean; links?: unknown[] | null; metadata?: Record<string, unknown> | null; name: string; organizationId?: string | null; output?: unknown; parentEntityId?: string | null; parentEntityName?: string | null; parentEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null; parentEntityVersionId?: string | null; parentSpanId?: string | null; requestContext?: Record<string, unknown> | null; requestId?: string | null; resourceId?: string | null; rootEntityId?: string | null; rootEntityName?: string | null; rootEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null; rootEntityVersionId?: string | null; runId?: string | null; scope?: Record<string, unknown> | null; serviceName?: string | null; sessionId?: string | null; source?: string | null; spanId: string; spanType: SpanType; startedAt: Date; tags?: string[] | null; threadId?: string | null; traceId: string; updatedAt: Date | null; userId?: string | null; }; }>
Inherited from
Section titled “Inherited from”MastraClient.getSpan
getStoredAgent()
Section titled “getStoredAgent()”getStoredAgent(
storedAgentId):StoredAgent
Gets a stored agent instance by ID for further operations (details, update, delete)
Parameters
Section titled “Parameters”storedAgentId
Section titled “storedAgentId”string
ID of the stored agent to retrieve
Returns
Section titled “Returns”StoredAgent
StoredAgent instance
Inherited from
Section titled “Inherited from”MastraClient.getStoredAgent
getStoredMCPClient()
Section titled “getStoredMCPClient()”getStoredMCPClient(
storedMCPClientId):StoredMCPClient
Gets a stored MCP client instance by ID for further operations (details, update, delete)
Parameters
Section titled “Parameters”storedMCPClientId
Section titled “storedMCPClientId”string
ID of the stored MCP client
Returns
Section titled “Returns”StoredMCPClient
StoredMCPClient instance
Inherited from
Section titled “Inherited from”MastraClient.getStoredMCPClient
getStoredPromptBlock()
Section titled “getStoredPromptBlock()”getStoredPromptBlock(
storedPromptBlockId):StoredPromptBlock
Gets a stored prompt block instance by ID for further operations (details, update, delete)
Parameters
Section titled “Parameters”storedPromptBlockId
Section titled “storedPromptBlockId”string
ID of the stored prompt block to retrieve
Returns
Section titled “Returns”StoredPromptBlock
StoredPromptBlock instance
Inherited from
Section titled “Inherited from”MastraClient.getStoredPromptBlock
getStoredScorer()
Section titled “getStoredScorer()”getStoredScorer(
storedScorerId):StoredScorer
Gets a stored scorer definition instance by ID for further operations (details, update, delete)
Parameters
Section titled “Parameters”storedScorerId
Section titled “storedScorerId”string
ID of the stored scorer definition
Returns
Section titled “Returns”StoredScorer
StoredScorer instance
Inherited from
Section titled “Inherited from”MastraClient.getStoredScorer
getStoredSkill()
Section titled “getStoredSkill()”getStoredSkill(
storedSkillId):StoredSkill
Gets a stored skill instance by ID for further operations (details, update, delete)
Parameters
Section titled “Parameters”storedSkillId
Section titled “storedSkillId”string
ID of the stored skill
Returns
Section titled “Returns”StoredSkill
StoredSkill instance
Inherited from
Section titled “Inherited from”MastraClient.getStoredSkill
getStoredWorkspace()
Section titled “getStoredWorkspace()”getStoredWorkspace(
id):Promise<StoredWorkspaceResponse>
Gets a specific stored workspace by ID
Parameters
Section titled “Parameters”string
The workspace ID
Returns
Section titled “Returns”Promise<StoredWorkspaceResponse>
Promise containing the stored workspace
Inherited from
Section titled “Inherited from”MastraClient.getStoredWorkspace
getSystemPackages()
Section titled “getSystemPackages()”getSystemPackages():
Promise<{cmsEnabled:boolean;editorSource?:"code"|"db";editorSourceCapabilities?: {canOpenChangeRequest:boolean;canSave:boolean;provider?: {displayName:string;id:string; };source:"code"|"db";storage:"database"|"filesystem"|"source-provider"|"unavailable";unavailableReason?:string; };isDev:boolean;observabilityEnabled:boolean;observabilityRuntimeStrategy?:"realtime"|"batch-with-updates"|"insert-only"|"event-sourced";observabilityStorageType?:string;packages:object[];storageType?:string; }>
Retrieves installed Mastra packages and their versions
Returns
Section titled “Returns”Promise<{ cmsEnabled: boolean; editorSource?: "code" | "db"; editorSourceCapabilities?: { canOpenChangeRequest: boolean; canSave: boolean; provider?: { displayName: string; id: string; }; source: "code" | "db"; storage: "database" | "filesystem" | "source-provider" | "unavailable"; unavailableReason?: string; }; isDev: boolean; observabilityEnabled: boolean; observabilityRuntimeStrategy?: "realtime" | "batch-with-updates" | "insert-only" | "event-sourced"; observabilityStorageType?: string; packages: object[]; storageType?: string; }>
Promise containing the list of installed Mastra packages
Inherited from
Section titled “Inherited from”MastraClient.getSystemPackages
getTags()
Section titled “getTags()”getTags(
params?):Promise<{tags:string[]; }>
Returns distinct tags with optional entity type filtering.
Parameters
Section titled “Parameters”params?
Section titled “params?”entityType?
Section titled “entityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
Returns
Section titled “Returns”Promise<{ tags: string[]; }>
Inherited from
Section titled “Inherited from”MastraClient.getTags
getTool()
Section titled “getTool()”getTool(
toolId):Tool
Gets a tool instance by ID
Parameters
Section titled “Parameters”toolId
Section titled “toolId”string
ID of the tool to retrieve
Returns
Section titled “Returns”Tool
Tool instance
Inherited from
Section titled “Inherited from”MastraClient.getTool
getToolProvider()
Section titled “getToolProvider()”getToolProvider(
providerId):ToolProvider
Gets a tool provider instance by ID for further operations (listToolkits, listTools, getToolSchema)
Parameters
Section titled “Parameters”providerId
Section titled “providerId”string
ID of the tool provider
Returns
Section titled “Returns”ToolProvider
ToolProvider instance
Inherited from
Section titled “Inherited from”MastraClient.getToolProvider
getTrace()
Section titled “getTrace()”getTrace(
traceId):Promise<{spans:object[];traceId:string; }>
Retrieves a specific trace by ID.
Parameters
Section titled “Parameters”traceId
Section titled “traceId”string
Returns
Section titled “Returns”Promise<{ spans: object[]; traceId: string; }>
Inherited from
Section titled “Inherited from”MastraClient.getTrace
getTraceLight()
Section titled “getTraceLight()”getTraceLight(
traceId):Promise<{spans:object[];traceId:string; }>
Retrieves a lightweight trace by ID (timeline fields only, excludes heavy fields).
Parameters
Section titled “Parameters”traceId
Section titled “traceId”string
Returns
Section titled “Returns”Promise<{ spans: object[]; traceId: string; }>
Inherited from
Section titled “Inherited from”MastraClient.getTraceLight
getTraces()
Section titled “getTraces()”getTraces(
params):Promise<LegacyGetTracesResponse>
Retrieves paginated list of traces with optional filtering. This is the legacy API preserved for backward compatibility.
Parameters
Section titled “Parameters”params
Section titled “params”LegacyTracesPaginatedArg
Parameters for pagination and filtering (legacy format)
Returns
Section titled “Returns”Promise<LegacyGetTracesResponse>
Promise containing paginated traces and pagination info
Deprecated
Section titled “Deprecated”Use listTraces instead for new features like ordering and more filters.
Inherited from
Section titled “Inherited from”MastraClient.getTraces
getTraceTrajectory()
Section titled “getTraceTrajectory()”getTraceTrajectory(
traceId):Promise<Trajectory>
Extracts a structured trajectory from a trace’s spans.
Parameters
Section titled “Parameters”traceId
Section titled “traceId”string
Returns
Section titled “Returns”Promise<Trajectory>
Inherited from
Section titled “Inherited from”MastraClient.getTraceTrajectory
getVector()
Section titled “getVector()”getVector(
vectorName):Vector
Gets a vector instance by name
Parameters
Section titled “Parameters”vectorName
Section titled “vectorName”string
Name of the vector to retrieve
Returns
Section titled “Returns”Vector
Vector instance
Inherited from
Section titled “Inherited from”MastraClient.getVector
getWorkflow()
Section titled “getWorkflow()”getWorkflow(
workflowId):Workflow
Gets a workflow instance by ID
Parameters
Section titled “Parameters”workflowId
Section titled “workflowId”string
ID of the workflow to retrieve
Returns
Section titled “Returns”Workflow
Workflow instance
Inherited from
Section titled “Inherited from”MastraClient.getWorkflow
getWorkingMemory()
Section titled “getWorkingMemory()”getWorkingMemory(
agentId):Promise<unknown>
Retrieves the working memory for a specific thread (optionally resource-scoped).
Parameters
Section titled “Parameters”agentId
Section titled “agentId”ID of the agent.
agentId
Section titled “agentId”string
requestContext?
Section titled “requestContext?”RequestContext<unknown> | Record<string, any>
resourceId?
Section titled “resourceId?”string
threadId
Section titled “threadId”string
Returns
Section titled “Returns”Promise<unknown>
Working memory for the specified thread or resource.
Inherited from
Section titled “Inherited from”MastraClient.getWorkingMemory
getWorkspace()
Section titled “getWorkspace()”getWorkspace(
workspaceId):Workspace
Gets the workspace resource for filesystem, search, and skills operations
Parameters
Section titled “Parameters”workspaceId
Section titled “workspaceId”string
Workspace ID to target
Returns
Section titled “Returns”Workspace
Workspace instance
Inherited from
Section titled “Inherited from”MastraClient.getWorkspace
history()
Section titled “history()”history(
options?):Promise<{hasMore:boolean;page:number;perPage:number;total:number;uiMessages:object[]; }>
Fetch one page of thread history from GET ${basePath}/route/history.
Messages come back oldest -> newest so the caller can prepend them
to a live transcript. threadId targets a specific conversation
(sent as the ?threadId= query so it doesn’t depend on shared client
state); omit it to read the per-session cookie thread.
Parameters
Section titled “Parameters”options?
Section titled “options?”agentId?
Section titled “agentId?”string
number
perPage?
Section titled “perPage?”number
signal?
Section titled “signal?”AbortSignal
threadId?
Section titled “threadId?”string
Returns
Section titled “Returns”Promise<{ hasMore: boolean; page: number; perPage: number; total: number; uiMessages: object[]; }>
installBuilderRegistrySkill()
Section titled “installBuilderRegistrySkill()”installBuilderRegistrySkill(
registryId,body):Promise<BuilderRegistryInstallResponse>
Install a registry skill into the builder’s stored-skills DB.
Returns 409 when a stored skill with the derived id already exists.
Requires stored-skills:write permission.
Parameters
Section titled “Parameters”registryId
Section titled “registryId”string
BuilderRegistryInstallBody
Returns
Section titled “Returns”Promise<BuilderRegistryInstallResponse>
Inherited from
Section titled “Inherited from”MastraClient.installBuilderRegistrySkill
listAgentControllers()
Section titled “listAgentControllers()”listAgentControllers():
Promise<object[]>
Lists the agent controllers hosted on the connected Mastra instance.
Returns
Section titled “Returns”Promise<object[]>
Promise containing an array of agent controller identifiers
Inherited from
Section titled “Inherited from”MastraClient.listAgentControllers
listAgents()
Section titled “listAgents()”listAgents(
requestContext?,partial?):Promise<Record<string,GetAgentResponse>>
Retrieves all available agents
Parameters
Section titled “Parameters”requestContext?
Section titled “requestContext?”RequestContext<unknown> | Record<string, any>
Optional request context to pass as query parameter
partial?
Section titled “partial?”boolean
Returns
Section titled “Returns”Promise<Record<string, GetAgentResponse>>
Promise containing map of agent IDs to agent details
Inherited from
Section titled “Inherited from”MastraClient.listAgents
listAgentsModelProviders()
Section titled “listAgentsModelProviders()”listAgentsModelProviders():
Promise<{providers:object[]; }>
Returns
Section titled “Returns”Promise<{ providers: object[]; }>
Inherited from
Section titled “Inherited from”MastraClient.listAgentsModelProviders
listBackgroundTasks()
Section titled “listBackgroundTasks()”listBackgroundTasks(
params?):Promise<{tasks:object[];total:number; }>
Lists background tasks with optional filtering and pagination.
Parameters
Section titled “Parameters”params?
Section titled “params?”agentId?
Section titled “agentId?”string
dateFilterBy?
Section titled “dateFilterBy?”"createdAt" | "startedAt" | "suspendedAt" | "completedAt"
fromDate?
Section titled “fromDate?”Date
orderBy?
Section titled “orderBy?”"createdAt" | "startedAt" | "suspendedAt" | "completedAt"
orderDirection?
Section titled “orderDirection?”"asc" | "desc"
number
perPage?
Section titled “perPage?”number
resourceId?
Section titled “resourceId?”string
runId?
Section titled “runId?”string
status?
Section titled “status?”"running" | "pending" | "completed" | "failed" | "suspended" | "cancelled" | "timed_out"
threadId?
Section titled “threadId?”string
toDate?
Section titled “toDate?”Date
toolCallId?
Section titled “toolCallId?”string
toolName?
Section titled “toolName?”string
Returns
Section titled “Returns”Promise<{ tasks: object[]; total: number; }>
Inherited from
Section titled “Inherited from”MastraClient.listBackgroundTasks
listBranches()
Section titled “listBranches()”listBranches(
params?):Promise<{branches:object[];delta?: {hasMore:boolean;limit:number; };deltaCursor?:string;pagination?: {hasMore:boolean;page:number;perPage:number|false;total:number; }; }>
Retrieves a paginated list of trace branches with optional filtering and sorting. Each row is a branch-anchor span (AGENT_RUN, WORKFLOW_RUN, TOOL_CALL, etc.) including ones nested under a different root entity. Pairs with getBranch to expand a single branch into its subtree.
Parameters
Section titled “Parameters”params?
Section titled “params?”after?
Section titled “after?”string
filters?
Section titled “filters?”{ endedAt?: { end?: unknown; endExclusive?: boolean; start?: unknown; startExclusive?: boolean; }; entityId?: string | null; entityName?: string | null; entityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null; entityVersionId?: string | null; environment?: string | null; experimentId?: string | null; metadata?: Record<string, unknown> | null; organizationId?: string | null; parentEntityId?: string | null; parentEntityName?: string | null; parentEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null; parentEntityVersionId?: string | null; requestId?: string | null; resourceId?: string | null; rootEntityId?: string | null; rootEntityName?: string | null; rootEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null; rootEntityVersionId?: string | null; runId?: string | null; scope?: Record<string, unknown> | null; serviceName?: string | null; sessionId?: string | null; source?: string | null; spanType?: AGENT_RUN | SCORER_RUN | SCORER_STEP | GENERIC | MODEL_GENERATION | MODEL_STEP | MODEL_INFERENCE | MODEL_CHUNK | MCP_TOOL_CALL | PROCESSOR_RUN | TOOL_CALL | CLIENT_TOOL_CALL | WORKFLOW_RUN | WORKFLOW_STEP | WORKFLOW_CONDITIONAL | WORKFLOW_CONDITIONAL_EVAL | WORKFLOW_PARALLEL | WORKFLOW_LOOP | WORKFLOW_SLEEP | WORKFLOW_WAIT_EVENT | MEMORY_OPERATION | WORKSPACE_ACTION | RAG_INGESTION | RAG_EMBEDDING | RAG_VECTOR_OPERATION | RAG_ACTION | GRAPH_ACTION | MAPPING; startedAt?: { end?: unknown; endExclusive?: boolean; start?: unknown; startExclusive?: boolean; }; status?: SUCCESS | ERROR | RUNNING; tags?: string[] | null; threadId?: string | null; traceId?: string; userId?: string | null; }
filters.endedAt?
Section titled “filters.endedAt?”{ end?: unknown; endExclusive?: boolean; start?: unknown; startExclusive?: boolean; }
filters.endedAt.end?
Section titled “filters.endedAt.end?”unknown
filters.endedAt.endExclusive?
Section titled “filters.endedAt.endExclusive?”boolean
filters.endedAt.start?
Section titled “filters.endedAt.start?”unknown
filters.endedAt.startExclusive?
Section titled “filters.endedAt.startExclusive?”boolean
filters.entityId?
Section titled “filters.entityId?”string | null
filters.entityName?
Section titled “filters.entityName?”string | null
filters.entityType?
Section titled “filters.entityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null
filters.entityVersionId?
Section titled “filters.entityVersionId?”string | null
filters.environment?
Section titled “filters.environment?”string | null
filters.experimentId?
Section titled “filters.experimentId?”string | null
filters.metadata?
Section titled “filters.metadata?”Record<string, unknown> | null
filters.organizationId?
Section titled “filters.organizationId?”string | null
filters.parentEntityId?
Section titled “filters.parentEntityId?”string | null
filters.parentEntityName?
Section titled “filters.parentEntityName?”string | null
filters.parentEntityType?
Section titled “filters.parentEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null
filters.parentEntityVersionId?
Section titled “filters.parentEntityVersionId?”string | null
filters.requestId?
Section titled “filters.requestId?”string | null
filters.resourceId?
Section titled “filters.resourceId?”string | null
filters.rootEntityId?
Section titled “filters.rootEntityId?”string | null
filters.rootEntityName?
Section titled “filters.rootEntityName?”string | null
filters.rootEntityType?
Section titled “filters.rootEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null
filters.rootEntityVersionId?
Section titled “filters.rootEntityVersionId?”string | null
filters.runId?
Section titled “filters.runId?”string | null
filters.scope?
Section titled “filters.scope?”Record<string, unknown> | null
filters.serviceName?
Section titled “filters.serviceName?”string | null
filters.sessionId?
Section titled “filters.sessionId?”string | null
filters.source?
Section titled “filters.source?”string | null
filters.spanType?
Section titled “filters.spanType?”AGENT_RUN | SCORER_RUN | SCORER_STEP | GENERIC | MODEL_GENERATION | MODEL_STEP | MODEL_INFERENCE | MODEL_CHUNK | MCP_TOOL_CALL | PROCESSOR_RUN | TOOL_CALL | CLIENT_TOOL_CALL | WORKFLOW_RUN | WORKFLOW_STEP | WORKFLOW_CONDITIONAL | WORKFLOW_CONDITIONAL_EVAL | WORKFLOW_PARALLEL | WORKFLOW_LOOP | WORKFLOW_SLEEP | WORKFLOW_WAIT_EVENT | MEMORY_OPERATION | WORKSPACE_ACTION | RAG_INGESTION | RAG_EMBEDDING | RAG_VECTOR_OPERATION | RAG_ACTION | GRAPH_ACTION | MAPPING
filters.startedAt?
Section titled “filters.startedAt?”{ end?: unknown; endExclusive?: boolean; start?: unknown; startExclusive?: boolean; }
filters.startedAt.end?
Section titled “filters.startedAt.end?”unknown
filters.startedAt.endExclusive?
Section titled “filters.startedAt.endExclusive?”boolean
filters.startedAt.start?
Section titled “filters.startedAt.start?”unknown
filters.startedAt.startExclusive?
Section titled “filters.startedAt.startExclusive?”boolean
filters.status?
Section titled “filters.status?”SUCCESS | ERROR | RUNNING
filters.tags?
Section titled “filters.tags?”string[] | null
filters.threadId?
Section titled “filters.threadId?”string | null
filters.traceId?
Section titled “filters.traceId?”string
filters.userId?
Section titled “filters.userId?”string | null
limit?
Section titled “limit?”unknown
"page" | "delta"
orderBy?
Section titled “orderBy?”{ direction?: "ASC" | "DESC"; field?: "endedAt" | "startedAt"; }
orderBy.direction?
Section titled “orderBy.direction?”"ASC" | "DESC"
orderBy.field?
Section titled “orderBy.field?”"endedAt" | "startedAt"
pagination?
Section titled “pagination?”{ page?: unknown; perPage?: unknown; }
pagination.page?
Section titled “pagination.page?”unknown
pagination.perPage?
Section titled “pagination.perPage?”unknown
Returns
Section titled “Returns”Promise<{ branches: object[]; delta?: { hasMore: boolean; limit: number; }; deltaCursor?: string; pagination?: { hasMore: boolean; page: number; perPage: number | false; total: number; }; }>
Inherited from
Section titled “Inherited from”MastraClient.listBranches
listBuilderRegistries()
Section titled “listBuilderRegistries()”listBuilderRegistries():
Promise<ListBuilderRegistriesResponse>
Lists known skill registries surfaced by the Agent Builder config.
Each entry reports whether the registry is enabled. Disabled or unknown
registries return 404 from registry-scoped routes.
Requires stored-skills:read permission.
Returns
Section titled “Returns”Promise<ListBuilderRegistriesResponse>
Inherited from
Section titled “Inherited from”MastraClient.listBuilderRegistries
listDatasetExperimentResults()
Section titled “listDatasetExperimentResults()”listDatasetExperimentResults(
datasetId,experimentId,pagination?):Promise<{pagination:PaginationInfo;results:DatasetExperimentResult[]; }>
Lists results for a dataset experiment
Parameters
Section titled “Parameters”datasetId
Section titled “datasetId”string
experimentId
Section titled “experimentId”string
pagination?
Section titled “pagination?”number
perPage?
Section titled “perPage?”number
Returns
Section titled “Returns”Promise<{ pagination: PaginationInfo; results: DatasetExperimentResult[]; }>
Inherited from
Section titled “Inherited from”MastraClient.listDatasetExperimentResults
listDatasetExperiments()
Section titled “listDatasetExperiments()”listDatasetExperiments(
datasetId,pagination?):Promise<{experiments:DatasetExperiment[];pagination:PaginationInfo; }>
Lists experiments for a dataset
Parameters
Section titled “Parameters”datasetId
Section titled “datasetId”string
pagination?
Section titled “pagination?”number
perPage?
Section titled “perPage?”number
Returns
Section titled “Returns”Promise<{ experiments: DatasetExperiment[]; pagination: PaginationInfo; }>
Inherited from
Section titled “Inherited from”MastraClient.listDatasetExperiments
listDatasetItems()
Section titled “listDatasetItems()”listDatasetItems(
datasetId,params?):Promise<{items:DatasetItem[];pagination:PaginationInfo; }>
Lists items in a dataset with optional pagination, search, and version filter
Parameters
Section titled “Parameters”datasetId
Section titled “datasetId”string
params?
Section titled “params?”number
perPage?
Section titled “perPage?”number
search?
Section titled “search?”string
version?
Section titled “version?”number | null
Returns
Section titled “Returns”Promise<{ items: DatasetItem[]; pagination: PaginationInfo; }>
Inherited from
Section titled “Inherited from”MastraClient.listDatasetItems
listDatasets()
Section titled “listDatasets()”listDatasets(
pagination?):Promise<{datasets:DatasetRecord[];pagination:PaginationInfo; }>
Lists all datasets with optional pagination
Parameters
Section titled “Parameters”pagination?
Section titled “pagination?”number
perPage?
Section titled “perPage?”number
Returns
Section titled “Returns”Promise<{ datasets: DatasetRecord[]; pagination: PaginationInfo; }>
Inherited from
Section titled “Inherited from”MastraClient.listDatasets
listDatasetVersions()
Section titled “listDatasetVersions()”listDatasetVersions(
datasetId,pagination?):Promise<{pagination:PaginationInfo;versions:DatasetVersionResponse[]; }>
Lists versions for a dataset
Parameters
Section titled “Parameters”datasetId
Section titled “datasetId”string
pagination?
Section titled “pagination?”number
perPage?
Section titled “perPage?”number
Returns
Section titled “Returns”Promise<{ pagination: PaginationInfo; versions: DatasetVersionResponse[]; }>
Inherited from
Section titled “Inherited from”MastraClient.listDatasetVersions
listEmbedders()
Section titled “listEmbedders()”listEmbedders():
Promise<{embedders:object[]; }>
Lists all available embedding models
Returns
Section titled “Returns”Promise<{ embedders: object[]; }>
Promise containing list of available embedders
Inherited from
Section titled “Inherited from”MastraClient.listEmbedders
listExperiments()
Section titled “listExperiments()”listExperiments(
pagination?):Promise<{experiments:DatasetExperiment[];pagination:PaginationInfo; }>
Lists all experiments across all datasets
Parameters
Section titled “Parameters”pagination?
Section titled “pagination?”number
perPage?
Section titled “perPage?”number
Returns
Section titled “Returns”Promise<{ experiments: DatasetExperiment[]; pagination: PaginationInfo; }>
Inherited from
Section titled “Inherited from”MastraClient.listExperiments
listFeedback()
Section titled “listFeedback()”listFeedback(
params?):Promise<{delta?: {hasMore:boolean;limit:number; };deltaCursor?:string;feedback:object[];pagination?: {hasMore:boolean;page:number;perPage:number|false;total:number; }; }>
Retrieves a paginated list of feedback records.
Parameters
Section titled “Parameters”params?
Section titled “params?”after?
Section titled “after?”string
filters?
Section titled “filters?”any
limit?
Section titled “limit?”unknown
"page" | "delta"
orderBy?
Section titled “orderBy?”{ direction?: "ASC" | "DESC"; field?: "timestamp"; }
orderBy.direction?
Section titled “orderBy.direction?”"ASC" | "DESC"
orderBy.field?
Section titled “orderBy.field?”"timestamp"
pagination?
Section titled “pagination?”{ page?: unknown; perPage?: unknown; }
pagination.page?
Section titled “pagination.page?”unknown
pagination.perPage?
Section titled “pagination.perPage?”unknown
Returns
Section titled “Returns”Promise<{ delta?: { hasMore: boolean; limit: number; }; deltaCursor?: string; feedback: object[]; pagination?: { hasMore: boolean; page: number; perPage: number | false; total: number; }; }>
Inherited from
Section titled “Inherited from”MastraClient.listFeedback
listLogs()
Section titled “listLogs()”listLogs(
params):Promise<{hasMore:boolean;logs:object[];page:number;perPage:number|false;total:number; }>
Retrieves logs
Parameters
Section titled “Parameters”params
Section titled “params”Parameters for filtering logs
filters?
Section titled “filters?”string | string[]
fromDate?
Section titled “fromDate?”Date
logLevel?
Section titled “logLevel?”"error" | "debug" | "info" | "warn" | "silent"
number
perPage?
Section titled “perPage?”number
toDate?
Section titled “toDate?”Date
transportId
Section titled “transportId”string
Returns
Section titled “Returns”Promise<{ hasMore: boolean; logs: object[]; page: number; perPage: number | false; total: number; }>
Promise containing array of log messages
Inherited from
Section titled “Inherited from”MastraClient.listLogs
listLogsVNext()
Section titled “listLogsVNext()”listLogsVNext(
params?):Promise<{delta?: {hasMore:boolean;limit:number; };deltaCursor?:string;logs:object[];pagination?: {hasMore:boolean;page:number;perPage:number|false;total:number; }; }>
Retrieves a paginated list of observability logs.
Parameters
Section titled “Parameters”params?
Section titled “params?”after?
Section titled “after?”string
filters?
Section titled “filters?”{ entityName?: string; entityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; entityVersionId?: string; environment?: string; executionSource?: string; experimentId?: string; level?: "error" | "debug" | "info" | "warn" | "fatal" | ("error" | "debug" | "info" | "warn" | "fatal")[]; organizationId?: string; parentEntityName?: string; parentEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; parentEntityVersionId?: string; requestId?: string; resourceId?: string; rootEntityName?: string; rootEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; rootEntityVersionId?: string; runId?: string; serviceName?: string; sessionId?: string; source?: string; spanId?: string; tags?: string[]; threadId?: string; timestamp?: { end?: unknown; endExclusive?: boolean; start?: unknown; startExclusive?: boolean; }; traceId?: string; userId?: string; }
filters.entityName?
Section titled “filters.entityName?”string
filters.entityType?
Section titled “filters.entityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.entityVersionId?
Section titled “filters.entityVersionId?”string
filters.environment?
Section titled “filters.environment?”string
filters.executionSource?
Section titled “filters.executionSource?”string
filters.experimentId?
Section titled “filters.experimentId?”string
filters.level?
Section titled “filters.level?”"error" | "debug" | "info" | "warn" | "fatal" | ("error" | "debug" | "info" | "warn" | "fatal")[]
filters.organizationId?
Section titled “filters.organizationId?”string
filters.parentEntityName?
Section titled “filters.parentEntityName?”string
filters.parentEntityType?
Section titled “filters.parentEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.parentEntityVersionId?
Section titled “filters.parentEntityVersionId?”string
filters.requestId?
Section titled “filters.requestId?”string
filters.resourceId?
Section titled “filters.resourceId?”string
filters.rootEntityName?
Section titled “filters.rootEntityName?”string
filters.rootEntityType?
Section titled “filters.rootEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.rootEntityVersionId?
Section titled “filters.rootEntityVersionId?”string
filters.runId?
Section titled “filters.runId?”string
filters.serviceName?
Section titled “filters.serviceName?”string
filters.sessionId?
Section titled “filters.sessionId?”string
filters.source?
Section titled “filters.source?”string
filters.spanId?
Section titled “filters.spanId?”string
filters.tags?
Section titled “filters.tags?”string[]
filters.threadId?
Section titled “filters.threadId?”string
filters.timestamp?
Section titled “filters.timestamp?”{ end?: unknown; endExclusive?: boolean; start?: unknown; startExclusive?: boolean; }
filters.timestamp.end?
Section titled “filters.timestamp.end?”unknown
filters.timestamp.endExclusive?
Section titled “filters.timestamp.endExclusive?”boolean
filters.timestamp.start?
Section titled “filters.timestamp.start?”unknown
filters.timestamp.startExclusive?
Section titled “filters.timestamp.startExclusive?”boolean
filters.traceId?
Section titled “filters.traceId?”string
filters.userId?
Section titled “filters.userId?”string
limit?
Section titled “limit?”unknown
"page" | "delta"
orderBy?
Section titled “orderBy?”{ direction?: "ASC" | "DESC"; field?: "timestamp"; }
orderBy.direction?
Section titled “orderBy.direction?”"ASC" | "DESC"
orderBy.field?
Section titled “orderBy.field?”"timestamp"
pagination?
Section titled “pagination?”{ page?: unknown; perPage?: unknown; }
pagination.page?
Section titled “pagination.page?”unknown
pagination.perPage?
Section titled “pagination.perPage?”unknown
Returns
Section titled “Returns”Promise<{ delta?: { hasMore: boolean; limit: number; }; deltaCursor?: string; logs: object[]; pagination?: { hasMore: boolean; page: number; perPage: number | false; total: number; }; }>
Inherited from
Section titled “Inherited from”MastraClient.listLogsVNext
listLogTransports()
Section titled “listLogTransports()”listLogTransports():
Promise<{transports:string[]; }>
List of all log transports
Returns
Section titled “Returns”Promise<{ transports: string[]; }>
Promise containing list of log transports
Inherited from
Section titled “Inherited from”MastraClient.listLogTransports
listMemoryThreads()
Section titled “listMemoryThreads()”listMemoryThreads(
params?):Promise<{hasMore:boolean;page:number;perPage:number|false;threads:object[];total:number; }>
Lists memory threads with optional filtering by resourceId and/or metadata
Parameters
Section titled “Parameters”params?
Section titled “params?”ListMemoryThreadsParams
Parameters containing optional filters, pagination options, and request context
Returns
Section titled “Returns”Promise<{ hasMore: boolean; page: number; perPage: number | false; threads: object[]; total: number; }>
Promise containing paginated array of memory threads with metadata
Inherited from
Section titled “Inherited from”MastraClient.listMemoryThreads
listProcessors()
Section titled “listProcessors()”listProcessors(
requestContext?):Promise<Record<string,GetProcessorResponse>>
Retrieves all available processors
Parameters
Section titled “Parameters”requestContext?
Section titled “requestContext?”RequestContext<unknown> | Record<string, any>
Optional request context to pass as query parameter
Returns
Section titled “Returns”Promise<Record<string, GetProcessorResponse>>
Promise containing map of processor IDs to processor details
Inherited from
Section titled “Inherited from”MastraClient.listProcessors
listSchedules()
Section titled “listSchedules()”listSchedules(
params?):Promise<ListSchedulesResponse>
Lists workflow schedules with optional filtering by workflowId or status.
Parameters
Section titled “Parameters”params?
Section titled “params?”ListSchedulesParams
Returns
Section titled “Returns”Promise<ListSchedulesResponse>
Inherited from
Section titled “Inherited from”MastraClient.listSchedules
listScheduleTriggers()
Section titled “listScheduleTriggers()”listScheduleTriggers(
scheduleId,params?):Promise<ListScheduleTriggersResponse>
Lists trigger history for a schedule, ordered by actualFireAt descending.
Parameters
Section titled “Parameters”scheduleId
Section titled “scheduleId”string
params?
Section titled “params?”ListScheduleTriggersParams
Returns
Section titled “Returns”Promise<ListScheduleTriggersResponse>
Inherited from
Section titled “Inherited from”MastraClient.listScheduleTriggers
listScorers()
Section titled “listScorers()”listScorers(
requestContext?):Promise<Record<string,GetScorerResponse>>
Retrieves all available scorers
Parameters
Section titled “Parameters”requestContext?
Section titled “requestContext?”RequestContext<unknown> | Record<string, any>
Optional request context to pass as query parameter
Returns
Section titled “Returns”Promise<Record<string, GetScorerResponse>>
Promise containing list of available scorers
Inherited from
Section titled “Inherited from”MastraClient.listScorers
listScores()
Section titled “listScores()”listScores(
params?):Promise<{delta?: {hasMore:boolean;limit:number; };deltaCursor?:string;pagination?: {hasMore:boolean;page:number;perPage:number|false;total:number; };scores:object[]; }>
Retrieves a paginated list of observability scores.
Parameters
Section titled “Parameters”params?
Section titled “params?”after?
Section titled “after?”string
filters?
Section titled “filters?”{ entityName?: string; entityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; entityVersionId?: string; environment?: string; executionSource?: string; experimentId?: string; organizationId?: string; parentEntityName?: string; parentEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; parentEntityVersionId?: string; requestId?: string; resourceId?: string; rootEntityName?: string; rootEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY; rootEntityVersionId?: string; runId?: string; scorerId?: string | string[]; scoreSource?: string; serviceName?: string; sessionId?: string; source?: string; spanId?: string; tags?: string[]; threadId?: string; timestamp?: { end?: unknown; endExclusive?: boolean; start?: unknown; startExclusive?: boolean; }; traceId?: string; userId?: string; }
filters.entityName?
Section titled “filters.entityName?”string
filters.entityType?
Section titled “filters.entityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.entityVersionId?
Section titled “filters.entityVersionId?”string
filters.environment?
Section titled “filters.environment?”string
filters.executionSource?
Section titled “filters.executionSource?”string
filters.experimentId?
Section titled “filters.experimentId?”string
filters.organizationId?
Section titled “filters.organizationId?”string
filters.parentEntityName?
Section titled “filters.parentEntityName?”string
filters.parentEntityType?
Section titled “filters.parentEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.parentEntityVersionId?
Section titled “filters.parentEntityVersionId?”string
filters.requestId?
Section titled “filters.requestId?”string
filters.resourceId?
Section titled “filters.resourceId?”string
filters.rootEntityName?
Section titled “filters.rootEntityName?”string
filters.rootEntityType?
Section titled “filters.rootEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY
filters.rootEntityVersionId?
Section titled “filters.rootEntityVersionId?”string
filters.runId?
Section titled “filters.runId?”string
filters.scorerId?
Section titled “filters.scorerId?”string | string[]
filters.scoreSource?
Section titled “filters.scoreSource?”string
filters.serviceName?
Section titled “filters.serviceName?”string
filters.sessionId?
Section titled “filters.sessionId?”string
filters.source?
Section titled “filters.source?”string
filters.spanId?
Section titled “filters.spanId?”string
filters.tags?
Section titled “filters.tags?”string[]
filters.threadId?
Section titled “filters.threadId?”string
filters.timestamp?
Section titled “filters.timestamp?”{ end?: unknown; endExclusive?: boolean; start?: unknown; startExclusive?: boolean; }
filters.timestamp.end?
Section titled “filters.timestamp.end?”unknown
filters.timestamp.endExclusive?
Section titled “filters.timestamp.endExclusive?”boolean
filters.timestamp.start?
Section titled “filters.timestamp.start?”unknown
filters.timestamp.startExclusive?
Section titled “filters.timestamp.startExclusive?”boolean
filters.traceId?
Section titled “filters.traceId?”string
filters.userId?
Section titled “filters.userId?”string
limit?
Section titled “limit?”unknown
"page" | "delta"
orderBy?
Section titled “orderBy?”{ direction?: "ASC" | "DESC"; field?: "score" | "timestamp"; }
orderBy.direction?
Section titled “orderBy.direction?”"ASC" | "DESC"
orderBy.field?
Section titled “orderBy.field?”"score" | "timestamp"
pagination?
Section titled “pagination?”{ page?: unknown; perPage?: unknown; }
pagination.page?
Section titled “pagination.page?”unknown
pagination.perPage?
Section titled “pagination.perPage?”unknown
Returns
Section titled “Returns”Promise<{ delta?: { hasMore: boolean; limit: number; }; deltaCursor?: string; pagination?: { hasMore: boolean; page: number; perPage: number | false; total: number; }; scores: object[]; }>
Inherited from
Section titled “Inherited from”MastraClient.listScores
listScoresByEntityId()
Section titled “listScoresByEntityId()”listScoresByEntityId(
params):Promise<ListScoresResponse>
Retrieves scores by entity ID and type
Parameters
Section titled “Parameters”params
Section titled “params”ListScoresByEntityIdParams
Parameters containing entity ID, type, and pagination options
Returns
Section titled “Returns”Promise<ListScoresResponse>
Promise containing scores and pagination info
Inherited from
Section titled “Inherited from”MastraClient.listScoresByEntityId
listScoresByRunId()
Section titled “listScoresByRunId()”listScoresByRunId(
params):Promise<ListScoresResponse>
Retrieves scores by run ID
Parameters
Section titled “Parameters”params
Section titled “params”ListScoresByRunIdParams
Parameters containing run ID and pagination options
Returns
Section titled “Returns”Promise<ListScoresResponse>
Promise containing scores and pagination info
Inherited from
Section titled “Inherited from”MastraClient.listScoresByRunId
listScoresByScorerId()
Section titled “listScoresByScorerId()”listScoresByScorerId(
params):Promise<ListScoresResponse>
Parameters
Section titled “Parameters”params
Section titled “params”ListScoresByScorerIdParams
Returns
Section titled “Returns”Promise<ListScoresResponse>
Inherited from
Section titled “Inherited from”MastraClient.listScoresByScorerId
listScoresBySpan()
Section titled “listScoresBySpan()”listScoresBySpan(
params):Promise<{pagination: {hasMore:boolean;page:number;perPage:number|false;total:number; };scores:object[]; }>
Parameters
Section titled “Parameters”params
Section titled “params”ListScoresBySpanParams
Returns
Section titled “Returns”Promise<{ pagination: { hasMore: boolean; page: number; perPage: number | false; total: number; }; scores: object[]; }>
Inherited from
Section titled “Inherited from”MastraClient.listScoresBySpan
listStoredAgents()
Section titled “listStoredAgents()”listStoredAgents(
params?):Promise<ListStoredAgentsResponse>
Lists all stored agents with optional pagination
Parameters
Section titled “Parameters”params?
Section titled “params?”ListStoredAgentsParams
Optional pagination and ordering parameters
Returns
Section titled “Returns”Promise<ListStoredAgentsResponse>
Promise containing paginated list of stored agents
Inherited from
Section titled “Inherited from”MastraClient.listStoredAgents
listStoredMCPClients()
Section titled “listStoredMCPClients()”listStoredMCPClients(
params?):Promise<ListStoredMCPClientsResponse>
Lists all stored MCP clients with optional pagination
Parameters
Section titled “Parameters”params?
Section titled “params?”ListStoredMCPClientsParams
Optional pagination and ordering parameters
Returns
Section titled “Returns”Promise<ListStoredMCPClientsResponse>
Promise containing paginated list of stored MCP clients
Inherited from
Section titled “Inherited from”MastraClient.listStoredMCPClients
listStoredPromptBlocks()
Section titled “listStoredPromptBlocks()”listStoredPromptBlocks(
params?):Promise<ListStoredPromptBlocksResponse>
Lists all stored prompt blocks with optional pagination
Parameters
Section titled “Parameters”params?
Section titled “params?”ListStoredPromptBlocksParams
Optional pagination and ordering parameters
Returns
Section titled “Returns”Promise<ListStoredPromptBlocksResponse>
Promise containing paginated list of stored prompt blocks
Inherited from
Section titled “Inherited from”MastraClient.listStoredPromptBlocks
listStoredScorers()
Section titled “listStoredScorers()”listStoredScorers(
params?):Promise<ListStoredScorersResponse>
Lists all stored scorer definitions with optional pagination
Parameters
Section titled “Parameters”params?
Section titled “params?”ListStoredScorersParams
Optional pagination and ordering parameters
Returns
Section titled “Returns”Promise<ListStoredScorersResponse>
Promise containing paginated list of stored scorer definitions
Inherited from
Section titled “Inherited from”MastraClient.listStoredScorers
listStoredSkills()
Section titled “listStoredSkills()”listStoredSkills(
params?):Promise<ListStoredSkillsResponse>
Lists all stored skills with optional pagination
Parameters
Section titled “Parameters”params?
Section titled “params?”ListStoredSkillsParams
Optional pagination and ordering parameters
Returns
Section titled “Returns”Promise<ListStoredSkillsResponse>
Promise containing paginated list of stored skills
Inherited from
Section titled “Inherited from”MastraClient.listStoredSkills
listStoredWorkspaces()
Section titled “listStoredWorkspaces()”listStoredWorkspaces(
params?):Promise<ListStoredWorkspacesResponse>
Lists stored workspace configurations from the database
Parameters
Section titled “Parameters”params?
Section titled “params?”ListStoredWorkspacesParams
Optional filter and pagination parameters
Returns
Section titled “Returns”Promise<ListStoredWorkspacesResponse>
Promise containing paginated list of stored workspaces
Inherited from
Section titled “Inherited from”MastraClient.listStoredWorkspaces
listThreadMessages()
Section titled “listThreadMessages()”listThreadMessages(
threadId,opts?):Promise<ListMemoryThreadMessagesResponse>
Lists messages for a thread.
Parameters
Section titled “Parameters”threadId
Section titled “threadId”string
ID of the thread
Optional parameters including agentId, networkId, and requestContext
- When agentId is provided, uses the agent’s memory
- When networkId is provided, uses the network endpoint
- When neither is provided, uses storage directly
agentId?
Section titled “agentId?”string
includeSystemReminders?
Section titled “includeSystemReminders?”boolean
networkId?
Section titled “networkId?”string
requestContext?
Section titled “requestContext?”RequestContext<unknown> | Record<string, any>
Returns
Section titled “Returns”Promise<ListMemoryThreadMessagesResponse>
Promise containing the thread messages
Inherited from
Section titled “Inherited from”MastraClient.listThreadMessages
listToolProviders()
Section titled “listToolProviders()”listToolProviders():
Promise<{providers:object[]; }>
Lists all registered tool providers
Returns
Section titled “Returns”Promise<{ providers: object[]; }>
Promise containing list of tool provider info
Inherited from
Section titled “Inherited from”MastraClient.listToolProviders
listTools()
Section titled “listTools()”listTools(
requestContext?):Promise<Record<string,GetToolResponse>>
Retrieves all available tools
Parameters
Section titled “Parameters”requestContext?
Section titled “requestContext?”RequestContext<unknown> | Record<string, any>
Optional request context to pass as query parameter
Returns
Section titled “Returns”Promise<Record<string, GetToolResponse>>
Promise containing map of tool IDs to tool details
Inherited from
Section titled “Inherited from”MastraClient.listTools
listTraces()
Section titled “listTraces()”listTraces(
params?):Promise<{delta?: {hasMore:boolean;limit:number; };deltaCursor?:string;pagination?: {hasMore:boolean;page:number;perPage:number|false;total:number; };spans:object[]; }>
Retrieves paginated list of traces with optional filtering and sorting. This is the new API with improved filtering options.
Parameters
Section titled “Parameters”params?
Section titled “params?”Parameters for pagination, filtering, and ordering
after?
Section titled “after?”string
filters?
Section titled “filters?”{ endedAt?: { end?: unknown; endExclusive?: boolean; start?: unknown; startExclusive?: boolean; }; entityId?: string | null; entityName?: string | null; entityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null; entityVersionId?: string | null; environment?: string | null; experimentId?: string | null; hasChildError?: any; metadata?: Record<string, unknown> | null; organizationId?: string | null; parentEntityId?: string | null; parentEntityName?: string | null; parentEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null; parentEntityVersionId?: string | null; requestId?: string | null; resourceId?: string | null; rootEntityId?: string | null; rootEntityName?: string | null; rootEntityType?: AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null; rootEntityVersionId?: string | null; runId?: string | null; scope?: Record<string, unknown> | null; serviceName?: string | null; sessionId?: string | null; source?: string | null; spanType?: AGENT_RUN | SCORER_RUN | SCORER_STEP | GENERIC | MODEL_GENERATION | MODEL_STEP | MODEL_INFERENCE | MODEL_CHUNK | MCP_TOOL_CALL | PROCESSOR_RUN | TOOL_CALL | CLIENT_TOOL_CALL | WORKFLOW_RUN | WORKFLOW_STEP | WORKFLOW_CONDITIONAL | WORKFLOW_CONDITIONAL_EVAL | WORKFLOW_PARALLEL | WORKFLOW_LOOP | WORKFLOW_SLEEP | WORKFLOW_WAIT_EVENT | MEMORY_OPERATION | WORKSPACE_ACTION | RAG_INGESTION | RAG_EMBEDDING | RAG_VECTOR_OPERATION | RAG_ACTION | GRAPH_ACTION | MAPPING; startedAt?: { end?: unknown; endExclusive?: boolean; start?: unknown; startExclusive?: boolean; }; status?: SUCCESS | ERROR | RUNNING; tags?: string[] | null; threadId?: string | null; traceId?: string; userId?: string | null; }
filters.endedAt?
Section titled “filters.endedAt?”{ end?: unknown; endExclusive?: boolean; start?: unknown; startExclusive?: boolean; }
filters.endedAt.end?
Section titled “filters.endedAt.end?”unknown
filters.endedAt.endExclusive?
Section titled “filters.endedAt.endExclusive?”boolean
filters.endedAt.start?
Section titled “filters.endedAt.start?”unknown
filters.endedAt.startExclusive?
Section titled “filters.endedAt.startExclusive?”boolean
filters.entityId?
Section titled “filters.entityId?”string | null
filters.entityName?
Section titled “filters.entityName?”string | null
filters.entityType?
Section titled “filters.entityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null
filters.entityVersionId?
Section titled “filters.entityVersionId?”string | null
filters.environment?
Section titled “filters.environment?”string | null
filters.experimentId?
Section titled “filters.experimentId?”string | null
filters.hasChildError?
Section titled “filters.hasChildError?”any
filters.metadata?
Section titled “filters.metadata?”Record<string, unknown> | null
filters.organizationId?
Section titled “filters.organizationId?”string | null
filters.parentEntityId?
Section titled “filters.parentEntityId?”string | null
filters.parentEntityName?
Section titled “filters.parentEntityName?”string | null
filters.parentEntityType?
Section titled “filters.parentEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null
filters.parentEntityVersionId?
Section titled “filters.parentEntityVersionId?”string | null
filters.requestId?
Section titled “filters.requestId?”string | null
filters.resourceId?
Section titled “filters.resourceId?”string | null
filters.rootEntityId?
Section titled “filters.rootEntityId?”string | null
filters.rootEntityName?
Section titled “filters.rootEntityName?”string | null
filters.rootEntityType?
Section titled “filters.rootEntityType?”AGENT | SCORER | RAG_INGESTION | TRAJECTORY | INPUT_PROCESSOR | INPUT_STEP_PROCESSOR | OUTPUT_PROCESSOR | OUTPUT_STEP_PROCESSOR | WORKFLOW_STEP | TOOL | WORKFLOW_RUN | MEMORY | null
filters.rootEntityVersionId?
Section titled “filters.rootEntityVersionId?”string | null
filters.runId?
Section titled “filters.runId?”string | null
filters.scope?
Section titled “filters.scope?”Record<string, unknown> | null
filters.serviceName?
Section titled “filters.serviceName?”string | null
filters.sessionId?
Section titled “filters.sessionId?”string | null
filters.source?
Section titled “filters.source?”string | null
filters.spanType?
Section titled “filters.spanType?”AGENT_RUN | SCORER_RUN | SCORER_STEP | GENERIC | MODEL_GENERATION | MODEL_STEP | MODEL_INFERENCE | MODEL_CHUNK | MCP_TOOL_CALL | PROCESSOR_RUN | TOOL_CALL | CLIENT_TOOL_CALL | WORKFLOW_RUN | WORKFLOW_STEP | WORKFLOW_CONDITIONAL | WORKFLOW_CONDITIONAL_EVAL | WORKFLOW_PARALLEL | WORKFLOW_LOOP | WORKFLOW_SLEEP | WORKFLOW_WAIT_EVENT | MEMORY_OPERATION | WORKSPACE_ACTION | RAG_INGESTION | RAG_EMBEDDING | RAG_VECTOR_OPERATION | RAG_ACTION | GRAPH_ACTION | MAPPING
filters.startedAt?
Section titled “filters.startedAt?”{ end?: unknown; endExclusive?: boolean; start?: unknown; startExclusive?: boolean; }
filters.startedAt.end?
Section titled “filters.startedAt.end?”unknown
filters.startedAt.endExclusive?
Section titled “filters.startedAt.endExclusive?”boolean
filters.startedAt.start?
Section titled “filters.startedAt.start?”unknown
filters.startedAt.startExclusive?
Section titled “filters.startedAt.startExclusive?”boolean
filters.status?
Section titled “filters.status?”SUCCESS | ERROR | RUNNING
filters.tags?
Section titled “filters.tags?”string[] | null
filters.threadId?
Section titled “filters.threadId?”string | null
filters.traceId?
Section titled “filters.traceId?”string
filters.userId?
Section titled “filters.userId?”string | null
limit?
Section titled “limit?”unknown
"page" | "delta"
orderBy?
Section titled “orderBy?”{ direction?: "ASC" | "DESC"; field?: "endedAt" | "startedAt"; }
orderBy.direction?
Section titled “orderBy.direction?”"ASC" | "DESC"
orderBy.field?
Section titled “orderBy.field?”"endedAt" | "startedAt"
pagination?
Section titled “pagination?”{ page?: unknown; perPage?: unknown; }
pagination.page?
Section titled “pagination.page?”unknown
pagination.perPage?
Section titled “pagination.perPage?”unknown
Returns
Section titled “Returns”Promise<{ delta?: { hasMore: boolean; limit: number; }; deltaCursor?: string; pagination?: { hasMore: boolean; page: number; perPage: number | false; total: number; }; spans: object[]; }>
Promise containing paginated traces and pagination info
Inherited from
Section titled “Inherited from”MastraClient.listTraces
listVectors()
Section titled “listVectors()”listVectors():
Promise<{vectors:object[]; }>
Lists all available vector stores
Returns
Section titled “Returns”Promise<{ vectors: object[]; }>
Promise containing list of available vector stores
Inherited from
Section titled “Inherited from”MastraClient.listVectors
listWorkflows()
Section titled “listWorkflows()”listWorkflows(
requestContext?,partial?):Promise<Record<string,GetWorkflowResponse>>
Retrieves all available workflows
Parameters
Section titled “Parameters”requestContext?
Section titled “requestContext?”RequestContext<unknown> | Record<string, any>
Optional request context to pass as query parameter
partial?
Section titled “partial?”boolean
Returns
Section titled “Returns”Promise<Record<string, GetWorkflowResponse>>
Promise containing map of workflow IDs to workflow details
Inherited from
Section titled “Inherited from”MastraClient.listWorkflows
listWorkspaces()
Section titled “listWorkspaces()”listWorkspaces():
Promise<{workspaces:object[]; }>
Lists all workspaces from both Mastra instance and agents
Returns
Section titled “Returns”Promise<{ workspaces: object[]; }>
Promise containing array of workspace items
Inherited from
Section titled “Inherited from”MastraClient.listWorkspaces
models()
Section titled “models()”models(
signal?):Promise<object[]>
Fetch the cached Model Serving endpoint catalogue from
GET ${basePath}/models. Returns every endpoint the plugin
publishes (server-cached for ~5 minutes); callers filter to
chat-capable models for a picker.
Parameters
Section titled “Parameters”signal?
Section titled “signal?”AbortSignal
Returns
Section titled “Returns”Promise<object[]>
pauseSchedule()
Section titled “pauseSchedule()”pauseSchedule(
scheduleId):Promise<ScheduleResponse>
Pauses a schedule. The scheduler tick loop will skip paused schedules. Idempotent — pausing an already-paused schedule returns the current state unchanged. Pause status survives redeploys.
Parameters
Section titled “Parameters”scheduleId
Section titled “scheduleId”string
Returns
Section titled “Returns”Promise<ScheduleResponse>
Inherited from
Section titled “Inherited from”MastraClient.pauseSchedule
readMcpServerResource()
Section titled “readMcpServerResource()”readMcpServerResource(
serverId,uri):Promise<{contents:object[]; }>
Reads the content of a resource from an MCP server. Used for fetching ui:// MCP App HTML content.
Parameters
Section titled “Parameters”serverId
Section titled “serverId”string
The ID of the MCP server.
string
The resource URI to read.
Returns
Section titled “Returns”Promise<{ contents: object[]; }>
Promise containing the resource content.
Inherited from
Section titled “Inherited from”MastraClient.readMcpServerResource
removeThread()
Section titled “removeThread()”removeThread(
threadId,options?):Promise<{agentId:string;deleted:boolean;ok:true;threadId:string; }>
Delete a single conversation thread by id via the plugin’s own
DELETE ${basePath}/threads route (named removeThread to avoid
clashing with the inherited MastraClient.deleteThread, which hits
Mastra’s stock thread route rather than our OBO-scoped, custom
mount). The id is sent as the thread-selection header for this one
call, so the sidebar can remove any thread while the user stays on
another (routing is per call, never shared). Idempotent: deleting an unknown /
already-removed thread reports deleted: false without erroring.
Parameters
Section titled “Parameters”threadId
Section titled “threadId”string
options?
Section titled “options?”agentId?
Section titled “agentId?”string
signal?
Section titled “signal?”AbortSignal
Returns
Section titled “Returns”Promise<{ agentId: string; deleted: boolean; ok: true; threadId: string; }>
renameThread()
Section titled “renameThread()”renameThread(
threadId,title,options?):Promise<{agentId:string;ok:true;thread: {createdAt:string;id:string;metadata?:unknown;resourceId:string;title?:string;updatedAt:string; }; }>
Rename a single conversation thread via the plugin’s own
PATCH ${basePath}/threads route. The id travels as the
thread-selection header for this one call (mirroring
removeThread, so the sidebar can rename any thread; routing is
per call, never shared) and the new title rides in the JSON body. The server enforces ownership and
echoes back the updated thread, so the caller can reflect the new
title immediately. Throws on an unknown / unowned thread (HTTP 404).
Parameters
Section titled “Parameters”threadId
Section titled “threadId”string
string
options?
Section titled “options?”agentId?
Section titled “agentId?”string
signal?
Section titled “signal?”AbortSignal
Returns
Section titled “Returns”Promise<{ agentId: string; ok: true; thread: { createdAt: string; id: string; metadata?: unknown; resourceId: string; title?: string; updatedAt: string; }; }>
request()
Section titled “request()”request<
T>(path,options?):Promise<T>
Makes an HTTP request to the API with retries and exponential backoff
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”string
The API endpoint path (without prefix, e.g., ‘/agents’)
options?
Section titled “options?”RequestOptions
Optional request configuration
Returns
Section titled “Returns”Promise<T>
Promise containing the response data
Inherited from
Section titled “Inherited from”MastraClient.request
resumeSchedule()
Section titled “resumeSchedule()”resumeSchedule(
scheduleId):Promise<ScheduleResponse>
Resumes a paused schedule. Recomputes nextFireAt from ‘now’ so a long-paused schedule does not fire a backlog. Idempotent — resuming an already-active schedule returns the current state unchanged.
Parameters
Section titled “Parameters”scheduleId
Section titled “scheduleId”string
Returns
Section titled “Returns”Promise<ScheduleResponse>
Inherited from
Section titled “Inherited from”MastraClient.resumeSchedule
saveMessageToMemory()
Section titled “saveMessageToMemory()”saveMessageToMemory(
params):Promise<SaveMessageToMemoryResponse>
Saves messages to memory
Parameters
Section titled “Parameters”params
Section titled “params”SaveMessageToMemoryParams
Parameters containing messages to save and optional request context
Returns
Section titled “Returns”Promise<SaveMessageToMemoryResponse>
Promise containing the saved messages
Inherited from
Section titled “Inherited from”MastraClient.saveMessageToMemory
saveScore()
Section titled “saveScore()”saveScore(
params):Promise<SaveScoreResponse>
Saves a score
Parameters
Section titled “Parameters”params
Section titled “params”SaveScoreParams
Parameters containing the score data to save
Returns
Section titled “Returns”Promise<SaveScoreResponse>
Promise containing the saved score
Inherited from
Section titled “Inherited from”MastraClient.saveScore
score()
Section titled “score()”score(
params):Promise<{message:string;status:string; }>
Scores one or more traces using a specified scorer (fire-and-forget).
Parameters
Section titled “Parameters”params
Section titled “params”scorerName
Section titled “scorerName”string
targets
Section titled “targets”object[]
Returns
Section titled “Returns”Promise<{ message: string; status: string; }>
Inherited from
Section titled “Inherited from”MastraClient.score
searchBuilderRegistry()
Section titled “searchBuilderRegistry()”searchBuilderRegistry(
registryId,params):Promise<BuilderRegistrySearchResponse>
Search a builder skill registry. The registry must be enabled or the
server returns 404.
Requires stored-skills:read permission.
Parameters
Section titled “Parameters”registryId
Section titled “registryId”string
params
Section titled “params”limit?
Section titled “limit?”number
string
Returns
Section titled “Returns”Promise<BuilderRegistrySearchResponse>
Inherited from
Section titled “Inherited from”MastraClient.searchBuilderRegistry
searchMemory()
Section titled “searchMemory()”searchMemory(
__namedParameters):Promise<MemorySearchResponse>
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”agentId
Section titled “agentId”string
memoryConfig?
Section titled “memoryConfig?”any
requestContext?
Section titled “requestContext?”RequestContext<unknown> | Record<string, any>
resourceId
Section titled “resourceId”string
searchQuery
Section titled “searchQuery”string
threadId?
Section titled “threadId?”string
Returns
Section titled “Returns”Promise<MemorySearchResponse>
Inherited from
Section titled “Inherited from”MastraClient.searchMemory
statement()
Section titled “statement()”statement(
id,signal?):Promise<{columns:string[];rowCount:number;rows:Record<string,unknown>[];truncated:boolean; } |undefined>
Resolve a [data:<id>] marker from
GET ${basePath}/embed/data/:id. Returns the same coerced rows the
get_statement tool produced for the model. A 404 resolves to
undefined.
Parameters
Section titled “Parameters”string
signal?
Section titled “signal?”AbortSignal
Returns
Section titled “Returns”Promise<{ columns: string[]; rowCount: number; rows: Record<string, unknown>[]; truncated: boolean; } | undefined>
streamAgent()
Section titled “streamAgent()”streamAgent(
params):Promise<MastraStreamResponse>
Open an agent stream for one conversation turn, routed and cancelled
PER CALL. Posts to the agent /stream route with this run’s own thread
id + model as request headers and its own AbortSignal on the fetch, so
many threads can stream at once and aborting one leaves the others
untouched. Reads the SSE directly (like the tool-approval streams) rather
than through the inherited agent.stream(), whose shared-client headers
and single client-level abort signal can’t isolate concurrent runs.
Parameters
Section titled “Parameters”params
Section titled “params”agentId
Section titled “agentId”string
messages
Section titled “messages”object[]
model?
Section titled “model?”string
string
signal?
Section titled “signal?”AbortSignal
threadId?
Section titled “threadId?”string
Returns
Section titled “Returns”Promise<MastraStreamResponse>
streamBackgroundTasks()
Section titled “streamBackgroundTasks()”streamBackgroundTasks(
params?):Promise<ReadableStream<any>>
Opens an SSE stream of background task events (completed/failed). Returns a Response that can be consumed as a ReadableStream.
Parameters
Section titled “Parameters”params?
Section titled “params?”agentId?
Section titled “agentId?”string
resourceId?
Section titled “resourceId?”string
runId?
Section titled “runId?”string
taskId?
Section titled “taskId?”string
threadId?
Section titled “threadId?”string
Returns
Section titled “Returns”Promise<ReadableStream<any>>
Inherited from
Section titled “Inherited from”MastraClient.streamBackgroundTasks
suggestions()
Section titled “suggestions()”suggestions(
agentId?,signal?):Promise<string[]>
Fetch the curated starter questions for agentId’s Genie space
from GET ${basePath}/suggestions. Empty when the agent has no
Genie space (or it defines none).
Parameters
Section titled “Parameters”agentId?
Section titled “agentId?”string
signal?
Section titled “signal?”AbortSignal
Returns
Section titled “Returns”Promise<string[]>
threads()
Section titled “threads()”threads(
options?):Promise<{hasMore:boolean;page:number;perPage:number;threads:object[];total:number; }>
Fetch one page of the caller’s conversation threads from
GET ${basePath}/threads, newest first. Used to render the
conversation list / sidebar so the user can switch between the
threads they own for this resource. Scoped server-side to the
caller’s resource id, so it only ever returns the user’s own
conversations.
Parameters
Section titled “Parameters”options?
Section titled “options?”agentId?
Section titled “agentId?”string
number
perPage?
Section titled “perPage?”number
signal?
Section titled “signal?”AbortSignal
Returns
Section titled “Returns”Promise<{ hasMore: boolean; page: number; perPage: number; threads: object[]; total: number; }>
triggerDatasetExperiment()
Section titled “triggerDatasetExperiment()”triggerDatasetExperiment(
params):Promise<{completedAt:string|Date|null;experimentId:string;failedCount:number;results:object[];startedAt:string|Date;status:"running"|"pending"|"completed"|"failed";succeededCount:number;totalItems:number; }>
Triggers a new dataset experiment
Parameters
Section titled “Parameters”params
Section titled “params”TriggerDatasetExperimentParams
Returns
Section titled “Returns”Promise<{ completedAt: string | Date | null; experimentId: string; failedCount: number; results: object[]; startedAt: string | Date; status: "running" | "pending" | "completed" | "failed"; succeededCount: number; totalItems: number; }>
Inherited from
Section titled “Inherited from”MastraClient.triggerDatasetExperiment
updateDataset()
Section titled “updateDataset()”updateDataset(
params):Promise<DatasetRecord>
Updates a dataset
Parameters
Section titled “Parameters”params
Section titled “params”UpdateDatasetParams
Returns
Section titled “Returns”Promise<DatasetRecord>
Inherited from
Section titled “Inherited from”MastraClient.updateDataset
updateDatasetExperimentResult()
Section titled “updateDatasetExperimentResult()”updateDatasetExperimentResult(
params):Promise<DatasetExperimentResult>
Updates an experiment result’s status and/or tags
Parameters
Section titled “Parameters”params
Section titled “params”UpdateExperimentResultParams
Returns
Section titled “Returns”Promise<DatasetExperimentResult>
Inherited from
Section titled “Inherited from”MastraClient.updateDatasetExperimentResult
updateDatasetItem()
Section titled “updateDatasetItem()”updateDatasetItem(
params):Promise<DatasetItem>
Updates a dataset item
Parameters
Section titled “Parameters”params
Section titled “params”UpdateDatasetItemParams
Returns
Section titled “Returns”Promise<DatasetItem>
Inherited from
Section titled “Inherited from”MastraClient.updateDatasetItem
updateExperimentResult()
Section titled “updateExperimentResult()”updateExperimentResult(
params):Promise<DatasetExperimentResult>
Updates the status and/or tags on an experiment result
Parameters
Section titled “Parameters”params
Section titled “params”UpdateExperimentResultParams
Returns
Section titled “Returns”Promise<DatasetExperimentResult>
Inherited from
Section titled “Inherited from”MastraClient.updateExperimentResult
updateWorkingMemory()
Section titled “updateWorkingMemory()”updateWorkingMemory(
agentId):Promise<unknown>
Updates the working memory for a specific thread (optionally resource-scoped).
Parameters
Section titled “Parameters”agentId
Section titled “agentId”ID of the agent.
agentId
Section titled “agentId”string
requestContext?
Section titled “requestContext?”RequestContext<unknown> | Record<string, any>
resourceId?
Section titled “resourceId?”string
threadId
Section titled “threadId”string
workingMemory
Section titled “workingMemory”string
Returns
Section titled “Returns”Promise<unknown>
Inherited from
Section titled “Inherited from”MastraClient.updateWorkingMemory