Associating a name with each bit in a bitmask
Suggestions


enumerate is built-in function useful here
dict comprehensions can be used to create dictionaries from arbitrary key and value expressions
imho '{:b}'.format(n) is easier to read than bin(n)[2:]
in additional you may use OrderedDict if you often iterate over agents 1, 2, 3, 4, ...


Final code (n = 10, size_bin =  6)

{'a{}'.format(k): int(v) for k, v in enumerate('{:b}'.format(10).ljust(6, '0'), start=1)}


and with full utilize format syntax

{'a{}'.format(k): int(v) for k, v in enumerate('{:&lt;0{}b}'.format(10, 6), start=1)}