KaibanJS v0.13.0 🚀
Structured Output with Zod
const task = new Task({
description: "Extract article metadata",
expectedOutput: "Get the article's title and list of tags",
outputSchema: z.object({
title: z.string(),
tags: z.array(z.string())
})
});
New Feature: Structured Output 🎯
- Define exact output structures for your agent tasks
- Runtime validation using Zod schemas
- Automatic error recovery and correction
- Full integration with workflowLogs for monitoring
- Check the docs
Key Capabilities
- ✨ Type-safe outputs with Zod schemas
- 🔄 Automatic validation and correction
- 📊 Complex data structure support
- 🛡️ Runtime type safety
- 📝 Detailed validation feedback
Use Cases
These new structured output capabilities enable:
- Data extraction with guaranteed formats
- Complex form filling with validation
- API response formatting
- Structured report generation
Some example applications:
- Extract product information in consistent formats
- Generate standardized meeting summaries
- Create structured API responses
- Process form submissions with validation
Contributors
Special thanks to @anthonydevs17 for their significant contributions to this feature! 🙏
Thanks also to @harris0n.
We're excited to see what structured workflows you'll create! Share your schemas and feedback with us on GitHub.