Agent
A stable public ID with a semantic version and reviewed JSON schemas.
The AI native company for Healthcare
Published agents
A published agent is XY's highest-level, reviewed API product: stable schemas, versioned setup, required connections, asynchronous executions, optional human review, and approved metrics.
Resource model
A stable public ID with a semantic version and reviewed JSON schemas.
One exact version plus organization configuration, sources, and connection state.
One idempotently created asynchronous run with its own public status and result.
Discover
# The catalog contains only published versions entitled to your organization.
curl --fail-with-body \
--header "Authorization: Bearer ${XY_API_KEY}" \
"${XY_API_BASE}/agents"
# Agent detail is the contract for setup, input, output, errors, sources,
# required connections, triggers, and supported metrics.
curl --fail-with-body \
--header "Authorization: Bearer ${XY_API_KEY}" \
"${XY_API_BASE}/agents/${AGENT_ID}"Install and connect
curl --fail-with-body --request POST \
--header "Authorization: Bearer ${XY_API_KEY}" \
--header "Idempotency-Key: ${AGENT_ID}-installation-v1" \
--header "Content-Type: application/json" \
"${XY_API_BASE}/agents/${AGENT_ID}/installations" \
--data @installation-setup.json
# Always follow the returned state and next_action instead of assuming readiness.
curl --fail-with-body \
--header "Authorization: Bearer ${XY_API_KEY}" \
"${XY_API_BASE}/installations/${INSTALLATION_ID}"# Only when the installation returns an authorization next_action.
curl --fail-with-body --request POST \
--header "Authorization: Bearer ${XY_API_KEY}" \
--header "Content-Type: application/json" \
"${XY_API_BASE}/installations/${INSTALLATION_ID}/authorization-actions" \
--data '{"connection":"gmail"}'
# Send/open the returned short-lived hosted connection URL for an administrator.
# Then poll the installation or list its authorization actions.Knowledge Base installations use source actions rather than OAuth. See the dedicated guide for URL crawling, signed file uploads, readiness, and querying.
Execute
curl --fail-with-body --request POST \
--header "Authorization: Bearer ${XY_API_KEY}" \
--header "Idempotency-Key: partner-job-1842" \
--header "Content-Type: application/json" \
"${XY_API_BASE}/installations/${INSTALLATION_ID}/executions" \
--data '{
"input": {},
"metadata": {"partner_reference": "job-1842"}
}'
curl --fail-with-body \
--header "Authorization: Bearer ${XY_API_KEY}" \
"${XY_API_BASE}/executions/${EXECUTION_ID}"Human review
# Read open work produced by entitled agent executions.
curl --fail-with-body \
--header "Authorization: Bearer ${XY_API_KEY}" \
"${XY_API_BASE}/review-items?installation_id=${INSTALLATION_ID}"
# Decisions are per item; partial success is a normal batch result.
curl --fail-with-body --request POST \
--header "Authorization: Bearer ${XY_API_KEY}" \
--header "Content-Type: application/json" \
"${XY_API_BASE}/review-items/decisions" \
--data '{
"item_ids": ["item_REPLACE"],
"decision": "approve",
"note": "Validated against the source record."
}'Observe
# Stable aggregate facts. FROM and TO are timezone-aware ISO-8601 timestamps.
# FROM must be earlier than TO and the interval must fit the server's maximum window.
curl --fail-with-body \
--header "Authorization: Bearer ${XY_API_KEY}" \
"${XY_API_BASE}/installations/${INSTALLATION_ID}/metrics?from=${FROM}&to=${TO}"
# Discover XY's approved metric views for this installation.
curl --fail-with-body \
--header "Authorization: Bearer ${XY_API_KEY}" \
"${XY_API_BASE}/installations/${INSTALLATION_ID}/metrics/dashboards"
# Receive visualization metadata plus aliased data rows. Render it in your UI.
# Metric-view FROM_DATE and TO_DATE are YYYY-MM-DD calendar dates. Supply both,
# keep FROM_DATE on or before TO_DATE, and stay within the maximum window.
curl --fail-with-body \
--header "Authorization: Bearer ${XY_API_KEY}" \
"${XY_API_BASE}/installations/${INSTALLATION_ID}/metrics/dashboards/operations?from=${FROM_DATE}&to=${TO_DATE}"Read safe progress for one public execution without mutating its run.
Measure the installed agent's approved organization-scoped outcomes.
Aggregate across entitled installations using the advertised metrics profile.