-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
AgentsIssues regarding Mastra's Agent primitiveIssues regarding Mastra's Agent primitivebugSomething isn't workingSomething isn't workingp: urgentUrgent priorityUrgent priority
Description
Problem Statement
You currently cannot use a JSONSchema7
as output
with agent.generateVNext
Type 'JSONSchema7' is not assignable to type 'OutputSchema'.
Type 'JSONSchema7' is missing the following properties from type 'ZodType<any, any, $ZodTypeInternals<any, any>>': def, _def, _output, _input, and 30 more.ts(2322)
Proposed Solution
ensure support for JSONSchema7
for output
Component
Agents
Alternatives Considered
No response
Example Use Case
const jsonSchema: JSONSchema7 = {
type: "object",
properties: {
name: { type: "string" },
age: { type: "number" },
city: { type: "string" },
preferences: {
type: "object",
properties: {
theme: { type: "string" },
notifications: { type: "boolean" },
},
},
},
required: ["name", "city"],
};
agent.generateVNext('...', {
//...
output: jsonSchema
})
Additional Context
No response
Verification
- I have searched the existing issues to make sure this is not a duplicate
- I have provided sufficient context for the team to understand the request
Metadata
Metadata
Assignees
Labels
AgentsIssues regarding Mastra's Agent primitiveIssues regarding Mastra's Agent primitivebugSomething isn't workingSomething isn't workingp: urgentUrgent priorityUrgent priority