> ## Documentation Index
> Fetch the complete documentation index at: https://ritika-fa61c43f.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CRM Data Pipeline Environment

> A production-grade OpenEnv benchmark where AI agents clean, standardize, and merge messy enterprise CRM data from Salesforce, Web Leads, and Legacy Databases.

The CRM Data Pipeline Environment is an OpenEnv-compliant benchmark that puts autonomous AI agents to work as real data engineers. Your agent receives messy, incomplete CRM records from multiple enterprise sources and must profile, clean, standardize, and merge them into an analytics-ready master dataset — all through a typed REST API.

> [card] [Quick Start](https://ritika-fa61c43f.mintlify.site/quickstart.md)
>
> Spin up the environment and run your first agent loop in minutes.

> [card] [Action Space](https://ritika-fa61c43f.mintlify.site/concepts/action-space.md)
>
> Explore all 8 action types your agent can execute.

> [card] [API Reference](https://ritika-fa61c43f.mintlify.site/api/overview.md)
>
> Full REST endpoint reference with request/response schemas.

> [card] [Task Catalogue](https://ritika-fa61c43f.mintlify.site/task-catalogue.md)
>
> Three difficulty tiers — Easy, Medium, and Hard — with escalating complexity.

## How It Works

The environment runs as a FastAPI server. Your agent interacts with it through three core endpoints — `/reset`, `/step`, and `/state` — and submits its cleaned dataset when ready. A hidden grader engine scores the final output against ground truth.

```mermaid theme={null}
graph LR
    A[Your Agent] -->|POST /reset| B[Environment Server]
    B -->|Observation| A
    A -->|POST /step with Action| B
    B -->|Observation + Reward| A
    A -->|SUBMIT_PIPELINE action| C[Grader Engine]
    C -->|Score 0.0 - 1.0| A
```

**1. Start the server**

Run the environment locally or via Docker. It listens on port `8080`.

**2. Reset to begin an episode**

`POST /reset` initializes a fresh episode, loads messy CRM data, and returns your first observation with the task objective and available data sources.

**3. Execute cleaning actions**

Your agent sends `POST /step` with a `CRMPipelineAction` payload — view data, profile columns, standardize formats, handle missing values, deduplicate records, or run SQL joins.

**4. Submit and get scored**

Send `SUBMIT_PIPELINE` to trigger the grader. It compares your final dataset against hidden ground truth and returns a score from `0.0` to `1.0`.

## Task Difficulty Levels

> [card] [Task 1 — Easy](https://ritika-fa61c43f.mintlify.site/task-catalogue.md#task-1-easy-web-forms-normalization)
>
> Normalize a single `web_forms` dataset. Fix dates, lowercase emails, strip spaces.

> [card] [Task 2 — Medium](https://ritika-fa61c43f.mintlify.site/task-catalogue.md#task-2-medium-legacy-db-deduplication)
>
> Merge `web_forms` and `legacy_db`. Handle schema mismatches and deduplicate records.

> [card] [Task 3 — Hard](https://ritika-fa61c43f.mintlify.site/task-catalogue.md#task-3-hard-3-way-enterprise-merge)
>
> 3-way merge across Salesforce, Web Leads, and Legacy DB with conflict resolution rules.

## Key Capabilities

> [card] [Architecture & POMDP Model](https://ritika-fa61c43f.mintlify.site/architecture.md)
>
> Understand the environment's state machine, reward signals, and data flow.

> [card] [Writing an Agent](https://ritika-fa61c43f.mintlify.site/guides/writing-an-agent.md)
>
> Step-by-step guide to building a custom agent that interacts with the pipeline.

> [card] [Data Engine](https://ritika-fa61c43f.mintlify.site/data-engine/data-sources.md)
>
> Deep-dive into data sources, generation logic, and all standardization strategies.

> [card] [Grading & Scoring](https://ritika-fa61c43f.mintlify.site/guides/grading-scoring.md)
>
> Understand exactly how your agent's output is evaluated and scored.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.