Skip to content
Back to the app

Monitor Production Quality on a Schedule ​

Time: 40 minutes · Level: Intermediate · Runs on: the web app, then on a schedule

You will run the Manufacturing agent on a shift's inspection data, send any shift with defects to a QC lead before the production plan is approved, and run it after every shift.

You need: an account, and either an export of inspection results (CSV) or a PostgreSQL or MySQL database that holds them.


1. Open the Manufacturing agent ​

Open Agents → Manufacturing and choose Launch Agent, or go to /agentflow?type=manufacturing. Choose Technical to see the canvas:

StepWhat it does
Plant SupervisorCoordinates the specialist steps across the plant
Production PlannerSchedules production runs and resources
Quality InspectorReviews quality data and flags defects
Inventory ManagerTracks stock levels and reorder points
Production Plan ApprovalPauses for a person before the plan is acted on
Maintenance SchedulerPlans maintenance
Production ReportThe final report

2. Give it the shift's data ​

Either attach a file to each run, or connect a database once.

Attach a file. In step 3, add the export under Attach files (optional). Each step reads it before it starts.

Connect your database. Click Quality Inspector, open the Integrations tab, choose SQL Database, and enter the Dialect (postgresql or mysql), host, port, database, username and password. The step can then query your tables. Queries are read-only: anything other than a read is refused, so the agent cannot change your data, and reads do not wait for approval. The Manufacturing agent can also read SAP (OData), your MES and your WMS, and post to Slack.

3. Run it once by hand ​

  1. Choose Execute. In Run Parameters:
    • Product / Production Line (required), e.g. "Line 3, M8 fasteners"
    • optionally Plant / Facility, Quality Standard (ISO 9001, Six Sigma, GMP, IATF 16949 or Custom), Known Defect Types, Target Yield (%), Shift / Period and Report Recipient
    • Attach files (optional): the shift's inspection export, if you did not connect a database
  2. Choose ▶ Run Workflow.

The run pauses at Production Plan Approval. Approve it in the Approvals tab or in Workspace → Approvals. Then read each step in Results: its summary, its findings (each with a severity and the evidence it relied on), and its figures, each marked as from your data, calculated, or an estimate.

4. Send shifts with defects to a QC lead ​

  1. Delete the connection from Quality Inspector to Production Plan Approval.
  2. From Agent Library → Control Flow, drag an If / Else onto the canvas and connect Quality Inspector to it.
  3. Connect its TRUE output to Production Plan Approval.
  4. From Utilities, drag a Human Review, title it "QC lead review", connect the FALSE output to it, and connect it on to Production Plan Approval.
  5. Click the If / Else and set Field results.quality-inspector.findings, Operatoris empty, then Save.

A shift where the inspector raised no findings goes straight to the plan approval. A shift with findings stops at QC lead review first, so the QC lead sees the defects and their evidence before anyone approves the plan.

To alert a channel, connect Slack on a step's Integrations tab (bot token and default channel). Posting a message changes another system, so each post waits in Approvals unless your organisation has allowed that tool to run without asking (an admin sets this in Workspace → Vault → Guardrails).

5. Release it ​

Choose Save, then in the Studio tab Rehearse → Save and rehearse, and Release → Submit for review. An admin or owner other than you approves it under Workspace → Workshop → Review queue. See Release a Workflow Safely.

6. Run it on a schedule ​

A schedule runs the workflow's approved release. A workflow that has never been released runs its saved version.

There is no screen for creating schedules yet. The Schedule row on the canvas Triggers card records your choice on the canvas only and does not start runs. Create the schedule through the API while signed in. Schedules accept your sign-in session token, not an API key.

bash
curl -X POST https://changents.ai/api/schedules \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "workflowId": "YOUR_WORKFLOW_ID",
    "name": "Line 3 after each shift",
    "cronExpression": "0 6,14,22 * * *",
    "timezone": "Asia/Singapore",
    "inputs": { "productLine": "Line 3, M8 fasteners", "qualityStandard": "ISO 9001" }
  }'
  • cronExpression has five fields (minute, hour, day of month, month, day of week); a sixth is accepted. The example runs at 06:00, 14:00 and 22:00.
  • timezone defaults to UTC.
  • inputs are the run form's fields, by key.
  • Pause with PATCH /api/schedules/{id}/pause, resume with .../resume, and delete with DELETE /api/schedules/{id}.

Your schedules are listed under Workspace → Schedules. Each scheduled run appears under Workspace → Runs, and its approval steps wait in Approvals like any other run.


What's next? ​

Served from this deployment. No page view leaves it.