These prompts describe the outcome, not a fixed set of edits. Review the agent’s changes like any other pull request — where things land depends on how your codebase is structured.
Before you start
The agent will need a few things to be true. You can either set these up first or let the prompt ask you for them:- A Hicap API key. Create one in the Hicap Platform dashboard ↗ and make it available as the
HICAP_API_KEYenvironment variable. The agent should never hard-code it. - The base URL and auth header. Requests go to
https://api.hicap.ai/v1, and the key is sent as theapi-keyheader. Any OpenAI-compatible SDK works — see the Developer Quickstart. - A sense of your dimensions. Decide which labels you want to slice spend by. See Tags, Dimensions & Segments for the model; the prompts assess five starter dimensions, reuse approved application conventions, and distinguish missing instrumentation from intentionally non-applicable values.
Master prompt
Copy this short instruction into your agent. It will read the full prompt from a dedicated page and help you set up Hicap and attribution in your application repository. Use the copy button to copy only the instruction below. The linked page contains the full, maintained implementation prompt.Master prompt
Focused prompts
Prefer smaller steps? Run these in order — each is safe to hand over on its own.1. Point the client at Hicap
1. Point the client at Hicap
Client setup
2. Add a tagging helper
2. Add a tagging helper
Tagging helper
3. Set base dimensions
3. Set base dimensions
Base dimensions
4. Tag per-call features
4. Tag per-call features
Per-call features
After the agent runs
Review the emitted tags for real workflows, not only whether a helper exists. A valid tags header can still omit a named agent role. After deployment, inspect fresh traffic in the correct application and environment; a 30-day chart can still include older untagged requests.- Review coverage and evidence. Check the whole-app inventory, separate ordinary traffic from AI call sites, and review every deferred or unresolved path. Zero model calls is a valid finding; a prepared client is not proof of live attribution.
- Review all five dimensions. Confirm agent, env, system, feature and domain definitions and sources. Reuse approved application conventions and distinguish missing values from dimensions that do not apply. Preserve compatible existing dimensions and review any migration.
-
Verify the header. Confirm each model request sends a single
x-hicap-tagsheader whose value is one JSON object of strings; check safe merge precedence, privacy, concurrency and queued/retried context. Unknown assessment values must not become JSON null. See How tags are sent. - Check for untagged traffic. Requests that arrive without your expected dimensions surface as Unattributed Traffic — a signal that a call site still needs the helper. See Segments.
- Grow into segments. Once dimensions are flowing, define segments to slice spend without touching code again.
Related
Developer Quickstart
The minimal client setup the prompts build on.
Tags, Dimensions & Segments
The attribution model these prompts implement.