CRMPipelineObservation is the structured payload your agent receives after every interaction with the environment. It is returned by both POST /step and POST /reset, wrapped inside a CRMStepResult container. Each observation gives you a complete picture of the environment state — what data sources are available, what the current view looks like, any data quality findings from profiling, and direct feedback on whether your last action succeeded or failed. Reading the observation carefully is how your agent decides its next move.
Response Envelope
Every response fromPOST /step and POST /reset is wrapped in the CRMStepResult container. The observation key holds the CRMPipelineObservation fields, while reward and done are also hoisted to the top level for convenience:
The
CRMDataPipelineEnvClient._parse_result() method in client.py reads from payload["observation"] first and falls back to the top-level payload if the key is absent. This means the client handles both the wrapped and flat formats transparently.Example Observation
The following is a representativeCRMPipelineObservation JSON body after a successful PROFILE_SOURCE action on the web_forms source in Task 1:
Fields
boolean
required
true only after a successful SUBMIT_PIPELINE action that passes the minimum-steps guard (at least 3 prior cleaning actions). When done is true, the episode is over and the grader has captured your final DataFrame. Attempting to send further POST /step requests after done=true will start a new episode step, not a new episode — call POST /reset to begin fresh.float | null
The step reward earned for the action that produced this observation. Rewards are dense and action-specific:
reward is null immediately after POST /reset because no action has been taken yet.string
required
A human-readable description of the active task. The string is set at episode reset time and does not change during the episode. Use it to understand what the grader will evaluate:
The full task description including data quality expectations is embedded here — read it carefully at the start of each episode.
Dict[string, string]
required
The expected output schema the grader enforces. Keys are the column names your final DataFrame must contain; values are human-readable format descriptions. The grader performs exact string matching (case-insensitive, stripped) between your output and the hidden ground truth on every column except Task 3
customer_id (used as the join key).Task 1 / Task 2 schema_target:schema_target:List[string]
required
The list of DataFrame names currently registered in the environment session. This list grows as you create new sources via
EXECUTE_SQL (writes to output_table) or MERGE_SOURCES (writes to output_table, typically "merged_output"). All source names in this list are valid values for the source, source2, and final_source action fields.string
required
A Markdown-formatted table preview of the most recently viewed or modified DataFrame. Updated after Use
VIEW_SOURCE, STANDARDIZE_COLUMN, HANDLE_MISSING, DEDUPLICATE, MERGE_SOURCES, and EXECUTE_SQL. Shows the first 3 rows of the target source.current_view to visually confirm that your transformations are having the expected effect before continuing to the next step. After POST /reset, this field contains "Select a source to view." as a placeholder.string | null
A per-column quality summary populated only after a successful
PROFILE_SOURCE action. Each line follows the format - **<column>**: type=<dtype>, nulls=<count>. For all other action types this field is an empty string (not null) in the server response, though the Pydantic field is declared Optional[str].Example output after PROFILE_SOURCE on web_forms:string
required
Always present. Contains a human-readable summary of the outcome of the most recent action. On success it describes what was done (e.g.,
"Standardized web_forms.email using LOWERCASE_STRIP"). On failure it begins with the prefix "Error: " followed by the exception message.Dict[string, string] | null
Present only in Task 3 (Use these labels to decide which
task_id="t3"); null for Tasks 1 and 2. Maps column names to string labels describing the conflict resolution priority across the three sources (salesforce, web_leads, legacy_db).Task 3 conflict_rules:ConflictRule enum value to pass in your MERGE_SOURCES actions: