Letta · Schema

LettaUsageStatistics

Usage statistics for the agent interaction. Attributes: completion_tokens (int): The number of tokens generated by the agent. prompt_tokens (int): The number of tokens in the prompt. total_tokens (int): The total number of tokens processed by the agent. step_count (int): The number of steps taken by the agent. cached_input_tokens (Optional[int]): The number of input tokens served from cache. None if not reported. cache_write_tokens (Optional[int]): The number of input tokens written to cache. None if not reported. reasoning_tokens (Optional[int]): The number of reasoning/thinking tokens generated. None if not reported.

Artificial IntelligenceAgentsStateful AgentsMemoryMemGPTContinual LearningMCPMulti-AgentRAGOpen-Source

Properties

Name Type Description
message_type string
completion_tokens integer The number of tokens generated by the agent.
prompt_tokens integer The number of tokens in the prompt.
total_tokens integer The total number of tokens processed by the agent.
step_count integer The number of steps taken by the agent.
run_ids object The background task run IDs associated with the agent interaction
cached_input_tokens object The number of input tokens served from cache. None if not reported by provider.
cache_write_tokens object The number of input tokens written to cache (Anthropic only). None if not reported by provider.
reasoning_tokens object The number of reasoning/thinking tokens generated. None if not reported by provider.
context_tokens object Estimate of tokens currently in the context window.
View JSON Schema on GitHub

JSON Schema

letta-lettausagestatistics-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/LettaUsageStatistics",
  "title": "LettaUsageStatistics",
  "properties": {
    "message_type": {
      "type": "string",
      "const": "usage_statistics",
      "title": "Message Type",
      "default": "usage_statistics"
    },
    "completion_tokens": {
      "type": "integer",
      "title": "Completion Tokens",
      "description": "The number of tokens generated by the agent.",
      "default": 0
    },
    "prompt_tokens": {
      "type": "integer",
      "title": "Prompt Tokens",
      "description": "The number of tokens in the prompt.",
      "default": 0
    },
    "total_tokens": {
      "type": "integer",
      "title": "Total Tokens",
      "description": "The total number of tokens processed by the agent.",
      "default": 0
    },
    "step_count": {
      "type": "integer",
      "title": "Step Count",
      "description": "The number of steps taken by the agent.",
      "default": 0
    },
    "run_ids": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Run Ids",
      "description": "The background task run IDs associated with the agent interaction"
    },
    "cached_input_tokens": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cached Input Tokens",
      "description": "The number of input tokens served from cache. None if not reported by provider."
    },
    "cache_write_tokens": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cache Write Tokens",
      "description": "The number of input tokens written to cache (Anthropic only). None if not reported by provider."
    },
    "reasoning_tokens": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Reasoning Tokens",
      "description": "The number of reasoning/thinking tokens generated. None if not reported by provider."
    },
    "context_tokens": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Context Tokens",
      "description": "Estimate of tokens currently in the context window."
    }
  },
  "type": "object",
  "description": "Usage statistics for the agent interaction.\n\nAttributes:\n    completion_tokens (int): The number of tokens generated by the agent.\n    prompt_tokens (int): The number of tokens in the prompt.\n    total_tokens (int): The total number of tokens processed by the agent.\n    step_count (int): The number of steps taken by the agent.\n    cached_input_tokens (Optional[int]): The number of input tokens served from cache. None if not reported.\n    cache_write_tokens (Optional[int]): The number of input tokens written to cache. None if not reported.\n    reasoning_tokens (Optional[int]): The number of reasoning/thinking tokens generated. None if not reported."
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/letta-lettausagestatistics"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.