Agent
Discover the published version and its live setup, input, output, and source schemas.
The AI native company for Healthcare
Knowledge Base
The Knowledge Base Answering agent is a published, versioned Marketplace agent. An installation owns one organization-scoped indexed knowledge base, its sources, and a query workflow with a stable evidence-backed result contract.
What you are creating
Discover the published version and its live setup, input, output, and source schemas.
Set its name, behavior prompt, description, and one to ten initial sources.
Index bounded websites or uploaded files; add up to 100 sources per installation.
Ask a question asynchronously and poll for an answered or no_context result.
Install
curl --fail-with-body --request POST \
--header "Authorization: Bearer ${XY_API_KEY}" \
--header "Idempotency-Key: policy-kb-v1" \
--header "Content-Type: application/json" \
"${XY_API_BASE}/agents/knowledge-base-answering/installations" \
--data '{
"name": "Operations policy knowledge base",
"description": "Approved operating policies and procedures.",
"system_prompt": "Answer only from indexed sources. Say when the sources do not establish an answer.",
"initial_sources": [
{
"type": "url",
"url": "https://docs.example.com/policies/",
"crawl_limit": 50
}
]
}'crawl_limit accepts 1–500 pages and defaults to 50.Upload
# 1. Create a file source and receive a short-lived signed PUT action.
curl --fail-with-body --request POST \
--header "Authorization: Bearer ${XY_API_KEY}" \
--header "Idempotency-Key: policy-pdf-v1" \
--header "Content-Type: application/json" \
"${XY_API_BASE}/installations/${INSTALLATION_ID}/sources" \
--data '{
"type": "file",
"file_name": "policy-manual.pdf",
"content_type": "application/pdf"
}'
# 2. Use the returned upload URL with the exact content type and file bytes.
curl --fail-with-body --request PUT \
--header "Content-Type: application/pdf" \
--upload-file ./policy-manual.pdf \
'SIGNED_UPLOAD_URL'
# 3. Tell XY the upload is complete so durable indexing can start.
curl --fail-with-body --request POST \
--header "Authorization: Bearer ${XY_API_KEY}" \
"${XY_API_BASE}/installations/${INSTALLATION_ID}/sources/${SOURCE_ID}/complete"Readiness
| Installation status | Meaning | Can execute? |
|---|---|---|
| action_required | At least one initial file still awaits its upload/completion action. | No |
| indexing | Initial sources are still being crawled or indexed. | No |
| ready | All initial sources indexed successfully. | Yes |
| degraded | At least one source indexed and another failed. | Yes, against indexed sources |
| failed | No initial source indexed successfully. | No |
Individual sources move through awaiting_upload,indexing, indexed,failed, deleting, anddeleted. A failed source is visible and does not silently become evidence.
Query
curl --fail-with-body --request POST \
--header "Authorization: Bearer ${XY_API_KEY}" \
--header "Idempotency-Key: question-1842" \
--header "Content-Type: application/json" \
"${XY_API_BASE}/installations/${INSTALLATION_ID}/executions" \
--data '{
"input": {
"question": "When does the escalation policy require human review?",
"response_instructions": "Answer concisely and identify the supporting source.",
"max_chunks": 5
},
"metadata": {"partner_reference": "question-1842"}
}'{
"outcome": "answered",
"answer": "Human review is required when …",
"confidence": 0.91,
"reasoning": null,
"sources": [
{
"source_id": "src_REPLACE",
"name": "policy-manual.pdf",
"excerpt": "…supporting passage…"
}
]
}max_chunks accepts 1–20 and defaults to 5.response_instructions can adjust answer format for this execution without changing the installation's long-lived behavior prompt.
Operate
Persist source IDs alongside your own document registry so updates and deletions are deliberate.
Attach your question ID in execution metadata and reconcile the asynchronous response to your system.
Read the agent or installation's approved metrics through the governed metrics endpoints.