Optimizing Agentic Commerce