Agent
A stable public ID with a semantic version and reviewed JSON schemas.
The AI native company for Healthcare
Agent discovery and catalog
Estimate whether a task can become an XY workflow, match it to the agents in XY Discover, then capture the customer-specific details through a structured request. Published, entitled agents are a separate catalog you can install and run directly.
Discover agents
# Browse the same agent cards shown in XY Discover.
curl --fail-with-body \
--header "Authorization: Bearer ${XY_API_KEY}" \
"${XY_API_BASE}/discovery/agents"
# Describe the work. A display name and labor baseline are optional; no agent ID is needed.
# XY first scores whether each task can become a workflow, then scores agent matches.
# One task may match several agents, and the same agent may match several tasks.
curl --fail-with-body --request POST \
--header "Authorization: Bearer ${XY_API_KEY}" \
--header "Content-Type: application/json" \
"${XY_API_BASE}/discovery/matches" \
--data '{
"tasks": [
{
"name": "Application follow-up",
"description": "Our team checks incoming applications for missing documents and follows up by email",
"labor_baseline": {
"human_hours_per_month": 160,
"fully_loaded_hourly_cost_usd": 62.5,
"remaining_human_hours_per_month": 24,
"work_units_per_month": 800
}
},
{"description": "Our finance team compares bank deposits with open invoices and investigates differences"}
]
}'# Example fields from the response (full card data omitted):
capability_profile_version "2026-09-29" # XY capability rubric
results[0].task_id "task-1" # XY-generated handle
results[0].agentizability.score 0.91 # feasibility, not effort saved
results[0].agentizability.label "high"
results[0].agentizability.reason "Digital inputs and a clear outcome..."
results[0].labor_value.currency "USD"
results[0].labor_value.period "month"
results[0].labor_value.addressable_labor_value_usd 10000 # current human labor cost
results[0].labor_value.estimated_net_labor_value_usd 8500 # excludes 24 remaining human hours
results[0].labor_value.estimated_human_effort_reduction 0.85 # 85% fewer human hours, caller assumption
results[0].labor_value.estimated_human_effort_reduction_basis "caller_supplied_remaining_hours"
results[0].matches[0].agent.id "missing-information-agent"
results[0].matches[0].agent.icon_url "https://www.xy.ai/icons/discovery/missing-information-agent.svg"
results[0].matches[0].score 0.89 # 0-1 catalog fit
results[0].matches[0].fit "strong"
results[0].matches[0].matched_capabilities[0] "Completeness validation"/* Use the returned XY icon_url as a CSS mask, not a background image.
SVGs loaded through <img> do not inherit your page's color. */
.agent-icon {
display: inline-block;
width: 24px;
height: 24px;
color: #000000; /* Replace with any theme color. */
background-color: currentColor;
-webkit-mask: var(--agent-icon-url) center / contain no-repeat;
mask: var(--agent-icon-url) center / contain no-repeat;
}
/* Set --agent-icon-url to url("<returned icon_url>") on this element.
Use an empty decorative span with aria-hidden="true" next to the card title. */Configure the match
# Copy task_id and the chosen matches[].agent.id from the match response.
# task_id is generated by XY unless you supplied an optional correlation ID.
# Set REQUEST_IDEMPOTENCY_KEY once per new request; reuse it only for retries.
curl --fail-with-body --request POST \
--header "Authorization: Bearer ${XY_API_KEY}" \
--header "Idempotency-Key: ${REQUEST_IDEMPOTENCY_KEY}" \
--header "Content-Type: application/json" \
"${XY_API_BASE}/agent-requests" \
--data '{
"name": "Application document follow-up",
"discovery_selections": [{
"id": "task-1",
"name": "Application follow-up",
"description": "Our team checks incoming applications for missing documents and follows up by email",
"selected_agent_ids": ["missing-information-agent"]
}]
}'
# If a task returns no_current_match, create the same request without
# discovery_selections and put its description in specification instead.Customer workflow walkthrough
GET /agent-requests/{request_id}for workflow_spec and unanswered open_fields. Save answers with PATCH on that request, then share them withPOST /agent-requests/{request_id}/publish. Use the current quoted version in If-Matchand an Idempotency-Key for each change. MCP offerscustom_agent_request_get,custom_agent_request_update, andcustom_agent_request_publish for the same steps. Credential fields take authorized vault references, not passwords or API keys.custom_request.deployed and the request's/deployments response identify the delivered workflow. Publication is not execution: agree its run or schedule separately using theworkflow operations.workflow.run.completed andworkflow.run.failed for outcomes,workflow.daily_results for daily summaries, andworkflow.human_review_required for items entering your selected review states. These states come from the workflow's configured queue. A completed run can still leave items awaiting review; an error alone is not a review alert./usage route or custom_agent_request_usagefor run counts and recorded token totals. Subscribe tocustom_request.usage_updated for completed UTC-day snapshots. Build and test usage is excluded. These totals are not a bill or a measure of business success.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.
Published catalog
# This separate 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.