Creates a new instance of an AgentCard using the provided Java-friendly Consumer.
Creates a new instance of an AgentCard using the provided configuration block.