Skip to main content
The CRM Data Pipeline server is a FastAPI application implementing the OpenEnv protocol. It exposes a deterministic REST interface through which an agent submits data engineering actions, receives structured observations, and accumulates rewards across a fully episodic POMDP session. Every request and response is JSON. There is no authentication — the environment is designed as a self-contained benchmark isolated from external systems.

Base URL

The server binds to port 8080 in all deployment modes. All examples in this reference use http://localhost:8080. Substitute your Space URL when running on HuggingFace.

Verifying the Server

Before running any episode, confirm the server is reachable with the health-check endpoint:
A healthy server always returns:
If you receive a connection error, confirm that the Docker container has finished starting up and that port 8080 is not already in use on your host. The server is started via uvicorn bound to 0.0.0.0:8080.

Available Endpoints

The /reset, /step, and /state endpoints are automatically provisioned by the OpenEnv core create_fastapi_app factory. The /grader/{episode_id} endpoint is a custom addition specific to this environment.

Request and Response Format

All POST endpoints accept and return application/json. Set the Content-Type header on every POST request:
Responses always contain a top-level observation object (of type CRMPipelineObservation), alongside top-level reward and done scalar fields that mirror the values inside the observation for convenience.

Authentication

This environment requires no authentication. It is designed as an isolated, single-tenant benchmark. There are no API keys, OAuth tokens, or signed headers. If you expose the server publicly, apply your own network-layer controls.

Typical Episode Flow

A complete agent run follows this sequence exactly:
You must call POST /reset before any other endpoint. Calling /step or /grader without a prior /reset will return a 400 or 404 error because no episode context exists in server memory.

Endpoint Reference Pages

POST /reset

Initialize a fresh episode, load messy CRM data for the configured task, and receive the first observation.

POST /step

Execute a typed data engineering action — profile, standardize, merge, run SQL, deduplicate, or submit.

GET /state

Retrieve the current episode UUID, step counter, and active task ID without mutating any state.

POST /grader/{episode_id}

Compare your agent’s final DataFrame against the hidden ground truth and receive a normalized score from 0.01 to 0.99.