Add to_i for Agent postgres compatibility