cargo-billing
Understand what Cargo is costing — remaining credits, usage broken down by workflow, connector, or agent, subscription state, and invoice history. Triggers: "how many credits do I have left", "what did that cost", "why is my bill so high", "am I about to run out", "will this fit in our budget", "show me my invoices", "how much have I spent this month", "what plan am I on", "what do I get for free", "how many free credits", "can I afford this run", "add a card", "update my payment method", "why was my card declined". Needs a token with admin access. Skip when: attributing spend to specific nodes or cutting a play cost — use cargo-diagnostics.
Rank
62
Safety
84
Downloads
1.5k
Updated
Oct 10, 2026
Version
2.0.1
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.5K downloads reported by the source. Last updated 10/10/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 10, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 10, 2026
- Adoption signal
- 1.5K downloadsadoption · observed Oct 10, 2026
- Latest release
- 2.0.1release · observed Oct 2, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s178dcd9wkfn0a2fqrygmt3jzn87j9e1:cargo-billing- Install using `clawhub skill install s178dcd9wkfn0a2fqrygmt3jzn87j9e1:cargo-billing` in an isolated environment before connecting it to live workloads.
- No published capability contract is available yet, so validate auth and request/response behavior manually.
- Review the upstream CLAWHUB listing at https://clawhub.ai/cargo-ai/cargo-billing before using production credentials.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-cargo-ai-cargo-billing/snapshot"
Documentation
CLAWHUB
146,768 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
---
name: cargo-billing
description: "Understand what Cargo is costing — remaining credits, usage broken down by workflow, connector, or agent, subscription state, and invoice history. Triggers: \"how many credits do I have left\", \"what did that cost\", \"why is my bill so high\", \"am I about to run out\", \"will this fit in our budget\", \"show me my invoices\", \"how much have I spent this month\", \"what plan am I on\", \"what do I get for free\", \"how many free credits\", \"can I afford this run\", \"add a card\", \"update my payment method\", \"why was my card declined\". Needs a token with admin access. Skip when: attributing spend to specific nodes or cutting a play cost — use cargo-diagnostics."
version: "2.0.1"
compatibility: Requires @cargo-ai/cli (npm). Sign in or create an account with `cargo-ai login --email` (emailed code, no browser), `--oauth`, or an API token
homepage: https://github.com/getcargohq/cargo-skills
metadata:
author: getcargo
openclaw:
requires:
bins:
- cargo-ai
install:
- kind: node
package: "@cargo-ai/cli@latest"
bins:
- cargo-ai
homepage: https://github.com/getcargohq/cargo-skills
---
# Cargo CLI — Billing
Billing and credit management: pulling usage metrics, checking subscription status, viewing invoices, and managing credits.
> See `references/response-shapes.md` for full JSON response structures.
> See `references/troubleshooting.md` for common errors and how to fix them.
> See `references/examples/usage-metrics.md` for usage metric and subscription examples.
## Bootstrap
Already signed in (`cargo-ai whoami` returns a workspace)? Skip to the next section.
```bash
npm install -g @cargo-ai/cli # no global install? prefix every command with `npx @cargo-ai/cli`
cargo-ai login --email [email protected] # emailed code, no browser; creates the account on first use
# alternatives: --oauth (browser) · --token <api-token> (CI)
cargo-ai whoami # confirm the active workspace before any write
```
Every command prints JSON to stdout; failures exit non-zero with `{"errorMessage": "..."}`. Anything that creates a run or a batch is async — pass `--wait-until-finished` or poll the matching `get`. **Admin-only:** every command in this skill requires a token with admin access on the workspace. Non-admin tokens return `{"errorMessage":"forbidden"}`. When the full skill bundle is installed, [`../cargo/references/prerequisites.md`](../cargo/references/prerequisites.md) adds the CLI version pin, token scopes, and the admin-only surface.
## Discover resources first
Usage metrics can be filtered and grouped by resource UUID. Discover them before querying.
```bash
cargo-ai orchestration play list # all plays (name, workflowUuid)
cargo-ai orchestration tool list # all tools (name, workflowUuid)
cargo-ai ai agent list # all agents (uuid, name)
cargo-ai_meta.json
{
"ownerId": "kn7by8t6yt9yghbxtxz6hv0bts87k6bq",
"slug": "cargo-billing",
"version": "2.0.1",
"publishedAt": 1790965921349
}references/examples/usage-metrics.md
# Usage metrics examples
## Get overall usage for a time range
```bash
cargo-ai billing usage get-metrics \
--from 2025-01-01 --to 2025-01-31
```
Response:
```json
{
"metrics": [
{
"date": "2026-07-25T00:00:00.000Z",
"items": [
{ "slug": "integration.peopleDataLabs.action.queryPeople", "count": 174, "groupBy": null },
{ "slug": "native.modelAsk", "count": 0.5, "groupBy": null },
{ "slug": "success", "count": 1043, "groupBy": null },
{ "slug": "error", "count": 32, "groupBy": null },
{ "slug": "insert", "count": 24, "groupBy": null }
]
}
]
}
```
Each item has a `slug` (usage type) and `count`. When `--group-by` is used, `groupBy` contains the resource UUID/slug.
**`count` is not always credits.** Unqualified, the array interleaves all three usage units: `integration.*` / `native.*` slugs are credits, `success` / `error` are **node executions** (credits = count / 100), `insert` is records written. Isolate one with `--unit billing.credits`, `--unit orchestration.executions`, or `--unit storage.records` — the only three accepted values.
## Isolate the execution charge
Every node execution bills 0.01 credits, and it is attributed to no node — this is the only place it surfaces.
```bash
cargo-ai billing usage get-metrics \
--from 2026-07-25 --to 2026-07-25 --unit orchestration.executions
# → [{"slug":"error","count":32},{"slug":"success","count":1043}]
# → 1,075 executions = 10.75 credits
```
Same day, provider spend for comparison:
```bash
cargo-ai billing usage get-metrics \
--from 2026-07-25 --to 2026-07-25 --unit billing.credits
# → sum of items[].count = ~276 credits
```
Here orchestration is ~4% because the day was action-heavy. On an action-light sweep the ratio inverts and executions become the largest line item. See [`../../SKILL.md`](../../SKILL.md) → "The execution charge".
## Group by workflow
See which workflows consume the most credits.
```bash
cargo-ai billing usage get-metrics \
--from 2025-01-01 --to 2025-01-31 \
--group-by workflow_uuid
# → Each item has groupBy = workflow UUID
# → Cross-reference with: cargo-ai orchestration workflow list
```
## Group by connector
See which connectors (e.g. Salesforce, HubSpot) are used most.
```bash
cargo-ai billing usage get-metrics \
--from 2025-01-01 --to 2025-01-31 \
--group-by connector_uuid
# → Cross-reference with: cargo-ai connection connector list
```
## Group by integration
```bash
cargo-ai billing usage get-metrics \
--from 2025-01-01 --to 2025-01-31 \
--group-by integration_slug
```
## Group by model
```bash
cargo-ai billing usage get-metrics \
--from 2025-01-01 --to 2025-01-31 \
--group-by model_uuid
# → Cross-reference with: cargo-ai storage model list
```
## Group by agent
```bash
cargo-ai billing usage get-metrics \
--from 2025-01-01 --to 2025-01-31 \
--group-by agent_uuid
# → Cross-reference with: cargo-ai ai agent list
```
## Filter usage to a specific workflow
references/response-shapes.md
# Response shapes
JSON response structures returned by Cargo CLI commands used in the `cargo-billing` skill.
## cargo-ai billing usage get-metrics
```json
{
"metrics": [
{
"date": "2026-07-25T00:00:00.000Z",
"items": [
{ "slug": "integration.peopleDataLabs.action.queryPeople", "count": 174, "groupBy": null },
{ "slug": "integration.serper.action.search", "count": 27.35, "groupBy": null },
{ "slug": "native.modelAsk", "count": 0.5, "groupBy": null },
{ "slug": "success", "count": 1043, "groupBy": null },
{ "slug": "error", "count": 32, "groupBy": null },
{ "slug": "insert", "count": 24, "groupBy": null }
]
}
]
}
```
**With no `--unit`, three different quantities share one `items[]` array.** In the response above, `174` is credits, `1043` is *node executions*, and `24` is records written. Identify the unit from the slug:
| Slug shape | Unit | `count` is |
|---|---|---|
| `integration.<slug>.action.<action>`, `integration.<slug>.chat`, `integration.<slug>.extractor.<name>`, `native.<action>` | `billing.credits` | Credits (fractional) |
| `success`, `error` | `orchestration.executions` | Node executions — **credits = count / 100** |
| `insert` | `storage.records` | Records written |
`--unit` takes exactly `billing.credits`, `orchestration.executions`, or `storage.records`; any other value returns `400` listing those three. Pass it whenever the number feeds an estimate. The execution rows reconcile one-for-one with `SELECT execution_status, count() FROM spans` in `orchestration query execute`.
When `--group-by` is specified, `groupBy` contains the resource identifier:
```json
{
"metrics": [
{
"date": "2025-01-15T00:00:00Z",
"items": [
{ "slug": "enrichment", "count": 100, "groupBy": "workflow-uuid-1" },
{ "slug": "enrichment", "count": 50, "groupBy": "workflow-uuid-2" }
]
}
]
}
```
**Key fields:** `metrics[].date`, `metrics[].items[].slug` (usage type), `metrics[].items[].count` (units depend on the slug — see above), `metrics[].items[].groupBy`.
The response has exactly one top-level key, `metrics`. There is no `totalUsage` — sum `items[].count` yourself, within one unit.
## cargo-ai billing subscription get
```json
{
"subscription": {
"uuid": "...",
"workspaceUuid": "...",
"plan": "self-serve",
"cadence": "monthly",
"subscriptionStatus": "active",
"subscriptionAvailableCreditsCount": 10000,
"subscriptionCreditsUsedCount": 3200,
"additionalAvailableCreditsCount": 0,
"fixedPrice": 9900,
"conversionRate": 1,
"hasCredits": true,
"startAt": "2025-01-01T00:00:00Z",
"resetAt": "2025-02-01T00:00:00Z",
"endAt": null,
"topup": null,
"createdAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-15T00:00:00Z"
}
}
```
**Key fields:** `plan` (`self-serve` or `enterprise`), `subscriptionStatus`, `subscriptionAvailableCreditsCount`, `subscriptionCreditsUsedCount`references/troubleshooting.md
# Troubleshooting
Common errors and recovery steps for `cargo-billing` commands.
## General
| Symptom | Cause | Fix |
|---------|-------|-----|
| `{"errorMessage": "..."}` with non-zero exit | Any CLI error | Read the `errorMessage` — it usually says exactly what's wrong |
| `command not found: cargo-ai` | CLI not installed or not in PATH | Run `npm install -g @cargo-ai/cli` or prefix with `npx @cargo-ai/cli` |
| `Unauthorized` or `Forbidden` | Bad or expired credentials | Re-run `cargo-ai login --oauth` (browser sign-in) or `cargo-ai login --token <token>`; verify with `cargo-ai whoami` |
## Usage metrics
| Symptom | Cause | Fix |
|---------|-------|-----|
| Empty metrics (no items) | Date range has no activity, or wrong format | Verify dates are `YYYY-MM-DD`; try a wider range; confirm the workspace had activity in that period |
| `--group-by` returns items with null `groupBy` | Some usage isn't attributable to that dimension | This is expected — unattributed usage shows `groupBy: null` |
| Metrics don't match expectations | Filtering by wrong resource UUID | Re-discover UUIDs with `play list`, `tool list`, `connector list`, or `agent list` |
## Subscription and billing
| Symptom | Cause | Fix |
|---------|-------|-----|
| `subscription get` returns `Forbidden` | Token lacks billing permissions | Use a token with admin access; check workspace settings under **Settings > API** |
| Invoice amounts look wrong | Amounts are in cents, not dollars | Divide `amount` by 100 for the dollar value |
| `create-portal-session` returns an error | Subscription not active or no Stripe setup | Verify the workspace has an active paid subscription |
## Adding a card
| Symptom | Cause | Fix |
|---------|-------|-----|
| `cardDeclined` with a `declineCode` | The issuer refused the zero-amount verification | Read `declineCode`. On a spend-limited virtual card this usually means the budget or merchant restrictions exclude us — ask the cardholder to raise the limit, then retry |
| `authenticationRequired` | The card requires 3-D Secure, which cannot be completed without the cardholder | Re-run `update-payment-method` with no arguments and give the user the hosted-form URL |
| `paymentMethodNotFound` | The details did not resolve to a card we can use | Re-check the number and expiry with the user |
| `Rate limit exceeded` on `update-payment-method` | More than 10 card updates in an hour for this workspace | Wait for `retryAfter`. Repeatedly retrying a declined card is what exhausts this — fix the decline cause first |
| Stripe rejects the card before Cargo sees it (`code`, `param` in the error) | The number, expiry, or CVC is malformed | The `param` field names the bad field; correct it with the user |
| `no Stripe publishable key configured` | The Cargo environment is missing `STRIPE_PUBLIC_KEY` | Environment misconfiguration, not a user error — report it; the hosted-form flow (no arguments) still works |
| Hosted form times out | Nobody completed the form inAionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/cargo-ai/skills/cargo-billing",
"sourceUrl": "https://clawhub.ai/cargo-ai/skills/cargo-billing",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-10T09:05:09.415Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-cargo-ai-cargo-billing/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-cargo-ai-cargo-billing/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-10T09:05:09.415Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.5K downloads",
"href": "https://clawhub.ai/cargo-ai/cargo-billing",
"sourceUrl": "https://clawhub.ai/cargo-ai/cargo-billing",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-10T09:05:09.415Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "2.0.1",
"href": "https://clawhub.ai/cargo-ai/cargo-billing",
"sourceUrl": "https://clawhub.ai/cargo-ai/cargo-billing",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-10-02T18:32:01.349Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-cargo-ai-cargo-billing/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-cargo-ai-cargo-billing/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 2.0.1",
"description": "cargo-billing 2.0.1 - Updated version to 2.0.1 in SKILL.md and skill-metadata.json. - Removed outdated skill-card.md file. - No functional or CLI changes; documentation and metadata update only.",
"href": "https://clawhub.ai/cargo-ai/cargo-billing",
"sourceUrl": "https://clawhub.ai/cargo-ai/cargo-billing",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-10-02T18:32:01.349Z",
"isPublic": true
}
]
}Record generated Oct 10, 2026.
