src.uagents.registration
generate_backoff_time 
def generate_backoff_time(retry: int) -> float
Generate a backoff time starting from 0.128 seconds and limited to ~131 seconds
coerce_metadata_to_str 
def coerce_metadata_to_str(
metadata: Optional[Dict[str, Any]]
) -> Optional[Dict[str, Union[str, Dict[str, str]]]]
Step through the metadata and convert any non-string values to strings.
extract_geo_metadata 
def extract_geo_metadata(
metadata: Optional[Dict[str, Any]]) -> Optional[Dict[str, Any]]
Extract geo-location metadata from the metadata dictionary.
LedgerBasedRegistrationPolicy Objects 
class LedgerBasedRegistrationPolicy(AgentRegistrationPolicy)
check_contract_version 
def check_contract_version()
Check the version of the deployed Almanac contract and log a warning if it is different from the supported version.
register 
async def register(agent_address: str,
protocols: List[str],
endpoints: List[AgentEndpoint],
metadata: Optional[Dict[str, Any]] = None)
Register the agent on the Almanac contract if registration is about to expire or the registration data has changed.
Last updated on