The "View in Library" link was returning 404 because the path was missing the /agents/ segment. Fixed in both create_agent.py and edit_agent.py to match the correct route used elsewhere.