Pinned Tweet
π Introducing TokenWatcher!
Monitor AI API costs, tokens, latency & usage in real time with an open-source observability platform. Built with TypeScript, React & PostgreSQL.
π₯ Demo: youtu.be/_pTjGToKCVg
β GitHub: github.com/ZainabTravadi/Tokβ¦
Recent TokenWatcher sprint:
β Agent identity
β Public agent capabilities
β x402 payment flow
β Payment verification
β Replay protection
β Production safety checks
β Automated tests
β OpenClaw/Telegram integration
Slowly turning a weekend project into infrastructure. β‘
I added x402 payments to TokenWatcher.
The goal: let agents pay for TokenWatcher capabilities programmatically instead of requiring a human to sit in the middle.
We now have:
β paid agent capabilities
β payment verification
β payment persistence
β replay protection
One architecture decision I really like in TokenWatcher:
Telegram β OpenClaw β TokenWatcher API β analytics
The agent handles conversation + tools.
Running the OpenClaw layer through ClawUp keeps that separation clean.
Building an agent?
clawup.org/?ref=06098067bf
π€ Made with AI
Building TokenWatcher made me realize I didn't want my AI agent runtime tangled with my core backend.
I run the OpenClaw layer separately and connect it to TokenWatcher's APIs.
ClawUp made that agent workflow much easier to work with.
Try it here: clawup.org/?ref=06098067bf
Just published a new deep dive on TokenWatcher β‘
The article covers the architecture, intent routing, tools, security, and the actual Telegram flow.
Read it here π
zainab-engineering.hashnode.β¦
Raw telemetry is useful.
But turning it into answers is where observability gets interesting.
TokenWatcher turns telemetry into:
β daily cost & requests
β provider + model spend + latency + errors
β endpoint costs
β token usage
All across Overview, Models & Endpoints views.
I wanted TokenWatcher to feel live without constantly polling the backend.
So I built an SSE pipeline, the frontend handles reconnects + stale heartbeats, then refreshes its query state when new telemetry arrives.
No polling loop. Just live telemetry flowing into the dashboard.
The interesting part of TokenWatcher is the telemetry path underneath it.
The SDK:
β buffers + batches events
β retries with backoff
β flushes on shutdown
No βinfinite scaleβ claims.
Just a telemetry pipeline built to avoid turning every event into a network round trip.
The TokenWatcher SDK to keep the developer experience simple while handling the complexity underneath.
track() β bounded queue β batching β retries/backoff β HMAC signing β /ingest
It handles timeouts, aborts and graceful shutdown so telemetry isn't an afterthought. βοΈ
π€ Made with AI
Designing the database behind TokenWatcher.
The requests table acts as the canonical telemetry store, capturing tokens, cost, latency, model, provider, route and metadata.
With workspace-aware relationships and analytics-focused indexes, the same data powers real-time analytics.
π€ Made with AI
What happens when an AI telemetry event reaches TokenWatcher?
The SDK batches and signs the event β /ingest authenticates it β the payload is validated and normalized β telemetry is stored in PostgreSQL β analytics and alerts are updated.βοΈ
π€ Made with AI
ποΈ Architecture Spotlight
Every telemetry event follows the same path:
SDK β Backend β Database β Analytics β Dashboard β Telegram
Try it out: token-watcher-ai-api-cost-trβ¦
#BuildInPublic #TypeScript #AI
π€ Made with AI
Why doesn't TokenWatcher connect Telegram directly to the backend? π€
Because OpenClaw acts as a stateless bridge between Telegram and TokenWatcher.
OpenClaw handles:
β’ Telegram webhooks
β’ Intent routing
β’ Tool execution
β’ Response rendering
TokenWatcher stays focused on telemetry, analytics and business logic.
Clean architecture isn't about having more services.
It's about giving every service a clear responsibility.
That's the approach behind TokenWatcher. π
GitHub: github.com/ZainabTravadi/Tokβ¦
ClawUp : clawup.org/?ref=06098067bf
π€ Made with AI
Check your AI API usage without opening the dashboard.
TokenWatcher lets you access telemetry directly from Telegram.
π Summary
β‘ Recommendations
π Forecast
Try it now: token-watcher-ai-api-cost-trβ¦
π° Cost tracking starts at the source.
TokenWatcher records token usage and cost_usd as telemetry is ingested, then builds dashboards and analytics from the same data.
One source of truth. Accurate spend insights. π
#AI #TypeScript #OpenSource
π€ Made with AI
A quick look at how TokenWatcher transforms raw telemetry into meaningful insights. Built for observability, scalability, and production-ready AI applications. π
Check it out: token-watcher-ai-api-cost-trβ¦
π€ Made with AI
π‘ Express Tip
TokenWatcher captures the raw request body before parsing JSON, allowing SDK-signed HMAC requests to be verified server-side.
Better security. Replay protection. Workspace-bound telemetry. π
#ExpressJS #TypeScript #OpenSource
π€ Made with AI


















