Agent registration in the almanac-contract is a key part for remote agents communication.
To be found by other μAgents, each μAgent needs to register (paying a small fee) in the almanac contract using their agent address. Therefore, your agents need to have funds available in their Fetch address. When using the testnet, you can use the function
fund_agent_if_low to fund your agent:
almanac-contract. If not it will add tokens to your Fetch address. Make sure to add a
seedto your agent so you don't have to fund different addresses each time you run your agent.
μAgents can communicate by querying the
almanac-contract and retrieving an HTTP endpoint from the recipient μAgent. Therefore, we need to specify the service endpoints when defining an agent:
Here we defined a local http address, but you could also define a remote address to allow agent communication over different machines through the internet.