renamed agent_impl to spec