agentconnect.core.registry.registry_base module¶
Agent registry for the AgentConnect framework.
This module provides the AgentRegistry class for agent registration, discovery, and capability matching.
- class AgentRegistry(vector_search_config=None)¶
Bases:
objectCentral registry for agent registration and discovery.
This class provides methods for registering agents, discovering agents by capability, and verifying agent identities.
- Parameters:
vector_search_config (VectorSearchSettings | Dict[str, Any] | None)
- property vector_search_settings: VectorSearchSettings¶
Get the vector search settings as a Pydantic model.
- async ensure_initialized()¶
Wait until the core registry initialization is complete.
- async register(registration)¶
Register a new agent with verification. Waits for initialization first.
- Parameters:
registration (
AgentRegistration) – Registration information for the agent- Return type:
- Returns:
True if registration was successful, False otherwise
- async unregister(agent_id)¶
Remove agent from registry.
- async get_by_capability(capability_name, limit=10, similarity_threshold=0.1)¶
Find agents by capability name.
- Parameters:
- Return type:
- Returns:
List of agent registrations with the specified capability
- async get_by_capability_semantic(capability_description, limit=10, similarity_threshold=0.1, filters=None)¶
Find agents by capability description using semantic search.
- Parameters:
capability_description (
str) – Description of the capability to search forlimit (
int) – Maximum number of results to return (default: 10)similarity_threshold (
float) – Minimum similarity score to include in results (default: 0.1)filters (
Optional[Dict[str,List[str]]]) – Optional dictionary for filtering. Keys can include “tags”, “organization”, “developer”, “default_input_modes”, “default_output_modes”, “auth_schemes”. Values are lists of strings to match for the respective key.
- Return type:
- Returns:
List of tuples containing agent registrations and similarity scores
- async get_all_capabilities()¶
Get a list of all unique capability names registered in the system.
- async get_all_agents()¶
Get a list of all agents registered in the system.
- Return type:
- Returns:
List of all agent registrations
- async get_agent_type(agent_id)¶
Get the type of an agent.
- async get_by_interaction_mode(mode)¶
Find agents by interaction mode.
- Parameters:
mode (
InteractionMode) – Interaction mode to search for- Return type:
- Returns:
List of agent registrations with the specified interaction mode
- async get_registration(agent_id)¶
Get agent registration details.
- Parameters:
agent_id (
str) – ID of the agent- Return type:
- Returns:
Agent registration if found, None otherwise
- async get_by_organization(organization)¶
Find agents by organization.
- Parameters:
organization (
str) – ID/name of the organization- Return type:
- Returns:
List of agent registrations in the specified organization
- async get_verified_agents()¶
Get all verified agents.
- Return type:
- Returns:
List of verified agent registrations
- async verify_agent(agent_id)¶
Verify an agent’s identity.
- async update_registration(agent_id, updates)¶
Update agent registration details.
- Parameters:
- Return type:
- Returns:
Updated agent registration if successful, None otherwise