List agents referencing a knowledge base¶
List agents whose effective bindings reference the knowledge base, within the current identity’s visibility.
GET https://api.moi.matrixorigin.cn/v5/semantic-models/{model_id}/referencing-agents
Before you call this API¶
Prepare current Workspace credentials and resource privileges. See Shared information for variables, import files, and operation boundaries.
Query parameters¶
curl -X GET "https://api.moi.matrixorigin.cn/v5/semantic-models/$MODEL_ID/referencing-agents" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
--get \
--data-urlencode "limit=50" \
--data-urlencode "cursor=${NEXT_CURSOR:-}"
The service combines current Workspace and system agent definitions with Workspace binding overrides, then filters by identity. Archived agents are excluded. Use the actual response limit; an early return without visible permission candidates may use 0. Advance by next_cursor, not by empty items or items shorter than limit: archival filtering follows pagination and may produce empty intermediate pages. No total is returned. Results do not establish globally absent references or safe deletion.
Field |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
Required in path |
Positive integer knowledge base ID in the current Workspace; model read privileges and existence are checked first. |
|
integer |
No |
Defaults to 50. Explicit values must be positive integers; values above 200 become 200. |
|
string |
No |
Previous next_cursor; omit or leave empty for the first page. Cannot be reused across Workspaces or resources. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"items": [],
"limit": 50
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
OK on success. |
|
string |
Response information. |
|
object |
Current operation result. Single-object imports return a knowledge base object directly. |
|
object[] |
Visible, nonarchived referencing agents on this page. |
|
string |
Agent ID. |
|
string |
Workspace owning the agent definition; may differ from the query Workspace. |
|
string |
Name. |
|
string |
Description. |
|
string |
Agent status. |
|
string |
RFC 3339 timestamp. |
|
integer |
Knowledge base references in this agent’s effective bindings, not the global reference total for this query. |
|
integer |
Effective page size. |
|
string |
Continue with the same resource when present and nonempty; may be omitted at the end. |
Error responses¶
Check HTTP, business code, and target resource separately. Retain request information and read back as described in Errors and environments.