How to convert aggregation result to PPL aggregation result (table format)

I have a aggregation result by this Http Query, the result is nested json format:
GET opensearch_dashboards_sample_data_logs/_search
{
“query”: {
“wildcard”: {
“tags”: {
“value”: “success”
}
}
},
“size”: 0,
“aggs”: {
“agg_agent”: {
“terms”: {
“field”: “agent.keyword”,
“size”: 1000
},
“aggs”: {
“agg_extension”: {
“terms”: {
“field”: “extension.keyword”,
“size”: 1000
},
“aggs”: {
“agg_host”: {
“terms”: {
“field”: “host.keyword”,
“size”: 1000
},
“aggs”: {
“agg_clientip_count”: {
“max”: {
“field”: “bytes”
}
}
}
}
}
}
}
}
}
}
And i want format like output of this PPL:
search source=opensearch_dashboards_sample_data_logs tags=‘success’ |stats max(bytes) by agent, extension, host, the result is table format