zai.extract() takes unstructured text and a schema, and returns typed structured data. The LLM reads the text and fills in the schema fields.
Basic usage
Complex schemas
Extract nested objects and arrays:Example: classifying emails
extract() works anywhere in your agent. Here it’s used inside a workflow step to parse and classify incoming emails: