Repository navigation
Releases
Releases · Query-farm/vgi-anthropic
v0.2.1
- Container image for Orchard hosting:
ghcr.io/query-farm/vgi-anthropic:0.2.1(also:X.Yand:latest),
multi-arch (amd64 + arm64), cosign-signed. One image serves HTTP on$PORTby default
(docker run IMAGE) and stdio (docker run -i IMAGE stdio); it runs as an unprivileged user
with a writable home. Published by the new tag-drivendocker-publish.ymlworkflow, which
reuses the tag commit's passing CI run;ci.ymlis now callable (workflow_call).
Image: ghcr.io/query-farm/vgi-anthropic:0.2.1
v0.2.0
Protocol 3.4: requires the vgi 3.4 DuckDB extension (Haybarn 2.0.1rc3 or DuckDB v2.0.0 via the Query.Farm repository). Hosted-mode ready (http+oauth); Docker HEALTHCHECK uses HEAD /health.
v0.1.3
v0.1.2
- Bump vgi-python to 0.52.2.
Full Changelog: v0.1.1...v0.1.2
v0.1.1
Changed
- Docs link to upstream: the catalog documentation now links the Anthropic Admin
API, Usage and Cost API and Claude Code Analytics API references, and the
Console page where an Admin API key is created (vgi-lint VGI183). - Docs give an overview, not a function list: the catalog documentation now
describes the records-as-tables / reports-as-functions shape without naming
every object (vgi-lint VGI173).
v0.1.0
First release of vgi-anthropic, a VGI worker that exposes the Anthropic Admin, Usage & Cost, and Claude Code Analytics APIs as a read-only SQL catalog. You can query your organization's members, workspaces, API keys, rate limits, token usage, spend and Claude Code activity from DuckDB/Haybarn.
What's in it
- Tables:
organization,users,invites,workspaces(archived included),workspace_members,api_keys,rate_limits,workspace_rate_limits. Each one is backed by a pagedall_<table>()scan. - Reports:
messages_usage(starting_at),cost_report(starting_at)andclaude_code_usage(starting_date). They stream one API page per tick, so aLIMITstops early. Withoutgroup_by, they group by the dimension columns your query references. - Lookups:
user_by_id,workspace_by_idandapi_key_by_id. They compose underLATERAL. - Exact money: cost comes back as
DECIMAL, in cents and in dollars. - Filter pushdown, plus retries with backoff on 429/529/5xx that honour
retry-afterandx-should-retry. - Credentials come from a redacted
anthropic_adminDuckDB secret: an Admin API key, an organization-scoped key, or anorg:adminOAuth token. There is no environment-variable fallback.
Composed examples
- Claude Code sessions, lines added and estimated cost over the last week, by organization role (
claude_code_usage+users) - Members with no Claude Code activity in the last 30 days (
users+claude_code_usage) - Today's peak output tokens per minute per model group, compared with that group's OTPM limit (
messages_usage+rate_limits) - Month-to-date spend, tokens and blended dollars per million tokens by model (
cost_report+messages_usage)
Install
ATTACH 'anthropic' (TYPE vgi,
LOCATION 'uvx --from git+https://github.com/Query-farm/vgi-anthropic@v0.1.0 vgi-anthropic');From a clone, run uv run anthropic_worker.py (stdio) or uv run serve.py --port 8000 (HTTP).
This release speaks VGI protocol 3.3 (vgi-python >= 0.51.1).
Known limits
- It only reads. Nothing writes to the Admin API.
- It needs an admin-capable credential. A workspace-scoped or non-admin key is refused with a 401, and the error message names the credentials that would work.
- CI tests run against a local fake of the Admin API. The live test workflow only runs when the repository has API key secrets configured.