Skip to main content
Extract parties, effective dates, terms, and clauses into a typed structure for downstream review. Use stable clause categories so review tools can filter the result.
The Literal on category is what makes the output usable. Downstream review queues filter by category, so the categories must be a closed set. Free-text categories are unfilterable.

Review queues by clause type

Once clauses carry a category, route them by team. Indemnification and limitation-of-liability go to legal; payment and term go to finance.
route_for_review operates on the typed result. Each clause retains its verbatim text and page for review.

Diff against a template

For contract review, the question is often “what changed from our standard?” Extract both the incoming contract and your template into the same Contract schema, then diff by category.
Clauses group into lists because one category often holds several clauses (other usually does). Sorting keeps the comparison order-independent. For a richer comparison, hand both contracts to a reviewer agent with output_schema set to a ClauseDelta model and let the model summarize the differences.

Long contracts and chunking

Agno sends the PDF to the model as a single file input: a URL reference when you pass File(url=...), or base64-encoded bytes when you pass filepath or content. Nothing splits the document on the way, so the provider’s file-size and context limits bound what one call can take. For contracts over that limit, split by section in your own code and run the agent per chunk. The schema is the same; you concatenate the clauses lists at the end.

Next steps

Developer Resources