agentconnect.core.registry.search package

Registry Search Subdomain - Agent Search Interfaces and Utilities

This module provides schemas and utilities specifically for agent search operations. It serves as the interface layer between the registry domain and external consumers (API servers, MCP servers, LangChain tools, etc.).

class AgentSearchInput(**data)

Bases: BaseModel

Input schema for agent search.

Parameters:
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

query: str
top_k: int
strictness: float
output_detail: str
include_tags: Optional[List[str]]
class AgentSearchOutput(**data)

Bases: BaseModel

Output schema for agent search, containing a list of results.

Parameters:
class Config

Bases: object

Config for the AgentSearchOutput.

exclude_none = True
__str__()

Return a clean JSON string representation without null values.

Return type:

str

model_config: ClassVar[ConfigDict] = {'exclude_none': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

message: str
results: List[AgentSearchResultItem]
class AgentSearchResultItem(**data)

Bases: BaseModel

Defines the structure for each agent in the search results.

Parameters:
class Config

Bases: object

Config for the AgentSearchResultItem.

exclude_none = True
extra = 'ignore'
model_config: ClassVar[ConfigDict] = {'exclude_none': True, 'extra': 'ignore'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

agent_id: str
similarity_score: float
name: Optional[str]
url: Optional[str]
payment_address: Optional[str]
summary: Optional[str]
tags: Optional[List[str]]
capabilities: Optional[List[Dict[str, str]]]
skills: Optional[List[Dict[str, str]]]
description: Optional[str]
examples: Optional[List[str]]
version: Optional[str]
organization: Optional[str]
developer: Optional[str]
auth_schemes: Optional[List[str]]
default_input_modes: Optional[List[str]]
default_output_modes: Optional[List[str]]
format_capabilities_for_output(cap_list)

Format capabilities list for search output.

Parameters:

cap_list (List[Capability]) – List of Capability objects from registry

Return type:

List[Dict[str, str]]

Returns:

List of dictionaries with ‘name’ and ‘description’ keys

format_skills_for_output(skill_list)

Format skills list for search output.

Parameters:

skill_list (List[Skill]) – List of Skill objects from registry

Return type:

List[Dict[str, str]]

Returns:

List of dictionaries with ‘name’ and ‘description’ keys

populate_search_result_item(registration, similarity_score, output_detail_level)

Populate AgentSearchResultItem from AgentRegistration based on detail level.

This is the core utility that transforms registry domain objects into search interface objects, respecting the requested level of detail.

Parameters:
  • registration (AgentRegistration) – The agent registration from the registry

  • similarity_score (float) – Similarity score from search operation

  • output_detail_level (str) – Level of detail (‘minimal’, ‘summary’, ‘capabilities’, ‘full’)

Return type:

AgentSearchResultItem

Returns:

Populated AgentSearchResultItem with appropriate level of detail

Submodules