agentpit-tokens
CommunityCreate a token usage API for AgentPit.
Authorhangeaiagent
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Token usage reporting within AgentPit projects enables external agents to report consumption metrics, enabling auditing, billing, and usage tracking across the platform.
Core Features & Use Cases
- Prisma model extension: adds TokenUsage with fields for agentId, applicationId, userId, tokensUsed, startedAt, endedAt, and optional modelName, requestId, metadata.
- API route: POST /api/v1/tokens/report with ApiKey authentication to submit reports and persist them.
- Use Case: An external Agent application reports per-request token usage to tie activity to an Agent and Application for cost accounting and analytics.
Quick Start
Add this skill to your AgentPit project and run through the prompts to generate the Prisma model and API route.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: agentpit-tokens Download link: https://github.com/hangeaiagent/agentpit-Skills/archive/main.zip#agentpit-tokens Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.