Prompt template fields
Each prompt template version has the following fields:| Field | Type | Description |
|---|---|---|
name | string | Identifier for the prompt, shared across all versions (e.g., "support-classifier") |
version | integer | Version number within the named prompt (e.g., 1, 2, 3) |
template_text | string | The full text of the prompt template |
description | string (optional) | Human-readable notes about what changed in this version |
is_active | boolean | Whether this version is the current default |
name and version must be unique per account. If you try to register a duplicate, the API returns HTTP 409.
Workflow
Register a prompt version
Call When you ship an updated prompt, register it as the next version:
POST /api/v1/dashboard/prompts/ to register a new version of your prompt:Run your agent
Run your agent as normal. Your existing SDK instrumentation captures the trace automatically. Make a note of the
trace_id for each run so you can link it to the prompt version that produced it.If you are using the AgentVista Python SDK, the trace_id is available on the completed run object.Record prompt usage
After each trace completes, call This call is idempotent — submitting the same
POST /api/v1/dashboard/prompts/usage to link the trace to the prompt version that produced it:(prompt_name, prompt_version, trace_id) combination more than once is safe.You can optionally include a span_id to link to a specific span within the trace rather than the trace header.Compare versions in the dashboard
Once you have traces linked to multiple versions, open the prompt detail view in the dashboard. You will see a side-by-side table with per-version stats.You can also fetch comparison data directly from the API:Example response:In this example, version 2 achieves a 17-point higher success rate at the cost of a slightly higher average latency and per-run cost.
Viewing all versions
To list all registered versions of a specific prompt, callGET /api/v1/dashboard/prompts/{name}/versions. To list all prompts across all names, call GET /api/v1/dashboard/prompts/. Versions are returned newest first within each name.
Per-version metrics
The comparison endpoint computes the following metrics for each version, derived from all traces linked to that version:| Metric | Description |
|---|---|
total_traces | Number of traces linked to this version |
success_rate | Fraction of linked traces where success = true |
avg_cost_usd | Mean total_cost_usd across linked traces |
avg_latency_ms | Mean duration_ms across linked traces |
p95_latency_ms | 95th percentile duration_ms across linked traces |
Metrics are computed from the
success, total_cost_usd, and duration_ms fields on traces linked to each prompt version. Make sure your SDK is recording outcome signals and cost data on each run — otherwise success_rate and cost metrics will be null.