---
title: "Agents Setup"
method: POST
path: "/api/agents/setup"
---

# Agents Setup

`POST /api/agents/setup`

## Request

- Base URL: `https://opwhcervi3.execute-api.ca-central-1.amazonaws.com`
- URL: `https://opwhcervi3.execute-api.ca-central-1.amazonaws.com/api/agents/setup`
- Auth: API key in header `X-Api-Key`

Analyzes local capture, historian, or export metadata to prepare agent mappings; it does not read a customer system directly. An API key is required. It consumes no run or quota, has no billing/email side effect, and returns local setup guidance.

## Headers

- `X-Api-Key` string, nullable

## Request body

- AgentSetupRequest
  - `captured` AgentSetupCapturedRecord[]
    - `current` boolean, nullable
    - `name` string, nullable
    - `path` string, nullable
    - `payload_sample` unknown
    - `retained` boolean, nullable
    - `source_type` 'mqtt' | 'historian' | 'file' | 'api' | 'unknown', nullable
    - `tag` string, nullable
    - `topic` string, nullable
    - `ts` string, date-time, nullable
  - `site_profile` AgentSetupSiteProfile
    - `line` string, nullable
    - `plant` string, nullable
    - `reporting_window` string, nullable
    - `shift_label` string, nullable
    - `site` string, nullable
    - `timezone` string, nullable
  - `target_agents` string[], nullable

## Response `200`

Successful Response

- AgentSetupResponse
  - `config` object, nullable
  - `health` 'healthy' | 'partial' | 'not-ready', required
  - `manifests` AgentCapabilityManifest[], required
    - `capabilities` string[], required
    - `capability` 'shift-report' | 'oee-narrator' | 'alarm-triage' | 'maintenance-copilot' | 'root-cause' | 'architect', required
    - `endpoint` string, required
    - `local_permissions` string[], required
    - `min_router_version` string, required
    - `requires` object, required
    - `schedule_support` boolean, required
    - `setup` object, required
    - `supported_runtimes` string[], required
    - `version` string, required
  - `mapping` object, required
  - `namespace_recommendations` object[]
  - `next_steps` string[]
  - `problems` string[]
  - `target_agents` string[], required

## Other responses

- `401`: Missing, malformed, or invalid credentials.
- `402`: Credentials are valid but the account's plan does not include this capability (for example, Try Pro is used up and dxpert Pro is not active).
- `422`: Validation Error

---

[API](https://skmtc.dev/dxpert/apis/dxpert-ai-api.md) · [All operations](https://skmtc.dev/dxpert/apis/dxpert-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dxpert/apis/dxpert-ai-api/revisions/460f1c8c53d1?raw)
