See what a run cost

Every reply an agent writes is a run: see the tokens it used and the credits it cost.

Before you start

You need a reply from an agent. See Chat with an agent.

See what a run cost

  1. Sign in to the CLI.
  2. Set PROJECT to your project's ID (Find your IDs): export PROJECT=<id>.
  3. List the project's runs, newest first:
    Shell
    npx veryfront project runs project-list --project-reference $PROJECT
  4. Set RUN_ID to the id of the run you want, from the list above: export RUN_ID=<id>.
  5. Get the run. You should now see usage with its model_calls, tokens, and cost with its credits:
    Shell
    npx veryfront project runs get --run-id $RUN_ID

Try it in a sandbox

  1. Set PROJECT

  2. Add the support agent

  3. Ask it a question

  4. Let the agent answer

  5. Wait for the answer

  6. List the runs

  7. Set RUN_ID

  8. Check it

Try it out

Next steps