Fetch a source again
Re-read one knowledge-base source now, keeping its id and its sync schedule. Use after the page or site behind a URL source changed, or to retry a source that failed. The page is fetched fresh, never from a cache. Unchanged pages keep their passages; changed pages are re-embedded (a metered charge). A failed refresh keeps the previous passages and reports the error. Returns the source's status, chunk count and what the quality gate dropped (`rejectedChunkCount`, `rejectedReasons`). A workspace-shared source cannot be refreshed from an agent.
Authorization
bearerAuth A personal access token from Settings > API tokens.
In: header
Path Parameters
Workspace slug (GET /me lists yours).
Agent slug within the workspace.
Header Parameters
A key you choose, such as a UUID, that makes this POST safe to retry. Within 24 hours the same key and request answers with the first successful answer and runs nothing, the same key with a different request answers 422 idempotency_key_reused, and a key whose request is still running answers 409 idempotency_key_in_use. A failed request keeps nothing, so the same key runs it again.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/workspaces/string/agents/string/knowledge-base/string/refresh" \ -H "Content-Type: application/json" \ -d '{}'{
"source": {
"id": "string",
"status": "string",
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}List knowledge sources GET
List the knowledge-base sources currently attached to this agent. Returns each source's name, kind (text/url/upload/site), status (pending/extracting/embedding/ready/failed), chunk count, and what the ingest quality gate dropped on the latest read: `rejectedChunkCount` and `rejectedReasons` ([{reason, count, sections}]). A `ready` source can still have dropped chunks; a `live price list` reason means the agent cannot quote those prices from the KB and needs a price tool. Use before `add_text_kb_source` or `add_url_kb_source` to avoid duplicating coverage.
Create a test scenario POST
A simulated caller the eval engine plays against the agent and grades. Define passing here: assertions for anything with a right answer, rubrics for what only a reader can judge, workflowChecks for its functions. It never changes the agent.