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

# Collections

> Group documents together for organized analysis and multi-document workflows

## Overview

Collections let you group related documents into named sets. One document can belong to multiple collections — perfect for organizing by project, client, quarter, or any category that fits your workflow.

<Info>
  **Many-to-many grouping.** A single annual report can live in both "ACME Corp" and "Q4 2025 Filings" at the same time.
</Info>

## What You Can Do

<CardGroup cols={2}>
  <Card title="Organize by Project" icon="folder-open">
    Group all documents for a deal, audit, or research project
  </Card>

  <Card title="Chat with Collections" icon="messages">
    Open a chat session scoped to a collection of documents
  </Card>

  <Card title="Flexible Membership" icon="arrows-turn-right">
    Add or remove documents at any time — no rigid folder hierarchy
  </Card>

  <Card title="CLI & API" icon="terminal">
    Manage collections programmatically via the REST API or CLI
  </Card>
</CardGroup>

## How It Works

1. **Create** a collection with a name and optional description
2. **Add documents** by their job IDs — existing completed extractions
3. **Query** the collection to see all documents and their status
4. **Chat** with the collection via CLI (`okra chat -c "My Collection"`)

## Example: Financial Analysis Pipeline

```bash theme={null}
# Create a collection for Q4 earnings
okra collections create "Q4 2025 Earnings" -d "Quarterly filings for portfolio companies"

# Add completed extraction jobs
okra collections add "Q4 2025 Earnings" ocr-abc123 ocr-def456 ocr-ghi789

# List documents in the collection
okra collections show "Q4 2025 Earnings"

# Chat with the collection
okra chat -c "Q4 2025 Earnings" -m "Compare revenue growth across all companies"
```

## Next Steps

<CardGroup cols={2}>
  <Card title="CLI Reference" icon="terminal" href="/cli/collections">
    Full CLI command reference for collections
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/collections/list-collections">
    Manage collections via the REST API
  </Card>
</CardGroup>
