You appear to be showing us a document fetched from elasticsearch, so the first thing to understand is that the .keyword fields are added by elasticsearch and do not exist in logstash. Your index mapping (possibly a default one you did not configure) is creating them. You can read more about .keyword fields here.
agent.emphemeral_id and agent.id are fields within the agent object. In elasticsearch or kibana you would refer to them as agent.id, but in logstash you have to refer to them as [agent][emphemeral_id] and [agent][id]. The logstash syntax allows unambiguous references to fields with names that contain dots, so it can distinguish [a.b][c] and [a][b][c], which both have the same name in elasticsearch.
If you do not send [agent][id] to elasticsearch then [agent][id][keyword] will not be created.
You could remove these with
mutate { remove_fields => [ "[agent][emphemeral_id]", "[agent][id]" ] }