Cost observability for AI agents
Project description
zolks
Cost observability for AI agent apps.
pip install zolks anthropic
Quick start
uv run python examples/live_demo.py
Minimal usage
import zolks
zolks.init()
from anthropic import Anthropic
client = Anthropic()
with zolks.tag(agent="refund-bot", user_id="user_123"):
client.messages.create(
model="claude-haiku-4-5",
max_tokens=20,
messages=[{"role": "user", "content": "hi"}],
)
Then:
zolks top --group-by agent
If you see untagged, your calls are not tagged yet.
What it does
Zolks monkey-patches Anthropic messages.create() calls, captures tokens/latency/cost,
and writes events to ~/.zolks/events.db (SQLite, local-first). Use tag(...) or
track(...) to attribute spend to agents/users/features.
Commands
zolks top
zolks stats
zolks tail
Tests
./scripts/test.sh
Status
0.1.0 — Anthropic only, SQLite only, no cloud yet.
Roadmap in ROADMAP.md.
Known limitations are tracked in KNOWN_LIMITATIONS.md.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zolks-0.1.0.tar.gz.
File metadata
- Download URL: zolks-0.1.0.tar.gz
- Upload date:
- Size: 65.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
deedac31f53965b91ae6ccf229972f698ed99993c9a662da485af25ef7642e11
|
|
| MD5 |
f9a459e689a6c892fb7aaf151618abe8
|
|
| BLAKE2b-256 |
83b57879c044b821c3bca23817200d9fb12601fa47057ca65d022908104674ac
|
File details
Details for the file zolks-0.1.0-py3-none-any.whl.
File metadata
- Download URL: zolks-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5658b8e3e35dc89537f7a3284d05e2106ceca42b9c717dcad13b8c5ab7943611
|
|
| MD5 |
875e38951faf9f600347a57ac4a99e28
|
|
| BLAKE2b-256 |
37bcb2eab3e802072f76cada64599ecf95e753936ea7ab3bd54895cce3be5d58
|