> ## Documentation Index
> Fetch the complete documentation index at: https://developers.luminpdf.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Agreements

> Generate and download AgreementGen documents from templates.

The Agreements API powers [**AgreementGen**](https://www.luminpdf.com/app/generate) — Lumin's automated document generation engine. Use it to create personalized, ready-to-download documents from AgreementGen templates without any manual editing.

## Key concepts

* **AgreementGen Template** (`ag_` prefix) — a template designed specifically for automated document generation. Templates contain placeholder fields and optional variables/collections for dynamic data.
* **Agreement** — a generated document produced by filling an AgreementGen template with your data. Once created, the document can be downloaded as a PDF.
* **Collections** — groups of repeating variables within a template, commonly used for line items, table rows, or lists of entries in the generated document.

## Typical workflow

1. **Find a template** — use the [Templates API](/tabs/api-reference/api/templates/templates) to list available templates and get field details for an `ag_` template.
2. **Create an Agreement** — fill in the template fields (and collections if applicable) to generate the document.
3. **Download the file** — retrieve the generated PDF as a signed URL or binary data.

## Available endpoints

<CardGroup cols={2}>
  <Card title="Create Agreement" icon="file-contract" href="/tabs/api-reference/api/agreements/create-agreement">
    Create a new AgreementGen document from an AgreementGen template.
  </Card>

  <Card title="Get Agreement File" icon="download" href="/tabs/api-reference/api/agreements/get-agreement-file">
    Obtain a downloadable file or binary PDF data from an AgreementGen document.
  </Card>
</CardGroup>
