Projects
Projects provide per-project cost tracking, budget enforcement, and organizational grouping. They are the primary mechanism for attributing costs to specific agents, teams, or customers.Defining projects
Projects are defined invoicegw.yaml under the projects section. The key is the project ID used in code.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
name | string | required | Human-readable project name |
description | string | "" | Description of the project’s purpose |
daily_budget | float | 0.0 | Daily spending limit in USD. 0.0 means no limit. |
budget_action | string | "warn" | What to do when budget is exceeded: warn, throttle, or block |
tags | list of strings | [] | Arbitrary tags for filtering and dashboard display |
providers | mapping | {} | Per-project provider keys. Wins over the top-level providers: block when set. |
default_stack | string | "" | Optional dashboard / display hint. Not used by the inference module. |
guardrails | mapping | all categories off | Optional LLM-side guardrail policy. |
Budget actions
Thebudget_action field controls what happens when a project’s daily spend exceeds its daily_budget:
warn— a warning is logged but requests continue normally. Use this for development and low-risk projects where you want visibility without disruption.throttle— requests are artificially slowed down to reduce consumption rate. Use this when you want to discourage overuse without hard-blocking.block— requests are rejected entirely until the next day when the budget resets. Use this for strict cost controls on production projects.
Selecting a project from code
The active project resolves in this order:inference.set_project(name)in the current async context.VOICEGW_ACTIVE_PROJECTenvironment variable.default_projectfield invoicegw.yaml.- The literal
"default"(auto-created on first run).
inference.set_project is scoped to the current asyncio context; sibling tasks each manage their own project state without leaking.
Guardrails
Guardrails are optional per-project policies injected intovoicegateway.inference.LLM.chat(...).
pii, financial, medical, prompt_injection, and off_topic. Supported actions are redact, block, alert, and off. See Voice-specific guardrails for runtime behavior, bypass, and audit events.
Querying project data
From the CLI
From the HTTP API
From the dashboard
The web dashboard (voicegw dashboard) shows per-project cost breakdowns, daily spend trends, and budget utilization.
Tags
Tags are arbitrary strings used for filtering and visual organization. The dashboard uses the first tag to determine accent colors:- Tags containing
prodrender with a green accent - Tags containing
stagrender with a yellow accent - Tags containing
devortestrender with a blue accent - All other tags render with a pink accent
Runtime project management
Projects can also be created and managed at runtime through:- The dashboard web UI
- The MCP server (
voicegw mcp) - The HTTP API (
/v1/projects)