Skip to content

Commit 402d447

Browse files
declan-scaleclaude
andcommitted
docs(sdk): document server version requirement and deployment-path gap for the card filter
Adds the minimum-server note to metadata_filters (older servers ignore the unknown query parameter and return the full agent list) and syncs the generated agent_card_metadata docstrings with the updated OpenAPI description from scaleapi/scale-agentex#411. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent dd28c0e commit 402d447

3 files changed

Lines changed: 17 additions & 3 deletions

File tree

‎src/agentex/lib/utils/metadata_filters.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
client.agents.list(
1414
agent_card_metadata=encode_metadata_filter({"permits_capable": True}),
1515
)
16+
17+
The ``agent_card_metadata`` filter requires an Agentex server that includes
18+
scaleapi/scale-agentex#411. Older servers ignore the unknown query parameter
19+
and return the full unfiltered agent list rather than erroring, and the SDK's
20+
startup backend-contract check does not guard against this.
1621
"""
1722

1823
from __future__ import annotations

‎src/agentex/resources/agents/agents.py‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,10 @@ def list(
135135
Args:
136136
agent_card_metadata: JSON-encoded object used to filter agents on
137137
`registration_metadata.agent_card.metadata` via JSONB containment. Example:
138-
{"permits_capable": true}.
138+
{"permits_capable": true}. Only matches cards published through the direct
139+
registration path: registrations that carry a `deployment_id` write the card
140+
to the deployment record instead of `registration_metadata`, so those agents
141+
never match this filter.
139142
140143
limit: Limit
141144
@@ -802,7 +805,10 @@ async def list(
802805
Args:
803806
agent_card_metadata: JSON-encoded object used to filter agents on
804807
`registration_metadata.agent_card.metadata` via JSONB containment. Example:
805-
{"permits_capable": true}.
808+
{"permits_capable": true}. Only matches cards published through the direct
809+
registration path: registrations that carry a `deployment_id` write the card
810+
to the deployment record instead of `registration_metadata`, so those agents
811+
never match this filter.
806812
807813
limit: Limit
808814

‎src/agentex/types/agent_list_params.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ class AgentListParams(TypedDict, total=False):
1313
"""
1414
JSON-encoded object used to filter agents on
1515
`registration_metadata.agent_card.metadata` via JSONB containment. Example:
16-
{"permits_capable": true}.
16+
{"permits_capable": true}. Only matches cards published through the direct
17+
registration path: registrations that carry a `deployment_id` write the card to
18+
the deployment record instead of `registration_metadata`, so those agents never
19+
match this filter.
1720
"""
1821

1922
limit: int

0 commit comments

Comments
 (0)