agentconnect.servers.registry_api_server module

Registry API Server for AgentConnect

This server provides a REST API for the AgentConnect Registry, allowing agents to register, search, and manage their own metadata.

create_registry_api_app(settings=None)

Factory to create a FastAPI app for the Registry API.

  • If settings is None, load from environment using RegistryAPISettings().

  • Configures CORS and lifespan using the provided settings.

Return type:

FastAPI

Parameters:

settings (RegistryAPISettings | None)

class AgentRegistrationUpdatePayload(**data)

Bases: BaseModel

Agent registration update payload.

Parameters:
name: Optional[str]
summary: Optional[str]
description: Optional[str]
version: Optional[str]
documentation_url: Optional[str]
organization: Optional[str]
developer: Optional[str]
url: Optional[str]
auth_schemes: Optional[List[str]]
interaction_modes: Optional[List[InteractionMode]]
default_input_modes: Optional[List[str]]
default_output_modes: Optional[List[str]]
capabilities: Optional[List[Capability]]
skills: Optional[List[Skill]]
examples: Optional[List[str]]
tags: Optional[List[str]]
payment_address: Optional[str]
custom_metadata: Optional[Dict[str, Any]]
class Config

Bases: object

Pydantic model configuration.

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

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

get_registry()

Dependency injector for AgentRegistry instance.

Return type:

AgentRegistry

async health_check_endpoint()

Checks the operational status of the server and its core components. - Returns “healthy” if the server is running and the AgentRegistry is fully initialized. - Returns “initializing” if the AgentRegistry is still loading its dependencies. - Will return a 500 error via get_registry() if the registry instance is not available at all.

async get_verified_agents_endpoint()
Return type:

List[AgentRegistration]

async register_agent_endpoint(registration_data)
Return type:

Dict[str, Any]

Parameters:

registration_data (AgentRegistration)

async get_agent_registration_endpoint(agent_id)
Return type:

Optional[AgentRegistration]

Parameters:

agent_id (str)

async get_all_agents_endpoint()
Return type:

List[AgentRegistration]

async update_agent_registration_endpoint(agent_id, payload)
Return type:

Optional[AgentRegistration]

Parameters:
async unregister_agent_endpoint(agent_id)
Return type:

Dict[str, Any]

Parameters:

agent_id (str)

async search_agents_semantic_endpoint(search_input)
Return type:

AgentSearchOutput

Parameters:

search_input (AgentSearchInput)

async search_agents_by_capability_exact_endpoint(capability_name=Query(PydanticUndefined), limit=Query(10), similarity_threshold=Query(0.1))
Return type:

List[AgentRegistration]

Parameters:
  • capability_name (str)

  • limit (int)

  • similarity_threshold (float)

async get_all_capabilities_endpoint()
Return type:

List[str]

async get_agents_by_interaction_mode_endpoint(mode)
Return type:

List[AgentRegistration]

Parameters:

mode (InteractionMode)

async get_agents_by_organization_endpoint(organization_name)
Return type:

List[AgentRegistration]

Parameters:

organization_name (str)

async verify_agent_endpoint(agent_id)
Return type:

bool

Parameters:

agent_id (str)

async get_agents_by_owner_endpoint(owner_id)
Return type:

List[AgentRegistration]

Parameters:

owner_id (str)

async verify_agent_owner_endpoint(agent_id, owner_id)
Return type:

bool

Parameters:
  • agent_id (str)

  • owner_id (str)