search_public_records
¶
search_public_records(
*,
config_overrides: Optional[AgentDiscoveryClientConfig] = None,
search_query: Optional[searchQuery] = None,
filters: Optional[SearchFilterExpression] = None,
max_results: Optional[maxResults] = None,
next_token: Optional[nextToken] = None,
) -> SearchPublicRecordsResponse
Search public agent records across the authoritative + crawler indexes. Hybrid keyword + neural ranking, merged and fused (weighted RRF), with filters, org governance policy, and descriptor-visibility enforcement applied server-side. Public, authenticated (D-1).
Parameters:
-
search_query(Optional[searchQuery], default:None) –Free-text natural-language query (ARD
text). Drives semantic + lexical ranking. -
filters(Optional[SearchFilterExpression], default:None) –Structured filter narrowing the results, in the grammar of Agent Registry's SearchDiscoverableRegistryRecords
filters:$eq,$neand$inon a field, with$andor$orover single-condition objects, never nested. Fields areidentifier,domain,recordType,descriptorType,provenanceandrecordVersion, andidentifieralso takes$prefix. For example{"recordType": {"$eq": "AGENT"}}or{"$or": [{"recordType": {"$eq": "MCP"}}, {"domain": {"$eq": "acme.com"}}]}.Limits, the same ones Agent Registry applies: at most 10 conditions,
$intakes 1-25 values, values are strings of 1-512 characters, and{}is invalid. Adocumentcan't carry@length, so the service enforces these and answers a filter past them with a ValidationException, as Agent Registry does. -
max_results(Optional[maxResults], default:None) –Max records per page. Default 20, max 100.
-
next_token(Optional[nextToken], default:None) –Opaque composite-cursor pagination token (O-DM12).
Raises:
-
InternalServerException–Thrown on an internal defect — a bug or malformed state, not a failed dependency.
⚠️ Deliberately a permanent failure. Repeating a request that failed to serialize will fail identically, so treating a 500 as retryable would spin a poison message through redelivery forever instead of letting it reach a dead-letter queue. Dependency failures that are worth retrying use
ServiceUnavailableExceptionand its 503 instead. -
ThrottlingException–Thrown when the caller exceeds a rate/burst limit (D-9). ARD's code for it is
RATE_LIMIT_EXCEEDED. -
ValidationException–Thrown when a request fails input validation.
errorCodecarries ARD's Appendix B code,INVALID_ARGUMENT, which ARD's OpenAPI makes a required member of every error body on the ARD surface. The Amazon-shaped and internal surfaces leave it unset. -
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To search for agents by keyword The following example searches public records for flight booking agents and returns the first match.
>>> client.search_public_records(search_query='book a flight', filters={'recordType': {'$eq': 'AGENT'}}, max_results=1)