﻿---
title: stack kb agent-builder post-agent-builder-agents-agent-id-consumption cli command
description: Get agent consumption data Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4120/reference/elastic-cli/cli/stack/kb/agent-builder/post-agent-builder-agents-agent-id-consumption
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack kb agent-builder post-agent-builder-agents-agent-id-consumption cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb agent-builder post-agent-builder-agents-agent-id-consumption \
  --agent-id <agent-id> \
  [options]
```

Get agent consumption data
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--agent-id string required">
    The unique identifier of the agent.
  </definition>
  <definition term="--has-warnings">
    Filter to conversations with or without high-token warnings.
  </definition>
  <definition term="--search string">
    Free-text search filter on conversation title.
  </definition>
  <definition term="--search-after string[]">
    Cursor for pagination. Pass the search_after value from the previous response.
    **Repeatable:** pass `--search-after` multiple times to supply more than one value
  </definition>
  <definition term="--size number">
    Number of results per page.
  </definition>
  <definition term="--sort-field enum">
    Field to sort results by.
    **Values:** updated_at, total_tokens, round_count
  </definition>
  <definition term="--sort-order enum">
    Sort direction.
    **Values:** asc, desc
  </definition>
  <definition term="--usernames string[]">
    Filter results to conversations by these usernames.
    **Repeatable:** pass `--usernames` multiple times to supply more than one value
  </definition>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
  <definition term="--dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="--json">
    output as JSON
  </definition>
</definitions>