feat: add AgentInstance message idempotency (#2477)