feat: add AgentTemplate preparation and immutable revisions (#2434)