home/coding/prompture-cost-tracking

Prompture Cost Tracking

GPTClaudeDeepSeek··1,182 copies·updated 2026-07-14
prompture-cost-tracking.prompt
# Prompture Cost & Usage Tracking

Prompture includes a built-in usage tracker that automatically records every LLM call as an individual event in a local SQLite database. No setup required -- it works out of the box.

**Privacy first:** The tracker stores zero message content. Only metadata -- model name, token counts, cost, timing, and opaque IDs for grouping.

Database location: `~/.prompture/usage/usage.db`

---

## Table of Contents

- [Automatic Tracking](#automatic-tracking)
- [Context Scoping](#context-scoping)
- [Querying Usage](#querying-usage)
- [Budget Management](#budget-management)
- [Cost Calculation API](#cost-calculation-api)
- [Direct SQLite Access](#direct-sqlite-access)
- [DriverCallbacks Integration](#drivercallbacks-integration)
- [Configuration](#configuration)
- [Event Schema Reference](#event-schema-reference)
- [SQL Views Reference](#sql-views-reference)
- [Migration from Legacy Ledger](#migration-from-legacy-ledger)

---

## Automatic Tracking

Every LLM call made through Prompture is automatically tracked. This includes:

- Extraction functions (`extract_with_model`, `ask_for_json`, `render_output`, etc.)
- Conversations (`Conversation.ask()`, `Conversation.ask_for_json()`, etc.)
- Agents (`Agent.run()`, sub-agent calls)
- Async variants of all the above

when to use it

Community prompt sourced from the open-source GitHub repo jhd3197/Prompture (MIT). A "Prompture Cost Tracking" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

codingcommunitydeveloper

source

jhd3197/Prompture · MIT